BeamNG MATLAB integration
Overview
We are excited to announce that the highly requested feature of bridging BeamNG.tech 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 BeamNG.tech 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.
Prequest
you must have the following softwares/packages installed:
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.
Compatibility
Running the BeamNG ROS integration requires three individual software components, here is a list of compatible versions.
BeamNG.tech |
BeamNGpy |
BeamNG MATLAB integration |
MATLAB |
Python |
---|---|---|---|---|
0.27 |
1.25 |
0.1.0 |
R2022b |
3.9 |
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.

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

Running Lidar sensor, and AI control.
Create a simple scenario
Use the simulator’s AI with BeamNGpy

Multi-shot Camera
Change the position and rotation of a camera

Object Placement
Define a custom scenario for a given map
Generate procedural content, i.e. simple meshes

Annotation and Bounding Boxes
Get semantic annotations
Get instance annotations
Graw bounding boxes (note that this feature is not ready for use yet)
