Beamngpy

Latest version: v1.31

Safety actively analyzes 710445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 10

1.31

============
- Changed the default BeamNGpy TCP port to a non-ephemeral port **25252**. This should fix the "permission denied" error while trying to open a BeamNGpy connection. Please update your scripts appropriately (you can keep using the previous default port 64256 without issues).
- Various Linux fixes and a Docker template released, read the `BeamNG.tech 0.34 changelog <https://beamng.tech/blog/beamng-tech-034/>`__ for details.
- New version of `RoadsSensor <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#roads-sensor>`__ with:

- spline interpolation for road width
- filtered heading error
- linear interpolation for curvature estimation
- bugs fixed
- new output added ``numlane`` (number of lanes in current travel direction)

- Added Camera/Lidar/Radar outputs to the `Tech Capture Player <https://documentation.beamng.com/beamng_tech/beamngpy/tools/capture_player/>`__.
- Fixed Radar sensor outputs on Vulkan.
- Fixed captures on case-sensitive filesystems.
- Fixed scenario loading on case-sensitive filesystems.
- Fixed some issues related to blocking in the BeamNGpy protocol on Lua side.
- Optimized TCP buffer copying on Lua side.
- Fixed hanging caused by `BeamNGpy.scenario.start() <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.api.beamng.ScenarioApi.start>`__ in some cases.
- `BeamNGpy.control.queue_lua_command <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.api.beamng.ControlApi.queue_lua_command>`__ and `Vehicle.queue_lua_command <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.Vehicle.queue_lua_command>`__ now accept the ``response`` argument to get Lua responses from the simulator.
- `BeamNGpy.open <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.BeamNGpy.open>`__ now loads the extensions specified in the ``extensions`` argument also in the case the simulator was already open.
- Fixed BeamNGpy examples which were using an invalid navigation waypoint on the ``west_coast_usa`` map.
- Fixed `BeamNGpy.scenario.load <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.api.beamng.ScenarioApi.load>`__ when the scenario was located in a non-standard location.
- Fixed the `ai_line.py <https://github.com/BeamNG/BeamNGpy/blob/v1.31/examples/ai_line.py>`__ example to have an end.
- `Vehicle.set_license_plate <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.api.beamng.VehiclesApi.set_license_plate>`__ now raises an error if the license plate cannot be set (when the "Dynamic license plates" option is disabled).
- Fixed the `beamngpyDissector.lua <https://github.com/BeamNG/BeamNGpy/tree/v1.31/debug>`__ debug plugin to properly parse ``GetScenarios`` and other messages.
- Updated most BeamNGpy examples.
- Fixed the warnings related to resources cleanup (shared memory, sockets, processes) on closing.
- **Known issues:**

- Some multi-sensor configurations on Vulkan can cause BeamNG to stop responding.
- The annotation camera doesn't update in some multi-sensor configurations.

1.30

============
- BeamNGpy sensors are supported on Vulkan and Linux now.

- including shared memory
- **Known issues:**

- ``Radar`` sensor doesn't return any data on Vulkan
- ``Camera`` sensor doesn't work correctly with annotations on
- Added a new API for attaching and detaching couplers: `CouplersApi <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.api.vehicle.CouplersApi>`__.
- Added a flag to disable `RoadsSensor <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#roads-sensor>`__ debug visualization.
- Fixed `BeamNGpy.scenario.restart <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.Scenario.restart>`__ breaking some keyboard shortcuts after calling it.
- The `BeamNGpy <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.BeamNGpy>`__ and `Vehicle <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.Vehicle>`__ objects are threadsafe now.
- Fixed the `set_part_config <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.Vehicle.set_part_config>`__ function losing the connection to the `Vehicle <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.Vehicle>`__ object
- Fixed `Lidar <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#lidar>`__ with ``is_streaming=True``.
- New tool for recording/replaying BeamNGpy protocol runs - `Tech Capture Player <https://documentation.beamng.com/beamng_tech/beamngpy/tools/capture_player/>`__.
- New debugging tool for BeamNGpy communication - Wireshark plugin:

- decodes all messages exchanged between BeamNGpy and BeamNG
- included with instructions in the `debug <https://github.com/BeamNG/BeamNGpy/tree/v1.30/debug>`__ folder of the BeamNGpy repository
- The ``determine_userpath`` function is skipped on Linux
- Renamed the ``crash_lua_on_error`` argument of `BeamNGpy <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.BeamNGpy>`__ to ``debug``, as the argument also changes other behavior (it starts recording the Tech Captures).

1.29

============
- Added documentation on the sensors output signals.
- Added the ``postprocess_depth`` flag to the `Camera <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#camera>`__ sensor, which makes the distinction of the depth image clearer, but is computationally intensive (off by default)
- Added ``time`` as a field of the `State <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.sensors.State>`__ sensor, represents the current simulation time (which is different from the ``Timer`` sensor representing the time since the scenario start)
- Added new flag to automated sensors: ``is_dir_world_space``

- ``False`` by default; if ``True``, then the ``dir`` argument of the sensors represents the world space direction instead of the vehicle space direction vector

