Execution

When the user has generated an appropriate .csv file, the third party end of the coupling should be set up and started. It should be frozen and awaiting commencement from the BeamNG end. This is the recommended approach, however the user could start coupling from BeamNG - putting BeamNG into a frozen state, and then start coupling with the third party end, if this is more appropriate. Note that both sides of the co-simulation are set up to block until they receive messages from the other side, so if one side is not sending messages then the other side should block (freeze).

The Main Tool Window contains a button to start the co-simulation execution. This is found beside the vehicle with which the user wishes to co-simulate.

Executing The Co-Simulation:

Upon pressing the execution button, a file dialog will open, allowing the user to select the .csv file. When this has been done, the coupling will start immediately.

If the user has chosen to include the vehicle pose in the .csv file, the vehicle will ’teleport’ to this position and rotation upon commencing co-simulation. Note that this should only be done if the current map is the same map upon which this pose was taken (when the .csv was generated).

During coupling, BeamNG should indicate a reasonable frame rate (eg 60 FPS) and should not be frozen. If it is frozen (or has a very low frame rate), there is likely a problem with the coupling. The third party should be checked to see if this is also frozen. The user will then need to determine the cause. Third party software such as Wireshark may be useful for checking to see if messages are being sent from one side to the other.

Stopping The Co-Simulation:

To cease the co-simulation, the user can press the same button used to start the execution. This will put the state of BeamNG back to its default, and the user can re-commence coupling by following the process above, as required.

Last modified: May 17, 2024

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.