BeamNG.tech to Simulink bridge, new sensor and ADAS feature, improved Python API.
For the first release of 2023, the 0.28, BeamNG.tech features the radar sensor which detects static objects. The functionality to detect moving objects, such as vehicles, will be included later. The interested user can access this new sensor with the aid of Lua API and BeamNGpy API and experiment with relevant example scripts in BeamNGpy. To our IMU sensor, we have added the ability to filter gyroscopic readings (as well as acceleration readings). Separate data filtering is used for each readings.
We have improved our sensor suite upon certain bug fixes. (In more detail, we fixed the issue of a sensor not updating correctly when the requested update times or priority parameters would change after various sensors had been already created. The gravity vector not being applied correctly in IMU sensor has been fixed. The camera images from static sensors being rendered upside down have been fixed. The LiDAR sensor not returning the whole point cloud in BeamNGpy now works fine.)
A new feature available in BeamNGpy is the vehicle meshes. Vehicle nodes and physics triangle data, including for individual vehicle wheels, are provided at a frequency of up to 2000 times per second. It is also possible to compute mesh connectivity data. Vehicle meshes are accessible via Lua and BeamNGpy APIs and come along with BeamNGpy example scripts.
The Adaptive Cruise Control is our new ADAS feature. It is based on camera sensor input data and adjusts the host vehicle speed according to the surrounding cars, by brake and throttle pedals control of the host vehicle.
Moreover, we introduce the interface between BeamNG.tech powertrain and Simulink, based on an S-function which handles the incoming/outgoing signals between BeamNG.tech and Simulink via UDP communication. The average round-trip time of simulation has been measured as 0.00002 seconds.
Further, we have integrated the MQTT protocol which is a standard messaging protocol for IoT. The interested user can access this extension to our Lua API by the instructions in MQTT repository.
We also achieved to export BeamNG maps as OpenDRIVE files. BeamNGpy now provides the option to export our map road networks as .xodr files (OpenDRIVE). The exported road networks contain elevation and road wideness data, along with junction connectivity. On top of this, BeamNGpy also includes a new class with which to analyse the road network data oneself, and process it as required.
Certain improvements and fixes on the BeamNGpy API have been made. Let us note here a few. We have optimized the speed of depth camera processing. We have added the option to remove procedural meshes and new API for getting information about the time of the day, for getting the center of gravity of a vehicle and other data requests. A new option to BeamNGpy.open allows not to break the connection between BeamNG.tech and BeamNGpy upon Lua crashes.
Note that the BeamNG.tech v0.28 release includes all the features of the latest BeamNG.drive release.
Here is the full report on BeamNG.drive v0.28.
Here is our changelog for 0.28:
Simulink generic interface
- A UDP-based interface between BeamNG.Tech powertrain and Simulink.
- An S-function that handle the incoming/outgoing signals between BeamNG.Tech and Simulink.
- Simulating at average of round-trip time up to 0.00002 seconds.
Sensors
RADAR sensor
- Sensor currently works with static scenery but not vehicles. Will be added in later update.
- Sensor comes with standard Lua API and BeamNGpy API.
- Example scripts provided in BeamNGpy.
Vehicle meshes now available in BeamNGpy
- Can provide data up to 2000 times per second.
- Vehicle nodes and physics triangle data available in BeamNGpy, including for individual vehicle wheels.
- Comes with standard Lua API and BeamNGpy API.
- Post-processing written in BeamNGpy to compute mesh connectivity data and analyse the mesh data (position, mass, force, velocity).
- Example scripts provided in BeamNGpy.
IMU sensor
- Added ability to filter gyroscopic readings (as well as acceleration readings).
- Separate data filtering is used for each.
Sensor suite bug fixes:
- Fix: problem when changing the requested update times/priority parameters after various sensors were already created, sensor would not update correctly/quickly.
- Fix: gravity vector was not being applied correctly in IMU sensor.
- Fix: camera images from static sensors were being rendered upside down.
- Fix: LiDAR sensor was not returning the whole point cloud in BeamNGpy.
Adaptive Cruise Control:
- It adjusts the vehicle speed according to the surrounding cars.
- It controls the vehicle through brake and throttle pedals
- and exploits the camera sensor.
Export BeamNG maps as .xodr files (OpenDRIVE)
- BeamNGpy now provides the option to export our map road networks as .xodr files (OpenDRIVE).
- The exported road networks contain elevation and road wideness data, along with junction connectivity.
- BeamNGpy also includes a new class with which to analyse the road network data oneself, and process it as required. BeamNG West Coast USA map as .xodr file
MQTT protocol integration
- Now BeamNG supports a standard messaging protocol for IoT.
- Accessible via a dedicated repo.
BeamNGpy fixes / improvements
- Optimized the speed of depth camera processing.
- Added new API:
- BeamNGpy.env.get_tod for getting the information about the time of day.
- BeamNGpy.env.set_tod for setting the time-of-day information, allowing to control the day/night cycle from Python.
- BeamNGpy.env.get_gravity for getting the current value of the strength of gravity in the simulator.
- Vehicle.get_center_of_gravity for getting the center of gravity of a vehicle.
- Added option to remove procedural meshes.
- Added new option to BeamNGpy.open called crash_lua_on_error:
- If False (the default), then Lua crashes in the simulator will not break the connection between BeamNG.tech and BeamNGpy. Set to True for getting proper stacktraces and easier debugging.
- Added new option to BeamNGpy.scenario.load called precompile_shaders:
- If True (the default), asynchronous shader compilation is disabled. That means the first loading of a map will take longer time, but all parts of the map will be preloaded. If False, the Camera sensor can have issues shortly after starting the scenario.
- Better handling of errors in the BeamNGpy TCP protocol.
- Fixed vehicle.control with zero integer arguments being ignored.
- Re-added BeamNGpy.scenario.get_vehicle (removed by accident in the last release).
- BeamNGpy.settings.set_deterministic and BeamNGpy.settings.set_steps_per_second are not persistent anymore and are applied only for a single run of the simulation.