From 8fd58b03d375b412b4641c75d5014237ed446fad Mon Sep 17 00:00:00 2001 From: Francesc Domene Date: Fri, 28 Jun 2019 12:07:28 +0200 Subject: [PATCH] Fix actor.yml --- Docs/python_api.md | 154 +++++++++++++++++++++++++++++---------- PythonAPI/docs/actor.yml | 2 + 2 files changed, 119 insertions(+), 37 deletions(-) diff --git a/Docs/python_api.md b/Docs/python_api.md index 708fb1c6a..a0db5d637 100644 --- a/Docs/python_api.md +++ b/Docs/python_api.md @@ -99,19 +99,19 @@ - [**semantic_tags**](#carla.Actor.semantic_tags) _Instance variable_ - [**is_alive**](#carla.Actor.is_alive) _Instance variable_ - [**attributes**](#carla.Actor.attributes) _Instance variable_ + - [**destroy**(**self**)](#carla.Actor.destroy) _Method_ - [**get_world**(**self**)](#carla.Actor.get_world) _Method_ - [**get_location**(**self**)](#carla.Actor.get_location) _Method_ - - [**get_transform**(**self**)](#carla.Actor.get_transform) _Method_ - [**get_velocity**(**self**)](#carla.Actor.get_velocity) _Method_ - [**get_angular_velocity**(**self**)](#carla.Actor.get_angular_velocity) _Method_ - [**get_acceleration**(**self**)](#carla.Actor.get_acceleration) _Method_ - - [**set_location**(**self**)](#carla.Actor.set_location) _Method_ - - [**set_transform**(**self**)](#carla.Actor.set_transform) _Method_ - - [**set_velocity**(**self**)](#carla.Actor.set_velocity) _Method_ - - [**set_angular_velocity**(**self**)](#carla.Actor.set_angular_velocity) _Method_ - - [**add_impulse**(**self**)](#carla.Actor.add_impulse) _Method_ - - [**set_simulate_physics**(**self**)](#carla.Actor.set_simulate_physics) _Method_ - - [**destroy**(**self**)](#carla.Actor.destroy) _Method_ + - [**set_location**(**self**, **location**)](#carla.Actor.set_location) _Method_ + - [**set_transform**(**self**, **transform**)](#carla.Actor.set_transform) _Method_ + - [**set_velocity**(**self**, **velocity**)](#carla.Actor.set_velocity) _Method_ + - [**set_angular_velocity**(**self**, **angular_velocity**)](#carla.Actor.set_angular_velocity) _Method_ + - [**add_impulse**(**self**, **impulse**)](#carla.Actor.add_impulse) _Method_ + - [**set_simulate_physics**(**self**, **enabled**=True)](#carla.Actor.set_simulate_physics) _Method_ + - [**\__str__**(**self**)](#carla.Actor.__str__) _Method_ - [**ActorAttribute**](#carla.ActorAttribute) _Class_ - [**id**](#carla.ActorAttribute.id) _Instance variable_ - [**type**](#carla.ActorAttribute.type) _Instance variable_ @@ -394,19 +394,21 @@ - [**get_group_traffic_lights**(**self**)](#carla.TrafficLight.get_group_traffic_lights) _Method_ - [**Vehicle**](#carla.Vehicle) _Class_ - [**bounding_box**](#carla.Vehicle.bounding_box) _Instance variable_ - - [**apply_control**(**self**)](#carla.Vehicle.apply_control) _Method_ + - [**apply_control**(**self**, **control**)](#carla.Vehicle.apply_control) _Method_ - [**get_control**(**self**)](#carla.Vehicle.get_control) _Method_ - - [**apply_physics_control**(**self**)](#carla.Vehicle.apply_physics_control) _Method_ + - [**apply_physics_control**(**self**, **physics_control**)](#carla.Vehicle.apply_physics_control) _Method_ - [**get_physics_control**(**self**)](#carla.Vehicle.get_physics_control) _Method_ - - [**set_autopilot**(**self**)](#carla.Vehicle.set_autopilot) _Method_ + - [**set_autopilot**(**self**, **enabled**=True)](#carla.Vehicle.set_autopilot) _Method_ - [**get_speed_limit**(**self**)](#carla.Vehicle.get_speed_limit) _Method_ - [**get_traffic_light_state**(**self**)](#carla.Vehicle.get_traffic_light_state) _Method_ - [**is_at_traffic_light**(**self**)](#carla.Vehicle.is_at_traffic_light) _Method_ - [**get_traffic_light**(**self**)](#carla.Vehicle.get_traffic_light) _Method_ + - [**\__str__**(**self**)](#carla.Vehicle.__str__) _Method_ - [**Walker**](#carla.Walker) _Class_ - [**bounding_box**](#carla.Walker.bounding_box) _Instance variable_ - - [**apply_control**(**self**)](#carla.Walker.apply_control) _Method_ + - [**apply_control**(**self**, **control**)](#carla.Walker.apply_control) _Method_ - [**get_control**(**self**)](#carla.Walker.get_control) _Method_ + - [**\__str__**(**self**)](#carla.Walker.__str__) _Method_ - [**commands**](#commands) _Module_ - [**ApplyAngularVelocity**](#commands.ApplyAngularVelocity) _Class_ - [**actor_id**](#commands.ApplyAngularVelocity.actor_id) _Instance variable_ @@ -620,29 +622,71 @@ All the possible lane types that OpenDRIVE accepts. --- ## carla.Actor _class_ +Base class for all actors. +Actor is anything that plays a role in the simulation and can be moved around, examples of actors are vehicles, pedestrians, and sensors.

Instance Variables

-- **id** -- **type_id** -- **parent** -- **semantic_tags** -- **is_alive** -- **attributes** +- **id** (_uint32_t_) +Unique id identifying this actor. Note ids are only unique during a given episode. +- **type_id** (_str_) +Id of the blueprint that created this actor, e.g. "vehicle.ford.mustang". +- **parent** (_[carla.Actor](#carla.Actor)_) +Parent actor of this instance, None if this instance is not attached to another actor. +- **semantic_tags** (_list(uint8_t)_) +List of semantic tags of all components of this actor, see semantic segmentation sensor for the list of available tags. E.g., a traffic light actor could contain "pole" and "traffic light" tags. +- **is_alive** (_bool_) +Return whether this object was destroyed using this actor handle. +- **attributes** (_dict_) +Dictionary of attributes of the blueprint that created this actor.

Methods

-- **get_world**(**self**) -- **get_location**(**self**) -- **get_transform**(**self**) -- **get_velocity**(**self**) -- **get_angular_velocity**(**self**) -- **get_acceleration**(**self**) -- **set_location**(**self**) -- **set_transform**(**self**) -- **set_velocity**(**self**) -- **set_angular_velocity**(**self**) -- **add_impulse**(**self**) -- **set_simulate_physics**(**self**) - **destroy**(**self**) +Tell the simulator to destroy this Actor, and return whether the actor was successfully destroyed. It has no effect if the Actor was already successfully destroyed. + - **Warning:** _This function blocks until the destruction operation is completed by the simulator. +_ +- **get_world**(**self**) +Return the world this actor belongs to. +- **get_location**(**self**) +Return the current transform of the actor. + - **Note:** _This function does not call the simulator, it returns the transform received in the last tick. +_ +- **get_velocity**(**self**) +Return the current 3D velocity of the actor. + - **Note:** _This function does not call the simulator, it returns the velocity received in the last tick. +_ +- **get_angular_velocity**(**self**) +Return the current 3D angular velocity of the actor. + - **Note:** _This function does not call the simulator, it returns the angular velocity received in the last tick. +_ +- **get_acceleration**(**self**) +Return the current 3D acceleration of the actor. + - **Note:** _This function does not call the simulator, it returns the acceleration received in the last tick. +_ +- **set_location**(**self**, **location**) +Teleport the actor to a given location. + - **Parameters:** + - `location` (_[carla.Location](#carla.Location)_) +- **set_transform**(**self**, **transform**) +Teleport the actor to a given transform. + - **Parameters:** + - `transform` (_[carla.Transform](#carla.Transform)_) +- **set_velocity**(**self**, **velocity**) +Set the actor's velocity. + - **Parameters:** + - `velocity` (_[carla.Vector3D](#carla.Vector3D)_) +- **set_angular_velocity**(**self**, **angular_velocity**) +Set the actor's angular velocity. + - **Parameters:** + - `angular_velocity` (_[carla.Vector3D](#carla.Vector3D)_) +- **add_impulse**(**self**, **impulse**) +Add impulse to the actor. + - **Parameters:** + - `impulse` (_[carla.Vector3D](#carla.Vector3D)_) +- **set_simulate_physics**(**self**, **enabled**=True) +Enable or disable physics simulation on this actor. + - **Parameters:** + - `enabled` (_bool_) +- **\__str__**(**self**) --- @@ -1138,7 +1182,7 @@ Weather cloudyness. Values range from 0 to 100. - **precipitation** (_float_) Precipitation amount for controlling rain intensity. Values range from 0 to 100. - **precipitation_deposits** (_float_) -Precipitation deposits for controlling the area of puddles on roads. +Precipitation deposits for controlling the area of puddles on roads. Values range from 0 to 100. - **wind_intensity** (_float_) Wind intensity. Values range from 0 to 100. - **sun_azimuth_angle** (_float_) @@ -1301,31 +1345,67 @@ Computes the Euclidean distance between the current location to another one. --- ## carla.Vehicle([carla.Actor](#carla.Actor)) _class_ +A vehicle actor.

Instance Variables

-- **bounding_box** +- **bounding_box** (_[carla.BoundingBox](#carla.BoundingBox)_) +Bounding box of the vehicle.

Methods

-- **apply_control**(**self**) +- **apply_control**(**self**, **control**) +Apply control to this vehicle. The control will take effect on next tick. + - **Parameters:** + - `control` (_[carla.VehicleControl](#carla.VehicleControl)_) - **get_control**(**self**) -- **apply_physics_control**(**self**) +Return the control last applied to this vehicle. + - **Note:** _This function does not call the simulator, it returns the data received in the last tick. +_ +- **apply_physics_control**(**self**, **physics_control**) +Apply physics control to this vehicle. The control will take effect on next tick. + - **Parameters:** + - `physics_control` (_[carla.VehiclePhysicsControl](#carla.VehiclePhysicsControl)_) - **get_physics_control**(**self**) -- **set_autopilot**(**self**) +Return the physics control last applied to this vehicle. + - **Warning:** _This function does call the simulator to retrieve the value._ +- **set_autopilot**(**self**, **enabled**=True) +Switch on/off this vehicle's server-side autopilot. + - **Parameters:** + - `enabled` (_bool_) - **get_speed_limit**(**self**) +Return the speed limit currently affecting this vehicle. Note that the speed limit is only updated when passing by a speed limit signal, right after spawning a vehicle it might not reflect the actual speed limit of the current road. + - **Note:** _This function does not call the simulator, it returns the data received in the last tick. +_ - **get_traffic_light_state**(**self**) +Return the state of the traffic light currently affecting this vehicle. If no traffic light is currently affecting the vehicle, return Green. + - **Note:** _This function does not call the simulator, it returns the data received in the last tick. +_ - **is_at_traffic_light**(**self**) +Return whether a traffic light is affecting this vehicle. + - **Note:** _This function does not call the simulator, it returns the data received in the last tick. +_ - **get_traffic_light**(**self**) +Retrieve the traffic light actor currently affecting this vehicle. +- **\__str__**(**self**) --- ## carla.Walker([carla.Actor](#carla.Actor)) _class_ +A walking actor, pedestrian.

Instance Variables

-- **bounding_box** +- **bounding_box** (_[carla.BoundingBox](#carla.BoundingBox)_) +Bounding box of the walker.

Methods

-- **apply_control**(**self**) +- **apply_control**(**self**, **control**) +Apply control to this walker. The control will take effect on next tick. + - **Parameters:** + - `control` (_[carla.WalkerControl](#carla.WalkerControl)_) - **get_control**(**self**) +Return the control last applied to this walker. + - **Note:** _This function does not call the simulator, it returns the data received in the last tick. +_ +- **\__str__**(**self**) --- diff --git a/PythonAPI/docs/actor.yml b/PythonAPI/docs/actor.yml index 1e712ae59..9c51eea29 100644 --- a/PythonAPI/docs/actor.yml +++ b/PythonAPI/docs/actor.yml @@ -159,6 +159,7 @@ doc: > Bounding box of the vehicle. # - METHODS ---------------------------- + methods: - def_name: apply_control params: - param_name: control @@ -246,6 +247,7 @@ doc: > Bounding box of the walker. # - METHODS ---------------------------- + methods: - def_name: apply_control params: - param_name: control