Adaptive Cruise Control

Overview

The Adaptive Cruise Control (ACC) is an ADAS feature that allows a vehicle to maintain a certain speed. This speed can vary over time since is computed as the minimum between the reference value set by the user and the speed that allows the vehicle to fulfill some distance constraints with respect to the surrounding cars. The actual implementation of the ACC exploits the camera sensor to gather information about the surroundings and controls the vehicle actuating the brake and throttle pedals. The type of controller used is a linear and unconstrained Model Predictive Control (MPC).

Usage

In order to load the ACC extension the user has to call the following command in the game engine console that can be accessed pressing Ctrl + @.

extensions.tech_adaptiveCruiseControl.load(targetSpeeed, debugFlag)

This command will automatically load and start running the ACC.

The inputs are:

  • targetSpeed desired speed in m/s
  • debugFlag Boolean value, if true then the controller generate a .CSV file stored in AppData/Local/BeamNG.drive/<current version> containing target speed, real speed and control input over time.

The fixed target speed can be changed also once the controller is loaded with the following command.

extensions.tech_adaptiveCruiseControl.changeSpeed(targetSpeed)

In order to deactivate the controller the following command can be used.

extensions.unload("tech_adaptiveCruiseControl")

Last modified: 4/4/2023 17:11
On this page:

Any further questions?

Join our discord