From e813b913de42397674635ea2a9da24a4b563b4a7 Mon Sep 17 00:00:00 2001 From: Adam Ivora Date: Mon, 7 Oct 2024 11:49:46 +0200 Subject: [PATCH] Fix docs --- CHANGELOG.rst | 14 +++++++++++- src/beamngpy/beamng/beamng.py | 43 ++++++++++++++++------------------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8289b76..d9f9341 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,7 +4,19 @@ Changelog Version 1.30 ============ -TODO +- Added a new API for attaching and detaching `couplers`. +- Added a flag to disable `RoadsSensor `__ debug visualization. +- Fixed `BeamNGpy.scenario.restart `__ breaking some keyboard shortcuts after calling it. +- The `BeamNGpy `__ and `Vehicle `__ objects are threadsafe now. +- Fixed the `set_part_config `__ function losing the connection to the `Vehicle `__ object +- Fixed `Lidar `__ with ``is_streaming=True``. +- New tool for recording/replaying BeamNGpy protocol runs - `Tech Capture Player `__. +- New debugging tool for BeamNGpy communication - Wireshark plugin: + + - decodes all messages exchanged between BeamNGpy and BeamNG + - included with instructions in the `debug `__ folder of the BeamNGpy repository +- The ``determine_userpath`` function is skipped on Linux +- Renamed the ``crash_lua_on_error`` argument of `BeamNGpy `__ to ``debug``, as the argument also changes other behavior (it starts recording the Tech Captures). Version 1.29 ============ diff --git a/src/beamngpy/beamng/beamng.py b/src/beamngpy/beamng/beamng.py index 21fdeaa..1343b1e 100644 --- a/src/beamngpy/beamng/beamng.py +++ b/src/beamngpy/beamng/beamng.py @@ -9,18 +9,9 @@ from time import sleep from typing import TYPE_CHECKING, Any, List -from beamngpy.api.beamng import ( - CameraApi, - ControlApi, - DebugApi, - EnvironmentApi, - ScenarioApi, - SettingsApi, - SystemApi, - TrafficApi, - UiApi, - VehiclesApi, -) +from beamngpy.api.beamng import (CameraApi, ControlApi, DebugApi, + EnvironmentApi, ScenarioApi, SettingsApi, + SystemApi, TrafficApi, UiApi, VehiclesApi) from beamngpy.beamng import filesystem from beamngpy.connection import Connection from beamngpy.logging import LOGGER_ID, BNGError, create_warning @@ -60,11 +51,13 @@ class BeamNGpy: quit_on_close: Whether the simulator should be closed when :func:`close()` is called. Defaults to True. debug: If True, then sets BeamNG.tech communication to debug mode. That means: - 1. BeamNG will not respond to BeamNGpy requests when a Lua error - happens and prints the stacktrace instead. - 2. The `techCapture.*.log` files are created automatically in the userfolder, - they log every protocol call and can be replayed using the `tech/capturePlayer` - Lua extension. + + 1. BeamNG will not respond to BeamNGpy requests when a Lua error + happens and prints the stacktrace instead. + 2. The ``techCapture.*.log`` files are created automatically in the userfolder, + they log every protocol call and can be replayed using the ``tech/capturePlayer`` + Lua extension. + This option is applicable only when the process is launched by this instance of BeamNGpy, as it sets a launch argument of the process. Defaults to False. @@ -156,13 +149,15 @@ def open( launch: Whether to launch a new process or connect to a running one on the configured host/port. Defaults to True. debug: If True, then sets BeamNG.tech communication to debug mode. That means: - 1. BeamNG will not respond to BeamNGpy requests when a Lua error - happens and prints the stacktrace instead. - 2. The `techCapture.*.log` files are created automatically in the userfolder, - they log every protocol call and can be replayed using the `tech/capturePlayer` - Lua extension. - This option is applicable only when the process is launched by this instance - of BeamNGpy, as it sets a launch argument of the process. Defaults to False. + + 1. BeamNG will not respond to BeamNGpy requests when a Lua error + happens and prints the stacktrace instead. + 2. The ``techCapture.*.log`` files are created automatically in the userfolder, + they log every protocol call and can be replayed using the ``tech/capturePlayer`` + Lua extension. + + This option is applicable only when the process is launched by this instance + of BeamNGpy, as it sets a launch argument of the process. Defaults to False. listen_ip: The IP address that the BeamNG process will be listening on. Only relevant when ``launch`` is True. Set to ``*`` if you want BeamNG to listen on ALL network interfaces. """