carla/PythonAPI/docs/world.yml

423 lines
12 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: int
doc: >
2019-07-05 20:53:24 +08:00
The 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-05 20:53:24 +08:00
Simulated seconds elapsed since the 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: int
2019-07-01 23:46:27 +08:00
- 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: >
2019-07-05 20:22:22 +08:00
Class that provides access to actors.
# - 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: >
2019-07-10 00:23:15 +08:00
More information in our [section](../configuring_the_simulation/)
# - PROPERTIES -------------------------
instance_variables:
- var_name: synchronous_mode
2019-07-04 21:50:10 +08:00
type: bool
doc: >
- var_name: no_rendering_mode
2019-07-04 21:50:10 +08:00
type: bool
doc: >
2019-07-09 20:50:10 +08:00
- var_name: fixed_delta_seconds
type: float
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: >
2019-07-09 20:50:10 +08:00
- param_name: fixed_delta_seconds
type: float
default: 0.0
doc: >
2019-07-01 23:46:27 +08:00
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: >
# --------------------------------------
2019-07-01 23:46:27 +08:00
- class_name: AttachmentType
# - DESCRIPTION ------------------------
doc: >
2019-07-09 23:23:35 +08:00
Class that defines the attachment options. See
[`world.spawn_actor`](#carla.World.spawn_actor)
2019-07-01 23:46:27 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: Rigid
doc: >
- var_name: SpringArm
doc: >
# --------------------------------------
- class_name: World
# - DESCRIPTION ------------------------
doc: >
# - PROPERTIES -------------------------
instance_variables:
- var_name: id
type: int
doc: >
2019-07-01 23:46:27 +08:00
The id of the episode associated with this world.
- var_name: debug
type: carla.DebugHelper
doc: >
# - METHODS ----------------------------
methods:
- def_name: get_blueprint_library
return: carla.BlueprintLibrary
doc: >
2019-07-05 20:22:22 +08:00
Return the list of blueprints available in this world. These blueprints
2019-07-05 20:53:24 +08:00
can be used to spawn actors into the world.
# --------------------------------------
- def_name: get_map
return: carla.Map
doc: >
2019-07-01 23:46:27 +08:00
Return the map that describes this world.
# --------------------------------------
- def_name: get_spectator
return: 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
return: carla.WorldSettings
doc: >
# --------------------------------------
- def_name: apply_settings
2019-07-06 00:55:26 +08:00
return: int
2019-07-01 23:46:27 +08:00
params:
- param_name: world_settings
type: carla.WorldSettings
doc: >
2019-07-06 00:55:26 +08:00
Returns the id of the frame when the settings took effect.
# --------------------------------------
- def_name: get_weather
return: 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: carla.WorldSnapshot
2019-07-01 23:46:27 +08:00
doc: >
Return a snapshot of the world at this moment.
# --------------------------------------
- def_name: get_actor
return: carla.Actor
2019-07-01 23:46:27 +08:00
params:
- param_name: actor_id
type: int
doc: >
2019-07-09 23:23:35 +08:00
Find actor by id, return None if not found.
# --------------------------------------
- def_name: get_actors
return: carla.ActorList
doc: >
2019-07-09 23:23:35 +08:00
By default it returns a list with every actor present in the world.
_A list of ids can be used as a parameter_
# --------------------------------------
- def_name: spawn_actor
return: carla.Actor
2019-07-01 23:46:27 +08:00
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
return: carla.Actor
2019-07-01 23:46:27 +08:00
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: >
2019-07-09 23:23:35 +08:00
Same as SpawnActor but return none on failure instead of throwing an
2019-07-01 23:46:27 +08:00
exception.
# --------------------------------------
- def_name: wait_for_tick
return: carla.WorldSnapshot
2019-07-01 23:46:27 +08:00
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-09 23:23:35 +08:00
return: int
2019-07-01 23:46:27 +08:00
params:
- param_name: callback
2019-07-09 23:23:35 +08:00
type: carla.WorldSnapshot
doc: >
2019-07-09 23:23:35 +08:00
Returns the ID of the callback so it can be removed with `remove_on_tick`.
# --------------------------------------
- def_name: remove_on_tick
params:
- param_name: callback_id
doc: >
Removes on tick callbacks.
# --------------------------------------
- def_name: tick
2019-07-06 00:55:26 +08:00
return: int
2019-07-01 23:46:27 +08:00
doc: >
2019-07-06 00:55:26 +08:00
Synchronizes with the simulator and returns the id of the newly started frame (only has effect on
2019-07-01 23:46:27 +08:00
synchronous mode).
# --------------------------------------
- def_name: __str__
doc: >
# --------------------------------------
- class_name: DebugHelper
# - DESCRIPTION ------------------------
doc: >
Class that provides drawing debug shapes.
# - 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
2019-07-13 00:25:05 +08:00
doc: >
_Deprecated, use `life_time=0` instead_
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
2019-07-13 00:25:05 +08:00
doc: >
_Deprecated, use `life_time=0` instead_
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
2019-07-13 00:25:05 +08:00
doc: >
_Deprecated, use `life_time=0` instead_
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
2019-07-13 00:25:05 +08:00
doc: >
_Deprecated, use `life_time=0` instead_
doc: >
# --------------------------------------
- def_name: draw_string
2019-07-01 23:46:27 +08:00
params:
2019-07-13 00:25:05 +08:00
- 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
doc: >
_Deprecated, set a high `life_time` instead_
doc: >
# --------------------------------------
2019-05-03 18:18:02 +08:00
...