BeamNG MATLAB integration


We are excited to announce that the highly requested feature of bridging and MATLAB is here. MATLAB, with its long history as an academic engineering and mathematical tool, is a programming and numeric computing platform used to analyse data, develop algorithms, and create models. The newly created bridge with MATLAB will enable you to run, control, and interact with the simulation. We have integrated five main scripts for your convenience in making use of annotations, bounding boxes, multi-shot camera, object placement, vehicle state plotting and creation of simple scenarios on our East Coast USA map.


you must have the following softwares/packages installed:

  1. Compatible Python

  2. BeamNGpy

  3. BeamNG.Tech

The BeamNG-MATLAB-integration bridge is depending on BeamNG.Tech and BeamNGpy. Make sure that you have the license for BeamNG.Tech. The Github repository of the BeamNG-MATLAB has some basic examples of scripts that run a vehicle with some sensors ex. Lidar, Camera, and state sensor.


Running the BeamNG ROS integration requires three individual software components, here is a list of compatible versions.


BeamNG MATLAB integration













1. Setup a compatible python version

After installing the compatible python version with MATLAB, make sure to include the path of excutable python file (exe) in your in “path” variable of “environment variables” as explained here.

2. Run python engine in MATLAB

Run the test_python.m to make sure that python engine is connected to your MATLAB engine as shown in the picture below.

Testing python in MATLAB

Vehicle State Plotting

Use the state sensor to plot some graphs of the vehicle position, wheel speed and direction, throttle, and brake.

Vehicle state ploting

Running Lidar sensor, and AI control.

  1. Create a simple scenario

  2. Use the simulator’s AI with BeamNGpy

Lidar sensor and AI control mode

Multi-shot Camera

Change the position and rotation of a camera

Multi-shot Camera

Object Placement

  1. Define a custom scenario for a given map

  2. Generate procedural content, i.e. simple meshes

Object Placement

Annotation and Bounding Boxes

  1. Get semantic annotations

  2. Get instance annotations

  3. Graw bounding boxes (note that this feature is not ready for use yet)

Annotation and Bounding Boxes