Adaptive Cruise Control (ACC) is an ADAS feature that lets a vehicle maintain a set speed. That speed can change over time: it is computed as the minimum of the user’s reference value and the speed needed to keep distance from surrounding vehicles. The implementation uses simulation data about nearby traffic (also available from the ideal RADAR sensor) and controls the vehicle by actuating the brake and throttle pedals. The controller is a linear, unconstrained Model Predictive Control (MPC).
To load the ACC extension, run the following command in the game engine console (Ctrl + @ or `), then select the vehicle that will use ACC. If it is the current vehicle, the console shows BeamNG - Current Vehicle and its <vehicle_ID>.
extensions.tech_ACC.loadAccWithID(vid, speed, debugFlag)
This command loads and starts ACC automatically.
The inputs are:
vid — vehicle ID that uses ACCspeed — desired speed in m/sdebugFlag — if true, the controller writes a .csv file to AppData/Local/BeamNG.drive/<current version> with target speed, actual speed, and control input over timeThe target speed can also be changed while the extension is loaded:
extensions.tech_ACC.changeSpeed(speed)
To deactivate the extension:
extensions.tech_ACC.unloadACC()
Here is an example of loading ACC in the console. You can unload ACC or change the target speed the same way.
The current ACC implementation has known limitations that are being addressed in a future update:
These issues will be fixed as soon as possible and will be announced once they are included in a BeamNG.tech release.
Was this article helpful?