Camera sensor improvements
Added the Camera.stream function for easier retrieval of camera images being streamed through shared memory
camera_streaming.pyexample to showcase these functions
GPS sensor added
RoadsSensor sensor added
IdealRadar sensor added
RADAR sensor now reads the Doppler velocity from vehicles in the simulation as well as static objects.
BeamNGpy now fully supports loading existing missions and Flowgraph scenarios. Look into the Scenario Control example notebook to learn more.
Beam stresses added as a mode to the
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. This represents an alternative to the polling method used previously.
BeamNGpy projects updated for latest BeamNG.tech version
Relative camera interface changed to use vectors instead of quaternions.
Changed the input and output types of the
levelsargument 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
BeamNGpy.scenario.get_current, as the level information is now queried from the simulator.
Function added to the
Vehicleclass to deflate vehicle tires, e.g. to simulate tire blowout.
Fixed a bug where loading a BeamNGpy scenario could cause an infinite-loading screen glitch.
Meshsensor not working.
Part annotations for vehicles are working again.
Bug fixed when using multiple ultrasonic sensors, where the first sensor would not update in simulator.
Bug fixed when using ultrasonic sensor, relating to failure to detect at some angles to surfaces
Bug fixed with ultrasonic sensor, relating to typos in parameter names, rendering some parameters unusable from BeamNGpy.
Bug fixed with
AdvancedIMUsensor, when using gravity. Did not work from BeamNGpy before.
Bug fixed with
AdvancedIMUsensor, relating to the smoothing not working from BeamNGpy.
Bug fixed with the relative camera, which was not operating correctly.
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.
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_ipargument in the
BeamNGpy.openfunction, or the
-tcom-listen-ipcommand-line argument, if you are not launching BeamNG.tech using BeamNGpy.
Optimized Python processing of the depth camera image (thanks for the contribution!)
OpenDrive (.xodr) importer added, and new example created in Examples folder.
OpenStreetMap (.osm) importer and exporter added, and new examples created in Examples folder.
Eclipse Sumo (.nod.xml and .edg.xml) importer and exporter added, and new examples created in Examples folder.
BeamNGpy fixes / improvements
Scenarioclass now has all parameters documented.
BeamNGpy.debugAPI methods are now documented
BeamNGpy.envnow contains more information about the ‘time of day’ object
Added documentation for RADAR and Mesh sensors
Vehicle.set_part_confignow does not recreate the existing connection to the simulator, as it was not needed
Small refactor of unit tests, the automated sensor scripts are now also runnable under the
Invalid vehicle and scene object names produced error in the simulation, now the validation is done on BeamNGpy side
name cannot start with the
%character or a digit
name cannot contain the
Added new options to
Trueby default and it connects the player vehicle to the simulation after scenario load
Trueby default and it connects all the already existing vehicles to the simulation after scenario load
setting these options to
Falsecan reduce the loading time by skipping the connection-establishing part, and these vehicles can still be connected manually using
crash_lua_on_erroroption to the BeamNGpy constructor
behaves in the same way as the option of the same name in
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.
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
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. On top of this, BeamNGpy also includes a new class with which to analyse the road network data oneself, and process it as required.
BeamNGpy fixes / improvements
Optimized the speed of depth camera processing
Added new API:
BeamNGpy.env.get_todfor getting the information about the time of day
BeamNGpy.env.set_todfor setting the time-of-day information, allowing to control the day/night cycle from Python
BeamNGpy.env.get_gravityfor getting the current value of the strength of gravity in the simulator.
Vehicle.get_center_of_gravityfor getting the center of gravity of a vehicle.
Added option to remove procedural meshes
Added new option to
False(the default), then Lua crashes in the simulator will not break the connection between BeamNG.tech and BeamNGpy. Set to
Truefor getting proper stacktraces and easier debugging.
Added new option to
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 and crashes in the BeamNGpy TCP protocol.
vehicle.controlwith zero integer arguments being ignored.
BeamNGpy.scenario.get_vehicle(removed by accident in the last release).
BeamNGpy.settings.set_steps_per_secondare not persistent anymore and are applied only for a single run of the simulation.
fixed in BeamNG.tech v0.27.1.0: converted all vehicle rotations sent to BeamNGpy to be consistent with each other - if the rotation you are using is 180° rotated across the Y axis, you can use the
beamngpy.quat.flip_y_axisfunction to flip it
BeamNGpy.vehicles.replaceto respect vehicle color and license plate text
Added type hints to the whole BeamNGpy codebase
Updated documentation to be more readable
Modularized BeamNGpy API
The functions on the BeamNGpy object are now split into modules for easier navigation:
BeamNGpy.camera- configuring the in-game camera
BeamNGpy.control- controlling the simulator state (pausing, stepping, quitting the simulator)
BeamNGpy.debug- drawing debug objects
BeamNGpy.env- controlling the environment state (time of day, gravity)
BeamNGpy.scenario- loading/starting/stopping a BeamNG scenario
BeamNGpy.settings- changing the simulator’s settings
BeamNGpy.system- info about the host system
BeamNGpy.traffic- controlling the traffic
BeamNGpy.ui- controlling the GUI elements of the simulator
BeamNGpy.vehicles- controlling vehicles
Some of the functions on the
Vehicleobject are also moved into modules for easier navigation:
Vehicle.ai- controlling the AI of the vehicle
Vehicle.logging- controlling the in-game logging
the previous, not modularized API is still available for backwards compatibility reasons
see more in the documentation
Advanced IMU sensor
replaces the accelerometer sensor from last release
improves upon the existing IMU sensor by using a more advanced algorithm, and provides readings at up to 2000 Hz
new sensor for analysing powertrain properties at high frequency (up to 2000 Hz)
new test/demo scripts are available to show execution of this sensor
New BeamNGpy functionality
added support for a custom binary name in BeamNGpy constructor
BeamNGpy.traffic.spawnto spawn traffic without a set of predefined vehicles
BeamNGpy.traffic.resetto reset all traffic vehicles from the player (teleport them away).
Vehicle.teleportnow supports changing rotation without resetting the vehicle
BeamNGpy.opennow always tries to connect to already running simulator no matter the value of the launch argument
Vehicle.focusto switch the simulator’s focus to the selected vehicle
BeamNGpy.vehicles.spawnnow has a new argument
connectto allow for not connecting the newly spawned vehicle to BeamNGpy
Vehicle.recoverto repair a vehicle and teleport it to a drivable position
BeamNGpy.vehicles.replaceto replace a vehicle with another one at the same position
beamngpy.quat.quat_multiplyutility function to multiply two quaternions
Camerasensor decoding to be faster
updated the required Python packages to newer versions
Vehicle.set_license_plateto set a license plate text for a vehicle
Vehicle.sensors.pollnow allows also polling only a specified list of sensor names
BeamNGpy.disconnectto disconnect from the simulator without closing it
Camerasensor default parameters to not include annotation and depth data (for faster polling)
added the optional
BeamNGpy.control.return_to_main_menuto exit the currently loaded scenario
added the parameter
quit_on_closeto the BeamNGpy constructor. If set to
BeamNGpy.closewill keep the simulator running.
Vehicle.state['rotation']now returns vehicle rotation consistent with the rest of the simulator. Previously, this rotation was rotated 180° around the Y axis.
⚠️ if you are using
Vehicle.state['rotation']in your existing scripts, you may need to flip it back for your intended use. You can use
beamngpy.quat.quat_multiply((0, 0, 1, 0), <your_rotation>)for that purpose.
fixed the issue with BeamNGpy scenarios sometimes resetting and not working properly after loading
Camera.extract_bounding_boxesnot to crash on non-Windows systems
beamng.scenario.start()not working when the simulator was paused with
fixed vehicle color and license plate text not being applied to dynamically spawned vehicles
BeamNGpy protocol: added support for out-of-order protocol messages
remoteargument of the
BeamNGpyclass is not used anymore
Major changes to the protocol communicating between BeamNG.tech and BeamNGpy
Be aware that versions of BeamNG.tech older than 0.26 are not compatible with BeamNGpy 1.24 and older versions of BeamNGpy will not work with BeamNG.tech 0.26.
Major updates to BeamNGpy sensor suite and its API
The public API of the
Ultrasonicsensors changed heavily, please see the
examplesfolder to see their usage.
Accelerometer sensor now available
Add support for loading TrackBuilder tracks
Add support for loading Flowgraph scenarios
Fix: multiple vehicles now do not share color in instance annotations
Vehicle.teleporthelper function which allows to teleport a vehicle directly through its instance
BeamNGpy.opennow tries to (re)connect to already running local instance
Removed deprecated BeamNGpy functionality
rotargument used for setting rotation of objects and vehicles in Euler angles, use
rot_quatwhich expects quaternions (you can use the helper function
angle_to_quatto convert Euler angles to quaternions)
update_vehiclefunction is removed
poll_sensorsnow does not return a value
Add Feature Overview notebook
Add argument checking to the IMU sensor
Add support for Mesh Roads
Add option to log BeamNGpy protocol messages
Fix duplicate logging when calling
Fix semantic annotations (supported maps are Italy and ECA)
Add option to teleport vehicle without resetting its physics state
Add option to set velocity of a vehicle by applying force to it
Support for updated ultrasonic sensor
New sensor API - LiDAR, ultrasonic sensor
Fix camera sensor creating three shared memories even when not needed
Add BeamNGpy feature overview example notebook
Remove research mod deployment and
setup-workspacephase of setup
(Experimental) Support for Linux BeamNG.tech servers
Hide menu on a scenario start
Do not detach the state sensor on disconnecting a vehicle, as this disallows the reuse of vehicle objects
Fix camera sensor logging error
Fix ‘Using mods with BeamNGpy’ demo notebook
Fix example notebooks
Fix and restructure
Add more verbose logging
Fix message chunking in networking
Update examples/tests to address GridMap being gone
Improve handling of userpath discovery and mod deployment
Adjust userpath handling according to changes in BeamNG.drive from 0.22 onwards
Overhaul documentation style and structure
Add function to set up userpath for BeamNG.tech usage
Add multicam test
Fix issue when multiple functions are waiting in researchGE.lua
Fix instance annotations always being rendered even when not desired
Swap client/server model to allow multiple BeamNGpy instances to connect to one running simulator simultaneously
Levelclass representing a level in the simulation
Scenarioclass to point to
Levelit is in
BeamNGpyclass to query available content
BeamNGpyclass to query running scenario
BeamNGpyclass to query active vehicles
SceneObjectclass to the
scenariomodule as a basis for the various types of objects in a scene in BeamNG.tech, currently including
BeamNGpyclass to enable querying objects in the active scene
BeamNGpyclass to visualize 3D gizmos in the simulator
Add Inertial Measurement Unit sensors
Add Ultrasonic Distance Measurement sensor
Add noise module to randomize sensor data for cameras and lidars
Add instance annotation option to
Camerasensor including methods to
draw_bboxesfor bounding-box-related operations based on semantic and instance annotations (limited to vehicles right now)
Add options to use only socket-based communication for
Add methods to configure BeamNG.tech’s Vehicle Stats Logger from BeamNGpy
Add FAQ to README
Add Contributor License Agreement and guidelines
Fix stray dependency on PyScaffold
Fix lidar points being visible in camera sensor images
Add function to switch current viewport to the relative camera mode with options to control the position of the camera
Add function to display debug lines in the environment
Add function to send Lua commands to be executed inside the simulation
Fix deterministic mode ignoring user-defined steps per second
apply_graphics_settingmethods including a usage example
Add option to specify rotations as quaternions where appropriate
Add example for querying the road network
Fix prefab compilation
Update vehicle state example
Fix decal road positioning
spawn_vehiclenot setting color and license plate correctly
spawn_vehiclerotation in degrees
Fix lidar visualizer using wrong buffer types in newer PyOpenGL version
Update values of Electrics sensor not following our naming conventions
Fix camera orientation issue
Add example for using the Camera sensor like a multishot camera
Fix spaces in vehicle names breaking the scenario prefab
Make BeamNGpy ship required Lua files and deploy them as a mod on launch
Add traffic controls
Add option to specify additional Lua extensions to load per vehicle
set_lightsmethod to vehicle class
Add test for setting lights
Add test for vehicle bounding box
Fix lack of __version__
Fix electrics sensor not returning values directly
Fix ai_set_script teleporting vehicle
Add option to pass additional Lua extensions to be loaded on startup
Fix waiting for vehicle spawn after changing parts to hang infinitely
Add option to disable node interpolation on roads
Add get_bbox() method to Vehicle class
Add option to specify road ID for placed DecalRoads
StaticObjectclass to scenario module that allows placement of static meshes
Add option for visualization to the Lidar sensor
Add helper functions to query scenario for certain objects in the world
Add example notebook showcasing procedural mesh and static mesh placement including a scenario camera
Fix vehicle state not being synchronized properly
Fix scenario unloading glitch
ai_drive_in_lanenot updating GUI state correctly
Fix camera sensor showing residual head-/taillight flare
Add functions to spawn/despawn vehicles during a scenario
Add script AI function to vehicle and update AI line example accordingly
Add function to change AI aggression
Add functions to place procedurally generated primitives in the environment
Add unit tests for sensors, scenarios, and vehicles
Fix scenario not being cleared when BeamNG instance is closed
Make scenario generation & loading respect user path setting
Add function to switch active vehicle
Add function to set position & orientation of the ingame camera
Add vehicle teleporting function to
Add time of day control
Add function to switch weather presets
Add function to await vehicle spawns
Expose part configuration options of vehicles
Expose current part configuration of vehicles
Add function to change part configuration of vehicles
Add function to change vehicle colour
Add more documentation
Make ai methods switch to appropriate modes
Add manual gear control
Add shift mode control
Add option to set target waypoint for builtin vehicle AI
Make shmem handle unique OS-wide
Make vehicle state being synched upon initial connection
Fix vehicle state not being updated on poll if only gameengine-specific sensors were attached.
Add vehicle-level state updates
Rework code to work with existing scenarios/vehicles
Add support to specify polyline with per-vertex speed to the AI
Add wait option to step function in
Add basic Lidar point cloud visualiser
Add AI control to vehicles
Add option to attach cameras to scenarios to render frames relative to world space
Restructure code to offer modular sensor model
Implement scenario class to specify and generate BeamNG scenarios
Implement vehicle class that offers control over vehicles and ways to dynamically de-/attach sensors
Implement shared memory communication to boost performance
Add Camera sensor with colour, depth, and annotation data
Add multi-cam support
Add lidar sensor
Add G-Force sensor
Add damage sensor
Add electrics sensor
Add control over simulation timescale and stepping through simulation at fixed rates
Add example code demonstrating scenario specification with control of a vehicle that has various sensors attached
Pass configured host and port to BeamNG.drive process.
BeamNGPynot checking if there’s even a process to be killed.
Fix messages being split incorrectly when the message happened to contain a newline through msgpack encoding.
consoleas one to allow running BeamNG.drive with the console flag.
Make BeamNGpy assume a running instance if binary is set to
Add option to change vehicle cursor
restart_scenariomethod to restart a running scenario
Add method to pause simulation
Add method to resume simulation
Add option to specify image size when requesting vehicle state
Add blocking method to get vehicle state
Add method to set relative camera
Add methods to hide/show HUD
Default to realistic gearbox behaviour
gearproperty to vehicle state
gearas an option to vehicle input representing the gear the vehicle is supposed to shift to.
Remove fstrings from documentation
Add option to override BeamNG.drive binary being called
Basic IPC and example functions