carla/PythonAPI/docs/geom.yml

463 lines
14 KiB
YAML

---
- module_name: carla
classes:
- class_name: Vector2D
# - DESCRIPTION ------------------------
doc: >
Helper class to perform 2D operations.
# - PROPERTIES -------------------------
instance_variables:
- var_name: x
type: float
doc: >
X-axis value.
- var_name: 'y'
type: float
doc: >
Y-axis value.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: x
type: float
default: 0.0
- param_name: y
type: float
default: 0.0
# --------------------------------------
- def_name: __add__
params:
- param_name: other
type: carla.Vector2D
# --------------------------------------
- def_name: __sub__
params:
- param_name: other
type: carla.Vector2D
# --------------------------------------
- def_name: __mul__
params:
- param_name: other
type: carla.Vector2D
# --------------------------------------
- def_name: __truediv__
params:
- param_name: other
type: carla.Vector2D
# --------------------------------------
- def_name: __eq__
return: bool
params:
- param_name: other
type: carla.Vector2D
doc: >
Returns __True__ if values for every axis are equal.
# --------------------------------------
- def_name: __ne__
return: bool
params:
- param_name: bool
type: carla.Vector2D
doc: >
Returns __True__ if the value for any axis is different.
# --------------------------------------
- def_name: __str__
return: str
doc: >
Returns the axis values for the vector parsed as string.
# --------------------------------------
- class_name: Vector3D
# - DESCRIPTION ------------------------
doc: >
Helper class to perform 3D operations.
# - PROPERTIES -------------------------
instance_variables:
- var_name: x
type: float
doc: >
X-axis value.
- var_name: 'y'
type: float
doc: >
Y-axis value.
- var_name: z
type: float
doc: >
Z-axis value.
# - METHODS ----------------------------
methods:
- 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
# --------------------------------------
- def_name: __add__
params:
- param_name: other
type: carla.Vector3D
# --------------------------------------
- def_name: __sub__
params:
- param_name: other
type: carla.Vector3D
# --------------------------------------
- def_name: __mul__
params:
- param_name: other
type: carla.Vector3D
# --------------------------------------
- def_name: __truediv__
params:
- param_name: other
type: carla.Vector3D
# --------------------------------------
- def_name: __eq__
params:
- param_name: other
type: carla.Vector3D
return: bool
doc: >
Returns __True__ if values for every axis are equal.
# --------------------------------------
- def_name: __ne__
params:
- param_name: other
type: carla.Vector3D
return: bool
doc: >
Returns __True__ if the value for any axis is different.
# --------------------------------------
- def_name: __str__
return: str
doc: >
Returns the axis values for the vector parsed as string.
# --------------------------------------
- class_name: Location
parent: carla.Vector3D
# - DESCRIPTION ------------------------
doc: >
Represents a spot in the world.
# - PROPERTIES -------------------------
instance_variables:
- var_name: x
type: float
doc: >
Distance in meters from origin to spot on X axis.
- var_name: 'y'
type: float
doc: >
Distance in meters from origin to spot on Y axis.
- var_name: z
type: float
doc: >
Distance in meters from origin to spot on Z axis.
# - METHODS ----------------------------
methods:
- 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
# --------------------------------------
- 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.
# --------------------------------------
- def_name: __eq__
return: bool
params:
- param_name: other
type: carla.Location
doc: >
Returns __True__ if both locations are the same point in space.
# --------------------------------------
- def_name: __ne__
return: bool
params:
- param_name: other
type: carla.Location
doc: >
Returns __True__ if both locations are different points in space.
# --------------------------------------
- def_name: __str__
return: str
doc: >
Parses the axis' values to string.
# --------------------------------------
- class_name: Rotation
# - DESCRIPTION ------------------------
doc: >
Class that represents a 3D rotation and therefore, an orientation in space.
![UE4_Rotation](https://d26ilriwvtzlb.cloudfront.net/8/83/BRMC_9.jpg)
_Unreal Engine's standard (from [UE4 docs](https://wiki.unrealengine.com/Blueprint_Rotating_Movement_Component))_
# - PROPERTIES -------------------------
instance_variables:
- var_name: pitch
type: float
doc: >
Degrees around the Y-axis.
- var_name: yaw
type: float
doc: >
Degrees around the Z-axis.
- var_name: roll
type: float
doc: >
Degrees around the X-axis.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: pitch
type: float
default: 0.0
doc: >
Y rotation in degrees.
- param_name: yaw
type: float
default: 0.0
doc: >
Z rotation in degrees.
- param_name: roll
type: float
default: 0.0
doc: >
X rotation in degrees.
# --------------------------------------
- def_name: get_forward_vector
params:
return: carla.Vector3D
doc: >
Computes the vector pointing forward according to the orientation of each axis.
# --------------------------------------
- def_name: __eq__
return: bool
params:
- param_name: other
type: carla.Rotation
doc: >
Returns __True__ if both rotations represent the same orientation of each axis.
# --------------------------------------
- def_name: __ne__
params:
- param_name: other
type: carla.Rotation
return: bool
doc: >
Returns __True__ if both rotations represent the same orientation for every axis.
# --------------------------------------
- def_name: __str__
doc: >
Parses the axis' orientations to string.
# --------------------------------------
- class_name: Transform
# - DESCRIPTION ------------------------
doc: >
Class that defines a transformation, a combination of location and rotation, without scaling.
# - PROPERTIES -------------------------
instance_variables:
- var_name: location
type: carla.Location
doc: >
Describes a point in the coordinate system.
- var_name: rotation
type: carla.Rotation
doc: >
Describes a rotation for an object according to Unreal Engine's axis system.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: location
type: carla.Location
- param_name: rotation
type: carla.Rotation
# --------------------------------------
- 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.
# --------------------------------------
- def_name: __eq__
return: bool
params:
- param_name: other
type: carla.Transform
doc: >
Returns __True__ if both location and rotation are equal for this and `other`.
# --------------------------------------
- def_name: __ne__
return: bool
params:
- param_name: other
type: carla.Transform
doc: >
Returns __True__ if any location and rotation are not equal for this and `other`.
# --------------------------------------
- def_name: __str__
return: str
doc: >
Parses both location and rotation to string.
# --------------------------------------
- class_name: BoundingBox
# - DESCRIPTION ------------------------
doc: >
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.
# - PROPERTIES -------------------------
instance_variables:
- var_name: extent
type: carla.Vector3D
doc: >
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.
- var_name: location
type: carla.Location
doc: >
The center of the bounding box relative to its parent actor.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: location
type: carla.Location
doc: >
Point to center the box.
- param_name: extent
type: carla.Vector3D
doc: >
Vector containing half the size of the box for every axis.
# --------------------------------------
- def_name: contains
return: bool
params:
- param_name: world_point
type: carla.Location
doc: >
The point in world space to be checked.
- param_name: transform
type: carla.Transform
doc: >
Contains location and rotation needed to convert this object's local space to world space.
doc: >
Returns **True** if a point passed in world space is inside this bounding box.
# --------------------------------------
- def_name: get_local_vertices
return: list(carla.Location)
doc: >
Returns a list containing the locations of this object's vertices in local space.
# --------------------------------------
- def_name: get_world_vertices
return: list(carla.Location)
params:
- param_name: transform
type: carla.Transform
doc: >
Contains location and rotation needed to convert this object's local space to world space.
doc: >
Returns a list containing the locations of this object's vertices in world space.
# --------------------------------------
- def_name: __eq__
return: bool
params:
- param_name: other
type: carla.BoundingBox
doc: >
Returns true if both location and extent are equal for this and `other`.
# --------------------------------------
- def_name: __ne__
return: bool
params:
- param_name: other
type: carla.BoundingBox
doc: >
Returns true if either location or extent are different for this and `other`.
# --------------------------------------
- def_name: __str__
return: str
doc: >
Parses the location and extent of the bounding box to string.
# --------------------------------------
- class_name: GeoLocation
# - DESCRIPTION ------------------------
doc: >
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.
# - PROPERTIES -------------------------
instance_variables:
- var_name: latitude
type: float
doc: >
North/South value of a point on the map.
- var_name: longitude
type: float
doc: >
West/East value of a point on the map.
- var_name: altitude
type: float
doc: >
Height regarding ground level.
# - METHODS ----------------------------
methods:
- 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
# --------------------------------------
- def_name: __eq__
params:
- param_name: other
type: carla.GeoLocation
# --------------------------------------
- def_name: __ne__
params:
- param_name: other
type: carla.GeoLocation
# --------------------------------------
- def_name: __str__
# --------------------------------------
...