The vehicle casts a fan of LIDAR rays and radar rays each frame against every obstacle's bounding sphere (real distance tests, not scripted animation). Detected obstacles are fused into a single obstacle list, and a repulsive potential field steers the car away from the nearest threats while an attractive term pulls it toward the lane centerline.
F_total = k_att * (x_goal - x_car)
- Σ k_rep * (1/d_i - 1/d0) * (1/d_i²) * n̂_i for d_i < d0
steer = clamp(atan2(F_total.x, F_total.z), -δmax, δmax)
Here d_i is the distance to obstacle i, d0 is the sensor range (the influence radius), n̂_i is the unit vector away from the obstacle, and δmax caps the steering angle. Turning off a sensor removes its rays from the fusion set, shrinking the detected-object count and degrading avoidance quality — exactly like a real perception stack losing a modality.
- Vehicle speed: sets forward velocity, which shortens the reaction window before obstacles are reached.
- Sensor range: sets the LIDAR/radar influence radius d0 used in the repulsive field.
- Traffic density: number of obstacle vehicles/objects populating the road.
- LIDAR / Radar / Camera: toggle each modality on/off to see fused detections drop and the planned path degrade.
- V2X: when on, obstacles broadcast position ahead of line-of-sight detection, extending effective range by 1.6x.
Real self-driving stacks (Waymo, Tesla FSD, Cruise) fuse LIDAR, radar and camera streams via Kalman/particle filters, then feed the fused object list into a path planner much like this simplified potential-field model.