Updated command docs

This commit is contained in:
Marc Garcia Puig 2020-05-27 15:31:28 +02:00 committed by Jacopo Bartiromo
parent a9c0f51633
commit ed2f997f98
2 changed files with 45 additions and 0 deletions

View File

@ -2816,6 +2816,23 @@ If physics should be activated or not.
---
## command.SetVehicleLightState<a name="command.SetVehicleLightState"></a>
Command adaptation of **<font color="#7fb800">set_light_state()</font>** in [carla.Vehicle](#carla.Vehicle). Sets the light state of a vehicle.
<h3>Instance Variables</h3>
- <a name="command.SetVehicleLightState.actor_id"></a>**<font color="#f8805a">actor_id</font>** (_int_)
Actor that is affected by the command.
- <a name="command.SetVehicleLightState.light_state"></a>**<font color="#f8805a">light_state</font>** (_[carla.VehicleLightState](#carla.VehicleLightState)_)
Defines the light state of a vehicle.
<h3>Methods</h3>
- <a name="command.SetVehicleLightState.__init__"></a>**<font color="#7fb800">\__init__</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**actor**</font>, <font color="#00a6ed">**light_state**</font>)
- **Parameters:**
- `actor` (_[carla.Actor](#carla.Actor) or int_) Actor or its ID to whom the command will be applied to.
- `light_state` (_[carla.VehicleLightState](#carla.VehicleLightState)_) Recaps the state of the lights of a vehicle, these can be used as a flags.
---
## command.SpawnActor<a name="command.SpawnActor"></a>
Command adaptation of **<font color="#7fb800">spawn_actor()</font>** in [carla.World](#carla.World). Spawns an actor into the world based on the blueprint provided and the transform. If a parent is provided, the actor is attached to it.

View File

@ -364,4 +364,32 @@
doc: >
The Traffic Manager port where the vehicle is to be registered or unlisted. If __None__ is passed, it will consider a TM at default port `8000`.
# --------------------------------------
- class_name: SetVehicleLightState
# - DESCRIPTION ------------------------
doc: >
Command adaptation of **<font color="#7fb800">set_light_state()</font>** in carla.Vehicle. Sets the light state of a vehicle.
# - PROPERTIES -------------------------
instance_variables:
- var_name: actor_id
type: int
doc: >
Actor that is affected by the command.
- var_name: light_state
type: carla.VehicleLightState
doc: >
Defines the light state of a vehicle.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: actor
type: carla.Actor or int
doc: >
Actor or its ID to whom the command will be applied to.
- param_name: light_state
type: carla.VehicleLightState
doc: >
Recaps the state of the lights of a vehicle, these can be used as a flags.
# --------------------------------------
...