Beamngpy

Latest version: v1.30

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

Scan your dependencies

Page 1 of 9

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

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``

Page 1 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.