Katkat

Implement automatic braking logic in Python

TeslaMachine Learning Engineer · Technical Screen

Last updated

This question evaluates understanding of kinematics, motion modeling, and numerical reasoning for safety-critical control logic, focusing on stopping-distance computation and the impact of reaction time on braking decisions.

Using Python, implement a simple automatic braking function. Given current speed v (m/s), distance to obstacle d (m), maximum deceleration a_max (m/s^ 2), and reaction time t_r (s), decide whether to brake immediately to stop before the obstacle; return the braking decision, braking start time, and expected stopping distance.