Beamngpy

Latest version: v1.28

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

Scan your dependencies

Page 1 of 9

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>`__!)

1.26.1

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

- New features

- 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

- Improved/added documentation

- ``Scenario`` class now has all parameters documented.
- ``BeamNGpy.debug`` API methods are now documented
- ``BeamNGpy.env`` now contains more information about the 'time of day' object
- Added documentation for RADAR and Mesh sensors

- ``Vehicle.set_part_config`` now 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 ``pytest`` framework

- 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 ``/`` character
- Added new options to ``BeamNGpy.scenario.load`` called ``connect_player_vehicle`` and ``connect_existing_vehicles``

- ``connect_player_vehicle`` is ``True`` by default and it connects the player vehicle to the simulation after scenario load
- ``connect_existing_vehicles`` is ``True`` by default and it connects all the already existing vehicles to the simulation after scenario load
- setting these options to ``False`` can reduce the loading time by skipping the connection-establishing part, and these vehicles can still be connected manually using ``Vehicle.connect``

- Added ``crash_lua_on_error`` option to the BeamNGpy constructor

- behaves in the same way as the option of the same name in ``BeamNGpy.open``

1.26

============
- 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 <https://github.com/BeamNG/BeamNGpy/blob/master/examples/radar_analysis.ipynb>`__ 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 <https://github.com/BeamNG/BeamNGpy/blob/master/examples/vehicle_mesh_data.py>`__ 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
- 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 <https://beamngpy.readthedocs.io/en/latest/beamngpy.html#beamngpy.tools.RoadNetworkExporter>`_ 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_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 and crashes 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.

1.25.1

==============
- 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_axis`` function to flip it
- fixed ``BeamNGpy.vehicles.replace`` to respect vehicle color and license plate text

Page 1 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.