Updated documentation and changelog

This commit is contained in:
Axel1092 2020-07-09 11:02:39 +02:00 committed by Axel1092
parent 2d26512209
commit fcc5140873
4 changed files with 27 additions and 2 deletions

View File

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

View File

@ -1720,12 +1720,16 @@ Current state of the traffic light.
<h3>Methods</h3>
- <a name="carla.TrafficLight.freeze"></a>**<font color="#7fb800">freeze</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**freeze**</font>)
Stops the traffic light at its current state.
Stops all the traffic lights in the scene at their current state.
- **Parameters:**
- `freeze` (_bool_)
- <a name="carla.TrafficLight.is_frozen"></a>**<font color="#7fb800">is_frozen</font>**(<font color="#00a6ed">**self**</font>)
The client returns <b>True</b> if a traffic light is frozen according to last tick. The method does not call the simulator.
- **Return:** _bool_
- <a name="carla.TrafficLight.reset_group"></a>**<font color="#7fb800">reset_group</font>**(<font color="#00a6ed">**self**</font>)
Resets the state of the traffic lights of the group to the initial state at the start of the simulation.
- **Note:** <font color="#8E8E8E">_This function calls the simulator.
_</font>
<h5 style="margin-top: -20px">Getters</h5>
<div style="padding-left:30px;margin-top:-25px"></div>- <a name="carla.TrafficLight.get_elapsed_time"></a>**<font color="#7fb800">get_elapsed_time</font>**(<font color="#00a6ed">**self**</font>)
@ -2500,6 +2504,10 @@ Same as **<font color="#7fb800">spawn_actor()</font>** but returns <b>None</b> 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)_
- <a name="carla.World.freeze_all_traffic_lights"></a>**<font color="#7fb800">freeze_all_traffic_lights</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**frozen**</font>)
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_)
<h5 style="margin-top: -20px">Getters</h5>
<div style="padding-left:30px;margin-top:-25px"></div>- <a name="carla.World.get_actor"></a>**<font color="#7fb800">get_actor</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**actor_id**</font>)

View File

@ -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: >

View File

@ -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: >