carla/PythonAPI/docs/snapshot.yml

105 lines
3.8 KiB
YAML
Raw Normal View History

2019-07-01 23:46:27 +08:00
---
- module_name: carla
# - CLASSES ------------------------------
2019-07-01 23:46:27 +08:00
classes:
- class_name: WorldSnapshot
# - DESCRIPTION ------------------------
doc: >
This snapshot comprises all the information for every actor on scene at a certain moment of time. It creates and gives acces to a data structure containing a series of carla.ActorSnapshot. The client recieves a new snapshot on every tick that cannot be stored.
2019-07-01 23:46:27 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: id
type: int
2019-07-01 23:46:27 +08:00
doc: >
A value unique for every snapshot to differenciate them.
2019-07-01 23:46:27 +08:00
- var_name: frame
type: int
2019-07-01 23:46:27 +08:00
doc: >
Simulation frame in which the snapshot was taken.
2019-07-01 23:46:27 +08:00
- var_name: timestamp
type: carla.Timestamp
2020-09-14 22:58:48 +08:00
var_units: seconds
2019-07-01 23:46:27 +08:00
doc: >
Precise moment in time when snapshot was taken. This class works in seconds as given by the operative system.
2019-07-01 23:46:27 +08:00
# - METHODS ----------------------------
methods:
- def_name: find
return: carla.ActorSnapshot
params:
- param_name: actor_id
type: int
doc: >
Given a certain actor ID, returns its corresponding snapshot or <b>None</b> if it is not found.
# --------------------------------------
- def_name: has_actor
return: bool
2019-07-01 23:46:27 +08:00
params:
- param_name: actor_id
type: int
2019-07-01 23:46:27 +08:00
doc: >
Given a certain actor ID, checks if there is a snapshot corresponding it and so, if the actor was present at that moment.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name: __iter__
doc: >
2020-10-02 23:08:50 +08:00
Iterate over the carla.ActorSnapshot stored in the snapshot.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name: __len__
return: int
2019-07-01 23:46:27 +08:00
doc: >
Returns the amount of carla.ActorSnapshot present in this snapshot.
# --------------------------------------
- def_name: __eq__
return: bool
params:
- param_name: other
type: carla.WorldSnapshot
doc: >
Returns __True__ if both **<font color="#f8805a">timestamp</font>** are the same.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name: __ne__
return: bool
params:
- param_name: other
type: carla.WorldSnapshot
2019-07-01 23:46:27 +08:00
doc: >
Returns <b>True</b> if both **<font color="#f8805a">timestamp</font>** are different.
2019-07-01 23:46:27 +08:00
# --------------------------------------
2019-07-01 23:46:27 +08:00
- class_name: ActorSnapshot
# - DESCRIPTION ------------------------
doc: >
A class that comprises all the information for an actor at a certain moment in time. These objects are contained in a carla.WorldSnapshot and sent to the client once every tick.
2019-07-01 23:46:27 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: id
type: int
2019-07-01 23:46:27 +08:00
doc: >
An identifier for the snapshot itself.
2019-07-01 23:46:27 +08:00
# - METHODS ----------------------------
methods:
- def_name: get_acceleration
return: carla.Vector3D
2020-09-14 22:58:48 +08:00
return_units: m/s<sup>2</sup>
doc: >
Returns the acceleration vector registered for an actor in that tick.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name: get_angular_velocity
return: carla.Vector3D
2020-09-14 22:58:48 +08:00
return_units: rad/s
2019-07-01 23:46:27 +08:00
doc: >
Returns the angular velocity vector registered for an actor in that tick.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name: get_transform
return: carla.Transform
2019-07-01 23:46:27 +08:00
doc: >
Returns the actor's transform (location and rotation) for an actor in that tick.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name: get_velocity
return: carla.Vector3D
2020-09-14 22:58:48 +08:00
return_units: m/s
doc: >
Returns the velocity vector registered for an actor in that tick.
2019-07-01 23:46:27 +08:00
# --------------------------------------
...