BeamNG.tech new scenario generation tool, new sensors, updates of Simulink interface, Python API, impactgen and ROS bridge and new CAN-bus interface support.

BeamNG.tech v0.30 release features a new tool to facilitate scenario generation, new sensors and useful changes on BeamNGpy, Simulink bridge, ROS-bridge and on other BeamNG repositories. Other new .tech features and bug fixes are included in this release, as well.

The ScriptAI editor lets the user orchestrate scenarios with multiple vehicles on any BeamNG map, where time-based and speed-based trajectories can be defined, edited, recorded and replayed for each vehicle. This new GUI-based tool is suitable for scenario design, execution and postprocessing, and is accessible to the user via intuitive windows and without any programming required.

This release extends the sensors suite; a new GPS sensor outputs the vehicle localisation data as longitude and latitude. Next, the ideal RADAR sensor returns data on the closest objects (vehicles) which are detected within a distance from the ego vehicle. The so-called ‘roads’ sensor outputs geometric information and meta-data of the road where the vehicle is on.

The ROS-bridge comes updated to load old and new type of BeamNG sensors. We also updated the impactgen repository, which is suitable to generate crash scenarios and to collect relevant datasets. The BeamNG.gym, a collection of OpenAI Gym environments, got maintained up to the latest BeamNGpy release.

BeamNG.tech 0.30 release benefits from all updates in the BeamNG.drive 0.30 release. Here is the full report on BeamNG.drive v0.30.


Here is our changelog for 0.30:

New features

  • New scenario generation tool, the ScriptAI editor, with detailed tutorial
  • GPS sensor for the vehicle localisation
  • Ideal RADAR sensor for the closest vehicles’ kinematic data
  • Roads sensor for the geometrical and semantic data of the road’s left and right edges and the centerline
  • Added ability to dedicate a second screen as ‘driver’ camera using tech_utils.toggleSecondView() API; you can assign a new binding for it via options>controls>vehicle debug>Activate second window
  • Implemented CAN-Bus interface support using PEAK-System Technik GmbH CAN-Bushardware
    • Allows for direct bi-directional CAN-Bus access from lua
  • Added a “generic torque provider” device that can be used for applying externally controlled torques

Changes / improvements

  • the Matlab and Simulink bridge is now available as a Mathworks toolbox
  • the impactgen repository got updated to the BeamNG.tech v0.30 release version,
  • the BeamNG.gym repository got updated to the BeamNG.tech v0.30 release version
  • camera, lidar, and radar sensor readings can now be streamed directly to shared memory in beamngpy, using dedicated stream() functions now found in the respective Beamngpy sensor classes; no polling thus required.
  • beam stresses added to Mesh sensor.
  • deflate_tire() method added to vehicle class, so the user can choose a tire to instantly deflate to simulate a blow out.
  • Added ability to limit combustion engine and electric motor output torque
  • Improved support for motion platforms
  • Added ability to block certain input sources via code
  • BeamNGpy fully supports loading existing missions and Flowgraph scenarios; Have a look into the “Scenario loading” example notebook for more
  • Scenarios created using BeamNGpy are now using the .json format for prefab generation instead of the old TorqueScript format
  • BeamNG.tech connection to the simulator is now by default listening on the local interface only (127.0.0.1). You can change it to listen on other IP addresses by using the listen_ip argument in the BeamNGpy.open function, or the -tcom-listen-ip command-line argument, if you are not launching BeamNG.tech using BeamNGpy.
  • Optimized Python processing of the depth camera image (thanks for the contribution!)
  • The physics update rate of BeamNG.tech launched from BeamNGpy is being changed from 4000 to 2000 times per second to be consistent with the default for the simulator. To change the physics update rate to a different value, you can pass the -physicsfps <DESIRED_VALUE> argument to the simulator binary.
  • Changed the input and output types of the BeamNGpy.scenario.get_scenarios function:
    • the levels argument is now a list of level names or instances of the Level class to get scenarios for
    • the return value is now a dictionary where the keys are the level names, and the values are lists of scenarios for the given level
  • Removed the level argument of BeamNGpy.scenario.get_current, as the level information is now queried from the simulator.
  • On the Simulink bridge, added a Simulink subsystem that wraps the S-function returning busses instead of arrays as outputs.
  • Changed the Simulink S-function that now takes as parameters the UDP ports and addresses.
  • Added the Matlab function setup_beamngpy that allows to connect easily any python environment with BeamNGpy installed to Matlab.
  • Added the Matlab function load_lua_controller to load the vehicleSystemCoupling.lua controller directly from Matlab through BeamNGpy.

Bug fixes

  • u32 overflow problem identified and fixed in the simulator’s GPU scheduler. This affected cases with multiple sensors, where some sensors would stop updating sporadically.
  • ultrasonic sensor bug fix; previously failing with some angles to surfaces, also names’ typos fixed.
  • Advanced IMU sensor’s isUseGravity flag did not work due to an inconsistency in variable naming - got fixed.
  • fixed bug with ‘relative’ camera which also used quat for direction; now it works and takes dir/up vectors instead.
  • improvements to ongoing problem of Advanced IMU readings smoothing for accel/gyro components. Both can now be smoothed independently.
  • mesh sensor failing is now fixed.
  • Part annotations for vehicles are working again.
  • Fixed the issue where loading a BeamNGpy scenario could cause an infinite-loading screen glitch.
  • Fixed incorrect dark shade when more than one LIDAR sensor is used.

BeamNGpy-related changes

ROS_bridge-related changes

  • ROS-bridge now can load sensors that use vehicle.attach_sensor and ‘automated’ sensors too, thus allowing for ad-hoc functionality
  • Added Rviz configuration ROS-bridge
  • Merged launch files in beamng-control in ROS-bridge
  • Fixed the electrics sensor and ultrasonic API in ROS-bridge.