2019-07-01 23:46:27 +08:00
---
- module_name : carla
# - CLASSES ------------------------------
2020-02-24 20:58:54 +08:00
2019-07-01 23:46:27 +08:00
classes :
- class_name : WorldSnapshot
# - DESCRIPTION ------------------------
doc : >
2020-02-24 20:58:54 +08:00
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
2019-07-03 22:17:51 +08:00
type : int
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
A value unique for every snapshot to differenciate them.
2019-07-01 23:46:27 +08:00
- var_name : frame
2019-07-03 22:18:21 +08:00
type : int
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Simulation frame in which the snapshot was taken.
2019-07-01 23:46:27 +08:00
- var_name : timestamp
2019-07-03 22:17:51 +08:00
type : carla.Timestamp
2020-09-14 22:58:48 +08:00
var_units : seconds
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
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 :
2020-03-30 17:18:13 +08:00
- 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
2020-02-24 20:58:54 +08:00
return : bool
2019-07-01 23:46:27 +08:00
params :
2020-03-30 17:18:13 +08:00
- param_name : actor_id
type : int
2019-07-01 23:46:27 +08:00
doc : >
2020-03-30 17:18:13 +08:00
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
# --------------------------------------
2020-02-24 20:58:54 +08:00
- def_name : __len__
return : int
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Returns the amount of carla.ActorSnapshot present in this snapshot.
# --------------------------------------
2020-03-30 17:18:13 +08:00
- 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
# --------------------------------------
2020-03-30 17:18:13 +08:00
- def_name : __ne__
2020-02-24 20:58:54 +08:00
return : bool
params :
2020-03-30 17:18:13 +08:00
- param_name : other
type : carla.WorldSnapshot
2019-07-01 23:46:27 +08:00
doc : >
2020-03-30 17:18:13 +08:00
Returns <b>True</b> if both **<font color="#f8805a">timestamp</font>** are different.
2019-07-01 23:46:27 +08:00
# --------------------------------------
2020-03-30 17:18:13 +08:00
2019-07-01 23:46:27 +08:00
- class_name : ActorSnapshot
# - DESCRIPTION ------------------------
doc : >
2020-02-24 20:58:54 +08:00
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
2019-07-02 21:02:39 +08:00
type : int
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
An identifier for the snapshot itself.
2019-07-01 23:46:27 +08:00
# - METHODS ----------------------------
methods :
2020-02-24 20:58:54 +08:00
- def_name : get_acceleration
2019-07-03 00:32:23 +08:00
return : carla.Vector3D
2020-09-14 22:58:48 +08:00
return_units : m/s<sup>2</sup>
2020-02-24 20:58:54 +08:00
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
2019-07-03 00:32:23 +08:00
return : carla.Vector3D
2020-09-14 22:58:48 +08:00
return_units : rad/s
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Returns the angular velocity vector registered for an actor in that tick.
2019-07-01 23:46:27 +08:00
# --------------------------------------
2020-02-24 20:58:54 +08:00
- def_name : get_transform
return : carla.Transform
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Returns the actor's transform (location and rotation) for an actor in that tick.
2019-07-01 23:46:27 +08:00
# --------------------------------------
2020-02-24 20:58:54 +08:00
- def_name : get_velocity
return : carla.Vector3D
2020-09-14 22:58:48 +08:00
return_units : m/s
2020-02-24 20:58:54 +08:00
doc : >
Returns the velocity vector registered for an actor in that tick.
2019-07-01 23:46:27 +08:00
# --------------------------------------
2019-07-09 22:03:58 +08:00
...