Vehicle Platooning

Overview

A vehicle platoon consists in a set of vehicles which move together to a target destination, in the context of autonomous or semi-autonomous driving. The motivation for this can be to improve road safety, traffic congestion, to reduce fuel consumption, to save time and/or human resources on driving or other.

This early version of the vehicle platooning supports

  • Starting with 2 vehicles forming the platoon
  • New vehicles of almost similar size can join either at the tail or in the middle of the platoon, upon close distance proximity
  • Accelerating and decelarating of all the vehicles simultaneously
  • A vehicle can request to depart and as soon as it does so, it goes to manual driving. The same applies to the leader vehicle
  • The gaps after a vehicle departure are covered by acceleration of the remaining vehicles
  • When the leader leaves, it cannot rejoin as leader
  • At current status, the platoon cannot handle challenging turns, like 180 degrees on high speeds.

Multiple Platoons Multiple Platoons

Files

Here is an overview of the files and directories involved :

  1. platooning.lua (“BeamNG directory”\game\lua\vehicle\extensions\tech)
  2. platoonFunctions.lua (“BeamNG directory”\game\lua\ge\extensions\tech)

Usage

1.The platoon is formed with

extensions.tech_platoonFunctions.loadWithID(leader id, 1st following vehicle id, default speed), where :

  • Leader : the first vehicle in the platoon.
  • First following vehicle in the platoon: the first vehicle behind the leader, which means the second one in the platoon.
  • default speed : the speed that the platoon should follow, as assigned by the user in m/s.

2.To let a new vehicle join the platoon’s tail, this vehicle’s id number is necessary :

extensions.tech_platoonFunctions.joinWithID(leader id, new vehicle id, speed).

3.The platoon can start moving with manual control as default. To allow to opt for the control mode, the user can run this command:

extensions.tech_platoonFunctions.launchPlatoon(leader id, Mode, speed), where

  • Mode = 0: Manual mode
  • Mode = 1: Span mode
  • Mode = 2: Traffic mode

4.One of the following vehicles, in the middle or tail of the platoon, is about to leave the platoon :

extensions.tech_platoonFunctions.leavePlatoon(leaderID, vehicle-to-leave id),

so the vehicle goes to manual mode and the user should control it, driving outside of the platoon.

5.When the leader is to leave the platoon :

extensions.tech_platoonFunctions.leaderExitPlatoon(leaderID).

  1. A new external vehicle is joining the platoon in the middle :

    extensions.tech_platoonFunctions.joinInBetween(leaderID, ID of the relay vehicle in platoon infront of which joining occurs, ID of the external vehicle, speed).

Notes

  1. When applying the manual driving mode for the platoon, this needs to be slowly accelerating, i.e., not with challenging throttle.
  2. The usage commands are to execute via GeLua cmd.
  3. When vehicles are joining/forming a platoon, they need to be close to the position where they are joining, for the follow mode to work correctly (~ 10m).
Last modified: July 8, 2025

On this page:

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.