From fcc5140873f50a8a262d68c9beab0e237726ca8f Mon Sep 17 00:00:00 2001 From: Axel1092 Date: Thu, 9 Jul 2020 11:02:39 +0200 Subject: [PATCH] Updated documentation and changelog --- CHANGELOG.md | 4 ++++ Docs/python_api.md | 10 +++++++++- PythonAPI/docs/actor.yml | 8 +++++++- PythonAPI/docs/world.yml | 7 +++++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe609508a..014f7ec13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Latest + * Fixed a bug where `get_traffic_light` would always return `None` + * Changed frozen behavior for traffic lights. It now affects to all traffic lights at the same time + * Added API function `freeze_all_traffic_lights` and `reset_group` + * Fixed recorder determinism problems * Added Light ids * Added vehicle light and street light data to recorder * Added API function `add_angular_impulse()` to add angular impulse to any actor diff --git a/Docs/python_api.md b/Docs/python_api.md index f5a8ed9a8..b4869c160 100644 --- a/Docs/python_api.md +++ b/Docs/python_api.md @@ -1720,12 +1720,16 @@ Current state of the traffic light.

Methods

- **freeze**(**self**, **freeze**) -Stops the traffic light at its current state. +Stops all the traffic lights in the scene at their current state. - **Parameters:** - `freeze` (_bool_) - **is_frozen**(**self**) The client returns True if a traffic light is frozen according to last tick. The method does not call the simulator. - **Return:** _bool_ +- **reset_group**(**self**) +Resets the state of the traffic lights of the group to the initial state at the start of the simulation. + - **Note:** _This function calls the simulator. +_
Getters
- **get_elapsed_time**(**self**) @@ -2500,6 +2504,10 @@ Same as **spawn_actor()** but returns None o - `attach_to` (_[carla.Actor](#carla.Actor)_) – The parent object that the spawned actor will follow around. - `attachment` (_[carla.AttachmentType](#carla.AttachmentType)_) – Determines how fixed and rigorous should be the changes in position according to its parent object. - **Return:** _[carla.Actor](#carla.Actor)_ +- **freeze_all_traffic_lights**(**self**, **frozen**) +Freezes or unfreezes all traffic lights in the scene. Frozen traffic lights can be modified by the user but the time will not update them until unfrozen. + - **Parameters:** + - `frozen` (_bool_)
Getters
- **get_actor**(**self**, **actor_id**) diff --git a/PythonAPI/docs/actor.yml b/PythonAPI/docs/actor.yml index f88197130..6fd9f1a1d 100644 --- a/PythonAPI/docs/actor.yml +++ b/PythonAPI/docs/actor.yml @@ -356,7 +356,7 @@ - param_name: freeze type: bool doc: > - Stops the traffic light at its current state. + Stops all the traffic lights in the scene at their current state. # -------------------------------------- - def_name: is_frozen return: bool @@ -375,6 +375,12 @@ note: > This function calls the simulator. # -------------------------------------- + - def_name: reset_group + doc: > + Resets the state of the traffic lights of the group to the initial state at the start of the simulation. + note: > + This function calls the simulator. + # -------------------------------------- - def_name: get_pole_index return: int doc: > diff --git a/PythonAPI/docs/world.yml b/PythonAPI/docs/world.yml index f8af41393..8cf6f2e2f 100644 --- a/PythonAPI/docs/world.yml +++ b/PythonAPI/docs/world.yml @@ -318,6 +318,13 @@ doc: > Returns an instance of carla.LightManager that can be used to handle the lights in the scene. # -------------------------------------- + - def_name: freeze_all_traffic_lights + params: + - param_name: frozen + type: bool + doc: > + Freezes or unfreezes all traffic lights in the scene. Frozen traffic lights can be modified by the user but the time will not update them until unfrozen. + # -------------------------------------- - def_name: get_map return: carla.Map doc: >