2019-05-03 18:18:02 +08:00
---
- module_name : carla
2019-05-03 19:13:41 +08:00
classes :
- class_name : Vector2D
# - DESCRIPTION ------------------------
doc : >
2020-02-24 20:58:54 +08:00
Helper class to perform 2D operations.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables :
- var_name : x
2019-06-07 18:58:00 +08:00
type : float
2020-02-24 20:58:54 +08:00
doc : >
X-axis value.
2019-05-03 19:13:41 +08:00
- var_name : 'y'
2019-06-07 18:58:00 +08:00
type : float
2020-02-24 20:58:54 +08:00
doc : >
Y -axis value.
2019-05-03 19:13:41 +08:00
# - METHODS ----------------------------
methods :
2019-07-01 23:46:27 +08:00
- def_name : __init__
params :
2020-01-23 19:09:38 +08:00
- param_name : x
2019-07-01 23:46:27 +08:00
type : float
default : 0.0
2020-01-23 19:09:38 +08:00
- param_name : y
2019-07-01 23:46:27 +08:00
type : float
default : 0.0
# --------------------------------------
2019-06-05 21:05:57 +08:00
- def_name : __add__
params :
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector2D
2019-06-05 21:05:57 +08:00
# --------------------------------------
2020-02-24 20:58:54 +08:00
- def_name : __sub__
2019-06-05 21:05:57 +08:00
params :
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector2D
2019-06-05 21:05:57 +08:00
# --------------------------------------
2020-02-24 20:58:54 +08:00
- def_name : __mul__
2019-06-05 21:05:57 +08:00
params :
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector2D
2019-06-05 21:05:57 +08:00
# --------------------------------------
- def_name : __truediv__
params :
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector2D
2019-06-05 21:05:57 +08:00
# --------------------------------------
2019-05-03 19:13:41 +08:00
- def_name : __eq__
2020-02-24 20:58:54 +08:00
return : bool
2019-05-03 19:13:41 +08:00
params :
2019-06-05 21:05:57 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector2D
2020-02-24 20:58:54 +08:00
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if values for every axis are equal.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name : __ne__
2020-02-24 20:58:54 +08:00
return : bool
2019-05-03 19:13:41 +08:00
params :
2020-02-24 20:58:54 +08:00
- param_name : bool
2019-07-01 23:46:27 +08:00
type : carla.Vector2D
2020-02-24 20:58:54 +08:00
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if the value for any axis is different.
2019-07-01 23:46:27 +08:00
# --------------------------------------
2020-02-24 20:58:54 +08:00
- def_name : __str__
return : str
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Returns the axis values for the vector parsed as string.
2019-05-03 19:13:41 +08:00
# --------------------------------------
2019-06-05 21:05:57 +08:00
2019-05-03 19:13:41 +08:00
- class_name : Vector3D
# - DESCRIPTION ------------------------
doc : >
2020-02-24 20:58:54 +08:00
Helper class to perform 3D operations.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables :
- var_name : x
2019-06-07 18:58:00 +08:00
type : float
2020-02-24 20:58:54 +08:00
doc : >
X-axis value.
2019-05-03 19:13:41 +08:00
- var_name : 'y'
2019-06-07 18:58:00 +08:00
type : float
2020-02-24 20:58:54 +08:00
doc : >
Y -axis value.
2019-05-03 19:13:41 +08:00
- var_name : z
2019-06-07 18:58:00 +08:00
type : float
2020-02-24 20:58:54 +08:00
doc : >
Z-axis value.
2019-05-03 19:13:41 +08:00
# - METHODS ----------------------------
methods :
2019-07-01 23:46:27 +08:00
- def_name : __init__
params :
- param_name : x
type : float
default : 0.0
- param_name : 'y'
type : float
default : 0.0
- param_name : z
type : float
default : 0.0
# --------------------------------------
2019-06-05 21:05:57 +08:00
- def_name : __add__
params :
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector3D
2019-06-05 21:05:57 +08:00
# --------------------------------------
2020-02-24 20:58:54 +08:00
- def_name : __sub__
2019-06-05 21:05:57 +08:00
params :
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector3D
2019-06-05 21:05:57 +08:00
# --------------------------------------
2020-02-24 20:58:54 +08:00
- def_name : __mul__
2019-06-05 21:05:57 +08:00
params :
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector3D
2019-06-05 21:05:57 +08:00
# --------------------------------------
- def_name : __truediv__
params :
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector3D
2019-06-05 21:05:57 +08:00
# --------------------------------------
2019-05-03 19:13:41 +08:00
- def_name : __eq__
params :
2019-06-05 21:05:57 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector3D
2020-02-24 20:58:54 +08:00
return : bool
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if values for every axis are equal.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name : __ne__
params :
2019-06-05 21:05:57 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Vector3D
2020-02-24 20:58:54 +08:00
return : bool
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if the value for any axis is different.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name : __str__
2020-02-24 20:58:54 +08:00
return : str
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Returns the axis values for the vector parsed as string.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- class_name : Location
2019-06-05 21:05:57 +08:00
parent : carla.Vector3D
# - DESCRIPTION ------------------------
2019-05-03 19:13:41 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Represents a spot in the world.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables :
- var_name : x
2019-06-07 18:58:00 +08:00
type : float
2020-02-24 20:58:54 +08:00
doc : >
Distance in meters from origin to spot on X axis.
2019-05-03 19:13:41 +08:00
- var_name : 'y'
2019-06-07 18:58:00 +08:00
type : float
2020-02-24 20:58:54 +08:00
doc : >
Distance in meters from origin to spot on Y axis.
2019-05-03 19:13:41 +08:00
- var_name : z
2019-06-07 18:58:00 +08:00
type : float
2020-02-24 20:58:54 +08:00
doc : >
Distance in meters from origin to spot on Z axis.
2019-05-03 19:13:41 +08:00
# - METHODS ----------------------------
methods :
2019-07-01 23:46:27 +08:00
- def_name : __init__
params :
2020-01-23 19:09:38 +08:00
- param_name : x
2019-07-01 23:46:27 +08:00
type : float
default : 0.0
- param_name : 'y'
type : float
default : 0.0
2020-01-23 19:09:38 +08:00
- param_name : z
2019-07-01 23:46:27 +08:00
type : float
default : 0.0
2019-05-03 19:13:41 +08:00
# --------------------------------------
2020-03-30 17:18:13 +08:00
- def_name : distance
params :
- param_name : location
type : carla.Location
doc : >
The other point to compute the distance with.
return : float
doc : >
Returns Euclidean distance in meters from this location to another one.
# --------------------------------------
2019-05-03 19:13:41 +08:00
- def_name : __eq__
2020-02-24 20:58:54 +08:00
return : bool
2019-05-03 19:13:41 +08:00
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Location
2020-02-24 20:58:54 +08:00
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if both locations are the same point in space.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name : __ne__
2020-02-24 20:58:54 +08:00
return : bool
2019-05-03 19:13:41 +08:00
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Location
2020-02-24 20:58:54 +08:00
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if both locations are different points in space.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name : __str__
2020-02-24 20:58:54 +08:00
return : str
2019-07-01 23:46:27 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Parses the axis' values to string.
# --------------------------------------
2019-05-03 19:13:41 +08:00
- class_name : Rotation
# - DESCRIPTION ------------------------
doc : >
2020-02-24 20:58:54 +08:00
Class that represents a 3D rotation and therefore, an orientation in space.
2019-06-07 18:58:00 +08:00
2020-01-23 19:09:38 +08:00
![ UE4_Rotation](https://d26ilriwvtzlb.cloudfront.net/8/83/BRMC_9.jpg)
2019-06-07 18:58:00 +08:00
_Unreal Engine's standard (from [UE4 docs](https://wiki.unrealengine.com/Blueprint_Rotating_Movement_Component))_
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables :
- var_name : pitch
2019-06-07 18:58:00 +08:00
type : float
2019-08-03 02:15:14 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Degrees around the Y-axis.
2019-05-03 19:13:41 +08:00
- var_name : yaw
2019-06-07 18:58:00 +08:00
type : float
2019-08-03 02:15:14 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Degrees around the Z-axis.
2019-05-03 19:13:41 +08:00
- var_name : roll
2019-06-07 18:58:00 +08:00
type : float
2019-08-03 02:15:14 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Degrees around the X-axis.
2019-05-03 19:13:41 +08:00
# - METHODS ----------------------------
methods :
2019-07-01 23:46:27 +08:00
- def_name : __init__
params :
- param_name : pitch
type : float
default : 0.0
2020-02-24 20:58:54 +08:00
doc : >
Y rotation in degrees.
2019-07-01 23:46:27 +08:00
- param_name : yaw
type : float
default : 0.0
2020-02-24 20:58:54 +08:00
doc : >
Z rotation in degrees.
2019-07-01 23:46:27 +08:00
- param_name : roll
type : float
default : 0.0
2020-02-24 20:58:54 +08:00
doc : >
X rotation in degrees.
2019-07-01 23:46:27 +08:00
# --------------------------------------
2019-05-03 19:13:41 +08:00
- def_name : get_forward_vector
params :
2019-06-07 18:58:00 +08:00
return : carla.Vector3D
2019-05-03 19:13:41 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Computes the vector pointing forward according to the orientation of each axis.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name : __eq__
2020-02-24 20:58:54 +08:00
return : bool
2019-05-03 19:13:41 +08:00
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Rotation
2019-05-03 19:13:41 +08:00
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if both rotations represent the same orientation of each axis.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name : __ne__
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Rotation
2020-02-24 20:58:54 +08:00
return : bool
2019-07-01 23:46:27 +08:00
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if both rotations represent the same orientation for every axis.
2020-02-24 20:58:54 +08:00
# --------------------------------------
2019-07-01 23:46:27 +08:00
- def_name : __str__
2019-05-03 19:13:41 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Parses the axis' orientations to string.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- class_name : Transform
# - DESCRIPTION ------------------------
doc : >
2020-02-24 20:58:54 +08:00
Class that defines a transformation, a combination of location and rotation, without scaling.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables :
- var_name : location
2019-06-07 18:58:00 +08:00
type : carla.Location
2020-02-24 20:58:54 +08:00
doc : >
Describes a point in the coordinate system.
2019-05-03 19:13:41 +08:00
- var_name : rotation
2019-06-07 18:58:00 +08:00
type : carla.Rotation
2020-02-24 20:58:54 +08:00
doc : >
Describes a rotation for an object according to Unreal Engine's axis system.
2019-05-03 19:13:41 +08:00
# - METHODS ----------------------------
methods :
2019-07-01 23:46:27 +08:00
- def_name : __init__
params :
- param_name : location
type : carla.Location
- param_name : rotation
type : carla.Rotation
2019-05-03 19:13:41 +08:00
# --------------------------------------
2020-03-30 17:18:13 +08:00
- def_name : transform
params :
- param_name : in_point
type : carla.Location
doc : >
Location in the space to which the transformation will be applied.
doc : >
Translates a 3D point from global to local coordinates using the current transformation as frame of reference.
# --------------------------------------
- def_name : get_forward_vector
return : carla.Vector3D
doc : >
Computes a forward vector using its rotation.
# --------------------------------------
2019-05-03 19:13:41 +08:00
- def_name : __eq__
2020-02-24 20:58:54 +08:00
return : bool
2019-05-03 19:13:41 +08:00
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Transform
2019-05-03 19:13:41 +08:00
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if both location and rotation are equal for this and `other`.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name : __ne__
2020-02-24 20:58:54 +08:00
return : bool
2019-05-03 19:13:41 +08:00
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.Transform
doc : >
2020-03-30 17:18:13 +08:00
Returns __True__ if any location and rotation are not equal for this and `other`.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name : __str__
2020-02-24 20:58:54 +08:00
return : str
doc : >
Parses both location and rotation to string.
# --------------------------------------
2019-05-03 19:13:41 +08:00
- class_name : BoundingBox
# - DESCRIPTION ------------------------
doc : >
2020-03-02 21:35:50 +08:00
Helper class defining a box location and its dimensions that will later be used by carla.DebugHelper or a carla.Client to draw shapes and detect collisions. Bounding boxes normally act for object colliders. Check out this [recipe](ref_code_recipes.md#debug-bounding-box-recipe) where the user takes a snapshot of the world and then proceeds to draw bounding boxes for traffic lights.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables :
- var_name : extent
2019-06-07 18:58:00 +08:00
type : carla.Vector3D
2019-05-03 19:13:41 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Vector from the center of the box to one vertex. The value in each axis equals half the size of the box for that axis.
`extent.x * 2` would return the size of the box in the X-axis.
2020-03-30 17:18:13 +08:00
- var_name : location
type : carla.Location
doc : >
The center of the bounding box relative to its parent actor.
2019-05-03 19:13:41 +08:00
# - METHODS ----------------------------
methods :
2019-07-01 23:46:27 +08:00
- def_name : __init__
params :
- param_name : location
type : carla.Location
2020-02-24 20:58:54 +08:00
doc : >
Point to center the box.
2019-07-01 23:46:27 +08:00
- param_name : extent
type : carla.Vector3D
2020-02-24 20:58:54 +08:00
doc : >
Vector containing half the size of the box for every axis.
2019-07-01 23:46:27 +08:00
# --------------------------------------
2020-01-23 19:09:38 +08:00
- def_name : contains
return : bool
params :
- param_name : world_point
type : carla.Location
doc : >
2020-01-31 23:48:40 +08:00
The point in world space to be checked.
2020-01-23 19:09:38 +08:00
- param_name : transform
type : carla.Transform
doc : >
2020-01-31 23:48:40 +08:00
Contains location and rotation needed to convert this object's local space to world space.
2020-01-23 19:09:38 +08:00
doc : >
2020-01-31 23:48:40 +08:00
Returns **True** if a point passed in world space is inside this bounding box.
2020-01-23 19:09:38 +08:00
# --------------------------------------
- def_name : get_local_vertices
2020-01-31 23:48:40 +08:00
return : list(carla.Location)
2020-01-23 19:09:38 +08:00
doc : >
2020-01-31 23:48:40 +08:00
Returns a list containing the locations of this object's vertices in local space.
2020-01-23 19:09:38 +08:00
# --------------------------------------
- def_name : get_world_vertices
2020-01-31 23:48:40 +08:00
return : list(carla.Location)
2020-01-23 19:09:38 +08:00
params :
- param_name : transform
type : carla.Transform
doc : >
2020-01-31 23:48:40 +08:00
Contains location and rotation needed to convert this object's local space to world space.
2020-01-23 19:09:38 +08:00
doc : >
2020-01-31 23:48:40 +08:00
Returns a list containing the locations of this object's vertices in world space.
2020-01-23 19:09:38 +08:00
# --------------------------------------
2019-05-03 19:13:41 +08:00
- def_name : __eq__
2020-02-24 20:58:54 +08:00
return : bool
2019-05-03 19:13:41 +08:00
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.BoundingBox
2019-05-03 19:13:41 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Returns true if both location and extent are equal for this and `other`.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name : __ne__
2020-02-24 20:58:54 +08:00
return : bool
2019-05-03 19:13:41 +08:00
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-07-01 23:46:27 +08:00
type : carla.BoundingBox
doc : >
2020-02-24 20:58:54 +08:00
Returns true if either location or extent are different for this and `other`.
2019-07-01 23:46:27 +08:00
# --------------------------------------
- def_name : __str__
2020-02-24 20:58:54 +08:00
return : str
2019-05-03 19:13:41 +08:00
doc : >
2020-02-24 20:58:54 +08:00
Parses the location and extent of the bounding box to string.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- class_name : GeoLocation
# - DESCRIPTION ------------------------
doc : >
2020-02-24 20:58:54 +08:00
Class that contains geographical coordinates simulated data. The carla.Map can convert simulation locations by using the <b><georeference></b> tag in the OpenDRIVE file.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables :
- var_name : latitude
2019-06-07 18:58:00 +08:00
type : float
2019-08-03 02:15:14 +08:00
doc : >
North/South value of a point on the map.
2019-05-03 19:13:41 +08:00
- var_name : longitude
2019-06-07 18:58:00 +08:00
type : float
2019-08-03 02:15:14 +08:00
doc : >
West/East value of a point on the map.
2019-05-03 19:13:41 +08:00
- var_name : altitude
2019-06-07 18:58:00 +08:00
type : float
2019-08-03 02:15:14 +08:00
doc : >
Height regarding ground level.
2019-05-03 19:13:41 +08:00
# - METHODS ----------------------------
methods :
2019-07-01 23:46:27 +08:00
- def_name : __init__
params :
- param_name : latitude
type : float
default : 0.0
- param_name : longitude
type : float
default : 0.0
- param_name : altitude
type : float
default : 0.0
# --------------------------------------
2019-05-03 19:13:41 +08:00
- def_name : __eq__
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-09-03 00:23:33 +08:00
type : carla.GeoLocation
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name : __ne__
params :
2019-06-07 18:58:00 +08:00
- param_name : other
2019-09-03 00:23:33 +08:00
type : carla.GeoLocation
2019-06-07 18:58:00 +08:00
# --------------------------------------
- def_name : __str__
2019-05-03 19:13:41 +08:00
# --------------------------------------
2019-05-03 18:18:02 +08:00
...