- Updated `change_settings.py <https://github.com/BeamNG/BeamNGpy/blob/v1.29/examples/change_settings.py>`__ example with setting a windowed mode resolution
- Examples changed to use the new Tech Ground level (``tech_ground``) instead of the Smallgrid (``smallgrid``). We encourage the users to use the Tech Ground level as the default flat level in BeamNG.tech for the improved support of annotations and materials.

- `BeamNGpy.scenario.load <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.api.beamng.ScenarioApi.load>`__ does not resume the physics anymore

- to pause the physics (`BeamNGpy.control.pause() <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.api.beamng.ControlApi.pause>`__) and allow stepping (`BeamNGpy.control.step() <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.api.beamng.ControlApi.step>`__), it is preferred to call ``BeamNGpy.control.pause()`` before ``BeamNGpy.scenario.load()`` )

- Bugfixes

- RADAR now works without shared memory.
- Fixed ``find_objects_class`` when getting data from the simulator.
- Fixed IdealRADAR with ``is_send_immediately=True``.
- Fixed ``BeamNGpy.scenario.delete`` not deleting the prefab file.
- BeamNGpy functions using the ``cling=True`` argument should behave more reasonably when finding the ground level

- the ``cling=True`` argument still does not work for ``Scenario.add_vehicle``

- Removals/Deprecations

- Removed the IMU sensor. The `AdvancedIMU <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#advanced-imu>`__ is a replacement with more features.
- Removed examples which used the deprecated old IMU sensor.
- Removed LidarVisualizer and the pyopengl dependency

1.28

============
- Functionality added to allow the import of heightmaps (from 2D Python arrays).
- Optimized network communication by removing extra acknowledgement messages.
- The way of launching BeamNG.tech from BeamNGpy has changed. If you are launching BeamNG.tech
without BeamNGpy and want to connect BeamNGpy later, you should change the command-line arguments
you are using to:

``BeamNG.tech.x64.exe -console -nosteam -tcom-listen-ip 127.0.0.1 -lua extensions.load('tech/techCore');tech_techCore.openServer(64256)``
- Added scenarios on ``IdealRADAR`` sensor use, to `plot radar data <https://github.com/BeamNG/BeamNGpy/blob/v1.28/examples/IdealRADARSensor_plot_data.py>`__ and `track objects <https://github.com/BeamNG/BeamNGpy/blob/v1.28/examples/IdealRADARSensor_IDs_tracking.py>`__.
- Added `scenario <https://github.com/BeamNG/BeamNGpy/blob/v1.28/examples/roads_plot.py>`__ on road profile plotting.

- Bugfixes

- The `Vehicle.logging <beamngpy.htmlbeamngpy.api.vehicle.LoggingApi>`__ module has been fixed and is usable again.
- Fixed OpenStreetMap importer to manage mixed data as input in some cases.

1.27.1

==============
- `Camera <beamngpy.htmlcamera>`__ sensor improvements

- Added the `Camera.stream <beamngpy.htmlbeamngpy.sensors.Camera.stream>`__ function
for easier retrieval of camera images being streamed through shared memory

- Added the `Camera.poll_raw <beamngpy.htmlbeamngpy.sensors.Camera.poll_raw>`__ and
`Camera.stream_raw <beamngpy.htmlbeamngpy.sensors.Camera.stream_raw>`__ functions
for getting raw bytes from the simulator, the conversion to a bitmap image is skipped

- Added the ``camera_streaming.py`` `example <https://github.com/BeamNG/BeamNGpy/blob/v1.27.1/examples/camera_streaming.py>`__
to showcase these functions

1.27

============

- New features

- `GPS <beamngpy.htmlgps>`__ sensor added

- check the `documentation <beamngpy.htmlgps>`__ or the ``GPS_trajectory.py`` `example script <https://github.com/BeamNG/BeamNGpy/tree/master/examples/GPS_trajectory.py>`__ for more information on usage

- `RoadsSensor <beamngpy.htmlroads-sensor>`__ sensor added
- `IdealRadar <beamngpy.htmlideal-radar>`__ 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 <https://github.com/BeamNG/BeamNGpy/tree/master/examples/scenario_control.ipynb>`__ example notebook to learn more.
- Beam stresses added as a mode to the ``AdvancedIMU`` sensor.
- 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

- `Impactgen <https://github.com/BeamNG/impactgen>`__: A script to generate various vehicle impact scenarios and output surround views of the affected vehicle in color and semantically annotated images.
- `BeamNG.gym <https://github.com/BeamNG/BeamNG.gym>`__: A collection of Gymnasium environments that cover various driving tasks simulated in BeamNG.tech.

- API changes

- Relative camera interface changed to use vectors instead of quaternions.
- 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.
- Function added to the ``Vehicle`` class to deflate vehicle tires, e.g. to simulate tire blowout.

- Bugfixes

- Fixed a bug where loading a BeamNGpy scenario could cause an infinite-loading screen glitch.
- Fixed the ``Mesh`` sensor 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 ``AdvancedIMU`` sensor, when using gravity. Did not work from BeamNGpy before.
- Bug fixed with ``AdvancedIMU`` sensor, relating to the smoothing not working from BeamNGpy.
- Bug fixed with the relative camera, which was not operating correctly.

- Miscellaneous

- 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_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 <https://github.com/BeamNG/BeamNGpy/pull/229>`__!)

Page 1 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.