carla/PythonAPI/docs/world.yml

389 lines
11 KiB
YAML
Raw Normal View History

2019-05-03 18:18:02 +08:00
---
- module_name: carla
doc: >
# - CLASSES ------------------------------
classes:
- class_name: Timestamp
# - DESCRIPTION ------------------------
doc: >
# - PROPERTIES -------------------------
instance_variables:
2019-07-01 23:46:27 +08:00
- var_name: frame
type: size_t
doc: >
2019-07-01 23:46:27 +08:00
Number of frames elapsed since the simulator was launched.
- var_name: elapsed_seconds
2019-07-01 23:46:27 +08:00
type: float
doc: >
2019-07-01 23:46:27 +08:00
Simulated seconds elapsed since the beginning of the current episode.
- var_name: delta_seconds
2019-07-01 23:46:27 +08:00
type: float
doc: >
2019-07-01 23:46:27 +08:00
Simulated seconds elapsed since previous frame.
- var_name: platform_timestamp
2019-07-01 23:46:27 +08:00
type: float
doc: >
2019-07-01 23:46:27 +08:00
Time-stamp of the frame at which this measurement was taken, in seconds
as given by the OS.
# - METHODS ----------------------------
methods:
2019-07-01 23:46:27 +08:00
- def_name: __init__
params:
- param_name: frame
type: size_t
- param_name: elapsed_seconds
type: float
- param_name: delta_seconds
type: float
- param_name: platform_timestamp
type: float
doc: >
# --------------------------------------
- def_name: __eq__
2019-07-01 23:46:27 +08:00
params:
- param_name: other
type: carla.Timestamp
doc: >
# --------------------------------------
- def_name: __ne__
2019-07-01 23:46:27 +08:00
params:
- param_name: other
type: carla.Timestamp
doc: >
# --------------------------------------
- def_name: __str__
doc: >
# --------------------------------------
- class_name: ActorList
# - DESCRIPTION ------------------------
doc: >
# - METHODS ----------------------------
methods:
- def_name: find
2019-07-01 23:46:27 +08:00
params:
- param_name: actor_id
type: int
doc: >
# --------------------------------------
- def_name: filter
2019-07-01 23:46:27 +08:00
params:
- param_name: wildcard_pattern
type: str
doc: >
# --------------------------------------
- def_name: __getitem__
2019-07-01 23:46:27 +08:00
params:
- param_name: pos
doc: >
# --------------------------------------
- def_name: __len__
doc: >
# --------------------------------------
- def_name: __iter__
doc: >
# --------------------------------------
2019-07-01 23:46:27 +08:00
- def_name: __str__
doc: >
# --------------------------------------
- class_name: WorldSettings
# - DESCRIPTION ------------------------
doc: >
# - PROPERTIES -------------------------
instance_variables:
- var_name: synchronous_mode
doc: >
- var_name: no_rendering_mode
doc: >
# - METHODS ----------------------------
methods:
2019-07-01 23:46:27 +08:00
- def_name: __init__
params:
- param_name: synchronous_mode
type: bool
default: false
doc: >
- param_name: no_rendering_mode
type: bool
default: false
doc: >
doc: >
# --------------------------------------
- def_name: __eq__
2019-07-01 23:46:27 +08:00
params:
- param_name: other
type: carla.Timestamp
doc: >
# --------------------------------------
- def_name: __ne__
2019-07-01 23:46:27 +08:00
params:
- param_name: other
type: carla.Timestamp
doc: >
# --------------------------------------
- class_name: AttachmentType
# - DESCRIPTION ------------------------
doc: >
# - PROPERTIES -------------------------
instance_variables:
- var_name: Rigid
doc: >
- var_name: SpringArm
doc: >
# --------------------------------------
- class_name: World
# - DESCRIPTION ------------------------
doc: >
# - PROPERTIES -------------------------
instance_variables:
- var_name: id
doc: >
2019-07-01 23:46:27 +08:00
The id of the episode associated with this world.
- var_name: debug
doc: >
# - METHODS ----------------------------
methods:
- def_name: get_blueprint_library
2019-07-01 23:46:27 +08:00
return_type: carla.BlueprintLibrary
doc: >
2019-07-01 23:46:27 +08:00
Return the list of blueprints available in this world. This blueprints
can be used to spawning actor into the world.
# --------------------------------------
- def_name: get_map
2019-07-01 23:46:27 +08:00
return_type: carla.Map
doc: >
2019-07-01 23:46:27 +08:00
Return the map that describes this world.
# --------------------------------------
- def_name: get_spectator
2019-07-01 23:46:27 +08:00
return_type: carla.Actor
doc: >
2019-07-01 23:46:27 +08:00
Return the spectator actor. The spectator controls the view in the
simulator window.
# --------------------------------------
- def_name: get_settings
2019-07-01 23:46:27 +08:00
return_type: carla.WorldSettings
doc: >
# --------------------------------------
- def_name: apply_settings
2019-07-01 23:46:27 +08:00
params:
- param_name: world_settings
type: carla.WorldSettings
doc: >
# --------------------------------------
- def_name: get_weather
2019-07-01 23:46:27 +08:00
return_type: carla.WeatherParameters
doc: >
2019-07-01 23:46:27 +08:00
Retrieve the weather parameters currently active in the world.
# --------------------------------------
- def_name: set_weather
2019-07-01 23:46:27 +08:00
params:
- param_name: weather
type: carla.WeatherParameters
doc: >
Change the weather in the simulation.
# --------------------------------------
- def_name: get_snapshot
return_type: carla.WorldSnapshot
doc: >
Return a snapshot of the world at this moment.
# --------------------------------------
- def_name: get_actor
return_type: carla.Actor
params:
- param_name: actor_id
type: int
doc: >
2019-07-01 23:46:27 +08:00
Find actor by id, return nullptr if not found.
# --------------------------------------
- def_name: get_actors
2019-07-01 23:46:27 +08:00
return_type: carla.ActorList
doc: >
2019-07-01 23:46:27 +08:00
Return a list with all the actors currently present in the world.
# --------------------------------------
- def_name: get_actors
2019-07-01 23:46:27 +08:00
return_type: carla.ActorList
params:
- param_name: actor_ids
type: list(int)
doc: >
2019-07-01 23:46:27 +08:00
Return a list with the actors requested by ActorId.
# --------------------------------------
- def_name: spawn_actor
2019-07-01 23:46:27 +08:00
return_type: carla.Actor
params:
- param_name: blueprint
type: carla.BlueprintLibrary
doc: >
- param_name: transform
type: carla.Transform
doc: >
If attached to parent, transform acts like a relative_transform to the parent actor.
- param_name: attach_to
type: carla.Actor
default: None
doc: >
- param_name: attachment
type: carla.AttachmentType
default: Rigid
doc: >
doc: >
Spawn an actor into the world based on the blueprint provided at
transform. If a parent is provided, the actor is attached to
parent.
# --------------------------------------
- def_name: try_spawn_actor
2019-07-01 23:46:27 +08:00
return_type: carla.Actor
params:
- param_name: blueprint
type: carla.BlueprintLibrary
doc: >
- param_name: transform
type: carla.Transform
doc: >
If attached to parent, transform acts like a relative_transform to the parent actor.
- param_name: attach_to
type: carla.Actor
default: None
doc: >
- param_name: attachment
type: carla.AttachmentType
default: Rigid
doc: >
doc: >
Same as SpawnActor but return nullptr on failure instead of throwing an
exception.
# --------------------------------------
- def_name: wait_for_tick
2019-07-01 23:46:27 +08:00
return_type: carla.WorldSnapshot
params:
- param_name: seconds
type: float
default: 10.0
doc: >
2019-07-01 23:46:27 +08:00
Block calling thread until a world tick is received.
# --------------------------------------
- def_name: on_tick
2019-07-01 23:46:27 +08:00
params:
- param_name: callback
doc: >
2019-07-01 23:46:27 +08:00
Register a callback to be called every time a world tick is received.
# --------------------------------------
- def_name: tick
2019-07-01 23:46:27 +08:00
doc: >
Signal the simulator to continue to next tick (only has effect on
synchronous mode).
# --------------------------------------
- def_name: __str__
doc: >
# --------------------------------------
- class_name: DebugHelper
# - DESCRIPTION ------------------------
doc: >
# - METHODS ----------------------------
methods:
- def_name: draw_point
2019-07-01 23:46:27 +08:00
params:
- param_name: location
type: carla.Location
- param_name: size
type: float
default: 0.1f
- param_name: color
type: carla.Color
default: (255,0,0)
- param_name: life_time
type: float
default: -1.0f
- param_name: persistent_lines
type: bool
default: True
doc: >
# --------------------------------------
- def_name: draw_line
2019-07-01 23:46:27 +08:00
params:
- param_name: begin
type: carla.Location
- param_name: end
type: carla.Location
- param_name: thickness
type: float
default: 0.1f
- param_name: color
type: carla.Color
default: (255,0,0)
- param_name: life_time
type: float
default: -1.0f
- param_name: persistent_lines
type: bool
default: True
doc: >
# --------------------------------------
- def_name: draw_arrow
2019-07-01 23:46:27 +08:00
params:
- param_name: begin
type: carla.Location
- param_name: end
type: carla.Location
- param_name: thickness
type: float
default: 0.1f
- param_name: arrow_size
type: float
default: 0.1f
- param_name: color
type: carla.Color
default: (255,0,0)
- param_name: life_time
type: float
default: -1.0f
- param_name: persistent_lines
type: bool
default: True
doc: >
# --------------------------------------
- def_name: draw_box
2019-07-01 23:46:27 +08:00
params:
- param_name: box
type: carla.BoundingBox
- param_name: rotation
type: carla.Rotation
- param_name: thickness
type: float
default: 0.1f
- param_name: color
type: carla.Color
default: (255,0,0)
- param_name: life_time
type: float
default: -1.0f
- param_name: persistent_lines
type: bool
default: True
doc: >
# --------------------------------------
- def_name: draw_string
2019-07-01 23:46:27 +08:00
params:
- param_name: location
type: carla.Location
- param_name: text
type: str
- param_name: draw_shadow
type: bool
default: False
- param_name: color
type: carla.Color
default: (255,0,0)
- param_name: life_time
type: float
default: -1.0f
- param_name: persistent_lines
type: bool
default: true
# --------------------------------------
2019-05-03 18:18:02 +08:00
...