--- - module_name: carla doc: > # - CLASSES ------------------------------ classes: - class_name: Timestamp # - DESCRIPTION ------------------------ doc: > Class that contains Timestamp simulated data. # - PROPERTIES ------------------------- instance_variables: - var_name: frame type: int doc: > The number of frames elapsed since the simulator was launched. - var_name: elapsed_seconds type: float doc: > Simulated seconds elapsed since the beginning of the current episode. - var_name: delta_seconds type: float doc: > Simulated seconds elapsed since the previous frame. - var_name: platform_timestamp type: float doc: > Time-stamp of the frame at which this measurement was taken, in seconds as given by the OS. # - METHODS ---------------------------- methods: - def_name: __init__ params: - param_name: frame type: int - param_name: elapsed_seconds type: float - param_name: delta_seconds type: float - param_name: platform_timestamp type: float doc: > # -------------------------------------- - def_name: __eq__ params: - param_name: other type: carla.Timestamp doc: > # -------------------------------------- - def_name: __ne__ params: - param_name: other type: carla.Timestamp doc: > # -------------------------------------- - def_name: __str__ doc: > # -------------------------------------- - class_name: ActorList # - DESCRIPTION ------------------------ doc: > Class that provides access to actors. # - METHODS ---------------------------- methods: - def_name: find params: - param_name: actor_id type: int doc: > Find an actor by ID. # -------------------------------------- - def_name: filter params: - param_name: wildcard_pattern type: str doc: > Filters a list of Actors with type_id matching wildcard_pattern. note: > The wildcard_pattern follows Unix shell-style wildcards (fnmatch). # -------------------------------------- - def_name: __getitem__ params: - param_name: pos type: int doc: > # -------------------------------------- - def_name: __len__ doc: > # -------------------------------------- - def_name: __iter__ doc: > # -------------------------------------- - def_name: __str__ doc: > # -------------------------------------- - class_name: WorldSettings # - DESCRIPTION ------------------------ doc: > Class that provides access to modifiable world settings. Check it out in our [section](../configuring_the_simulation/) # - PROPERTIES ------------------------- instance_variables: - var_name: synchronous_mode type: bool doc: > - var_name: no_rendering_mode type: bool doc: > - var_name: fixed_delta_seconds type: float doc: > # - METHODS ---------------------------- methods: - def_name: __init__ params: - param_name: synchronous_mode type: bool default: false doc: > - param_name: no_rendering_mode type: bool default: false doc: > - param_name: fixed_delta_seconds type: float default: 0.0 doc: > doc: > # -------------------------------------- - def_name: __eq__ params: - param_name: other type: carla.Timestamp doc: > # -------------------------------------- - def_name: __ne__ params: - param_name: other type: carla.Timestamp doc: > # -------------------------------------- - def_name: __str__ doc: > # -------------------------------------- - class_name: AttachmentType # - DESCRIPTION ------------------------ doc: > Class that defines the attachment options. See carla.World.spawn_actor.
Check out this [`recipe`](../python_cookbook/#attach-sensors-recipe)! # - PROPERTIES ------------------------- instance_variables: - var_name: Rigid doc: > Standard fixed attachment. - var_name: SpringArm doc: > Attachment that expands or retracts based on camera situation. # -------------------------------------- - class_name: World # - DESCRIPTION ------------------------ doc: > Class that contains the current loaded map. # - PROPERTIES ------------------------- instance_variables: - var_name: id type: int doc: > 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: > Return the list of blueprints available in this world. These blueprints can be used to spawn actors into the world. # -------------------------------------- - def_name: get_map return: carla.Map doc: > Return the map that describes this world. # -------------------------------------- - def_name: get_spectator return: carla.Actor doc: > 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 return: int params: - param_name: world_settings type: carla.WorldSettings doc: > Returns the id of the frame when the settings took effect. # -------------------------------------- - def_name: get_weather return: carla.WeatherParameters doc: > Retrieve the weather parameters currently active in the world. # -------------------------------------- - def_name: set_weather params: - param_name: weather type: carla.WeatherParameters doc: > Change the weather in the simulation. # -------------------------------------- - def_name: get_snapshot return: carla.WorldSnapshot doc: > Return a snapshot of the world at this moment. # -------------------------------------- - def_name: get_actor return: carla.Actor params: - param_name: actor_id type: int doc: > Find actor by id, return None if not found. # -------------------------------------- - def_name: get_actors return: carla.ActorList doc: > 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 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 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 none on failure instead of throwing an exception. # -------------------------------------- - def_name: wait_for_tick return: carla.WorldSnapshot params: - param_name: seconds type: float default: 10.0 doc: > Block calling thread until a world tick is received. # -------------------------------------- - def_name: on_tick return: int params: - param_name: callback type: carla.WorldSnapshot doc: > 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 return: int doc: > Synchronizes with the simulator and returns the id of the newly started frame (only has effect on synchronous mode). # -------------------------------------- - def_name: __str__ doc: > # -------------------------------------- - class_name: DebugHelper # - DESCRIPTION ------------------------ doc: > Class that provides drawing debug shapes. Check out this [`example`](https://github.com/carla-simulator/carla/blob/master/PythonAPI/util/lane_explorer.py) # - METHODS ---------------------------- methods: - def_name: draw_point 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: > _Deprecated, use `life_time = 0` instead_ doc: > Draws a point in the given location. # -------------------------------------- - def_name: draw_line 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: > _Deprecated, use `life_time = 0` instead_ doc: > Draws a line between two given locations. # -------------------------------------- - def_name: draw_arrow 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: > _Deprecated, use `life_time = 0` instead_ doc: > Draws an arrow between two given locations. # -------------------------------------- - def_name: draw_box 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: > _Deprecated, use `life_time = 0` instead_ doc: > Draws the carla.BoundingBox of a given bounding_box.
Check out this [`recipe`](../python_cookbook/#debug-bounding-box-recipe)! # -------------------------------------- - def_name: draw_string 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 doc: > _Deprecated, set a high `life_time` instead_ doc: > Draws a string in a given location. note: > Strings can only be seen on the server-side. # -------------------------------------- ...