carla/PythonAPI/docs/map.yml

679 lines
26 KiB
YAML
Raw Normal View History

2019-04-19 02:13:34 +08:00
---
2019-04-25 18:21:25 +08:00
- module_name: carla
2019-04-19 02:13:34 +08:00
doc: >
# - CLASSES ------------------------------
classes:
2019-05-03 19:13:41 +08:00
- class_name: LaneType
# - DESCRIPTION ------------------------
doc: >
Class that defines the possible lane types accepted by OpenDRIVE 1.4. This standards define the road information. For instance in this [recipe](../python_cookbook/#lanes-recipe) the user creates a carla.Waypoint for the current location of a vehicle and uses it to get the current and adjacent lane types.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: NONE
doc: >
- var_name: Bidirectional
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Biking
doc: >
- var_name: Border
doc: >
- var_name: Driving
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Entry
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Exit
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Median
doc: >
- var_name: OffRamp
2019-05-03 19:13:41 +08:00
doc: >
- var_name: OnRamp
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Parking
doc: >
- var_name: Rail
doc: >
- var_name: Restricted
2019-05-03 19:13:41 +08:00
doc: >
- var_name: RoadWorks
doc: >
- var_name: Shoulder
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Sidewalk
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Special1
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Special2
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Special3
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Stop
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Tram
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Any
doc: >
Every type except for NONE.
2019-05-03 19:13:41 +08:00
- class_name: LaneChange
# - DESCRIPTION ------------------------
doc: >
Class that defines the permission to turn either left, right, both or none (meaning only going straight is allowed). This information is stored for every carla.Waypoint according to the OpenDRIVE file. In this [recipe](../python_cookbook/#lanes-recipe) the user creates a waypoint for a current vehicle position and learns which turns are permitted.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: NONE
doc: >
Traffic rules do not allow turning right or left, only going straight.
- var_name: Both
2019-05-03 19:13:41 +08:00
doc: >
Traffic rules allow turning either right or left.
2019-05-03 19:13:41 +08:00
- var_name: Left
doc: >
Traffic rules allow turning left.
- var_name: Right
2019-05-03 19:13:41 +08:00
doc: >
Traffic rules allow turning right.
2019-05-03 19:13:41 +08:00
- class_name: LaneMarkingColor
# - DESCRIPTION ------------------------
doc: >
Class that defines the lane marking colors according to OpenDRIVE 1.4.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: Standard
doc: >
White by default.
2019-05-03 19:13:41 +08:00
- var_name: Blue
doc: >
- var_name: Green
doc: >
- var_name: Red
doc: >
- var_name: White
doc: >
- var_name: Yellow
doc: >
- var_name: Other
doc: >
- class_name: LaneMarkingType
# - DESCRIPTION ------------------------
doc: >
Class that defines the lane marking types accepted by OpenDRIVE 1.4. Take a look at this [recipe](../python_cookbook/#lanes-recipe) where the user creates a carla.Waypoint for a vehicle location and retrieves from it the information about adjacent lane markings.
__Note on double types:__ Lane markings are defined under the OpenDRIVE standard that determines whereas a line will be considered "BrokenSolid" or "SolidBroken". For each road there is a center lane marking, defined from left to right regarding the lane's directions. The rest of the lane markings are defined in order from the center lane to the closest outside of the road.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: NONE
doc: >
- var_name: BottsDots
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Broken
doc: >
- var_name: BrokenBroken
doc: >
2019-05-03 19:13:41 +08:00
- var_name: BrokenSolid
doc: >
- var_name: Curb
2019-05-03 19:13:41 +08:00
doc: >
- var_name: Grass
doc: >
- var_name: Solid
doc: >
- var_name: SolidBroken
doc: >
- var_name: SolidSolid
doc: >
- var_name: Other
2019-05-03 19:13:41 +08:00
doc: >
2019-04-19 02:13:34 +08:00
- class_name: Map
2019-05-03 18:18:02 +08:00
# - DESCRIPTION ------------------------
2019-04-19 02:13:34 +08:00
doc: >
Class containing the road information and waypoint managing. Data is retrieved from an OpenDRIVE file that describes the road. A query system is defined which works hand in hand with carla.Waypoint to translate geometrical information from the .xodr to natural world points. CARLA is currently working with [OpenDRIVE 1.4 standard](http://www.opendrive.org/docs/OpenDRIVEFormatSpecRev1.4H.pdf).
2019-04-19 02:13:34 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: name
type: str
2019-04-19 02:13:34 +08:00
doc: >
The name of the map. It corresponds to the .umap from Unreal Engine that is loaded from a CARLA server, which then references to the .xodr road description.
2019-04-19 02:13:34 +08:00
# - METHODS ----------------------------
methods:
2019-06-04 18:13:12 +08:00
- def_name: __init__
params:
- param_name: name
type: str
doc: >
Name of the current map.
2019-06-04 18:13:12 +08:00
- param_name: xodr_content
type: str
doc: >
.xodr content in string format.
2019-06-04 18:13:12 +08:00
return: list(carla.Transform)
doc: >
Constructor for this class. Though a map is automatically generated when initializing the world, using this method in no-rendering mode facilitates working with an .xodr without any CARLA server running.
# --------------------------------------
- def_name: generate_waypoints
params:
- param_name: distance
type: float
doc: >
Approximate distance between waypoints.
return: list(carla.Waypoint)
doc: >
Returns a list of waypoints with a certain distance between them for every lane and centered inside of it. Waypoints are not listed in any particular order. Remember that waypoints closer than 2cm within the same road, section and lane will have the same identificator.
2019-06-04 18:13:12 +08:00
# --------------------------------------
2019-04-19 02:13:34 +08:00
- def_name: get_spawn_points
2019-06-04 00:35:57 +08:00
return: list(carla.Transform)
2019-04-19 02:13:34 +08:00
doc: >
Returns a list of recommendations made by the creators of the map to be used as spawning points for the vehicles. The list includes carla.Transform objects with certain location and orientation. Said locations are slightly on-air in order to avoid Z-collisions, so vehicles fall for a bit before starting their way.
# --------------------------------------
- def_name: get_topology
doc: >
Returns a list of tuples describing a minimal graph of the topology of the OpenDRIVE file. The tuples contain pairs of waypoints located either at the point a road begins or ends. The first one is the origin and the second one represents another road end that can be reached. This graph can be loaded into [NetworkX](https://networkx.github.io/) to work with. Output could look like this: <b>[(w0, w1), (w0, w2), (w1, w3), (w2, w3), (w0, w4)]</b>.
return: list(tuple(carla.Waypoint, carla.Waypoint))
2019-04-19 02:13:34 +08:00
# --------------------------------------
- def_name: get_waypoint
doc: >
Returns a waypoint that can be located in an exact location or translated to the center of the nearest lane. Said lane type can be defined using flags such as `LaneType.Driving & LaneType.Shoulder`.
The method will return <b>None</b> if the waypoint is not found, which may happen only when trying to retrieve a waypoint for an exact location. That eases checking if a point is inside a certain road, as otherwise, it will return the corresponding waypoint.
2019-04-19 02:13:34 +08:00
params:
- param_name: location
2019-06-04 00:35:57 +08:00
type: carla.Location
doc: >
Location used as reference for the carla.Waypoint.
- param_name: project_to_road
type: bool
default: "True"
doc: >
If **True**, the waypoint will be at the center of the closest lane. This is the default setting. If **False**, the waypoint will be exactly in `location`. <b>None</b> means said location does not belong to a road.
- param_name: lane_type
2019-06-04 00:35:57 +08:00
type: carla.LaneType
default: carla.LaneType.Driving
doc: >
Limits the search for nearest lane to one or various lane types that can be flagged.
2019-06-04 00:35:57 +08:00
return: carla.Waypoint
2019-04-19 02:13:34 +08:00
# --------------------------------------
2020-02-01 00:09:09 +08:00
- def_name: get_waypoint_xodr
doc: >
Get a waypoint if all the parameters passed are correct, otherwise return None
params:
- param_name: road_id
type: int
doc: >
2020-02-01 00:09:09 +08:00
Id of the road from where getting the waypoint
- param_name: lane_id
type: int
doc: >
2020-02-01 00:09:09 +08:00
Id of the lane to get the waypoint.
- param_name: s
type: float
doc: >
2020-02-01 00:09:09 +08:00
Specify the length from the road start
return: carla.Waypoint
# --------------------------------------
- def_name: save_to_disk
2019-04-19 02:13:34 +08:00
params:
- param_name: path
doc: >
Path where the file will be saved.
2019-04-19 02:13:34 +08:00
doc: >
Saves the .xodr OpenDRIVE file of the current map to disk.
2019-04-19 02:13:34 +08:00
# --------------------------------------
- def_name: to_opendrive
doc: >
Returns the .xodr OpenDRIVe file of the current map as string.
return: str
2019-04-19 02:13:34 +08:00
# --------------------------------------
- def_name: transform_to_geolocation
2019-04-19 02:13:34 +08:00
params:
- param_name: location
type: carla.Location
return: carla.GeoLocation
2019-04-19 02:13:34 +08:00
doc: >
Converts a given `location`, a point in the simulation, to a carla.GeoLocation, which represents world coordinates. The geographical location of the map is defined inside OpenDRIVE within the tag <b><georeference></b>.
# --------------------------------------
- def_name: __str__
# --------------------------------------
2019-05-03 19:13:41 +08:00
- class_name: LaneMarking
# - DESCRIPTION ------------------------
doc: >
Class that gathers all the information regarding a lane marking according to [OpenDRIVE 1.4 standard](http://www.opendrive.org/docs/OpenDRIVEFormatSpecRev1.4H.pdf) standard.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: color
type: carla.LaneMarkingColor
2019-05-03 19:13:41 +08:00
doc: >
Actual color of the marking.
2019-05-03 19:13:41 +08:00
- var_name: lane_change
2019-06-04 00:35:57 +08:00
type: carla.LaneChange
2019-05-03 19:13:41 +08:00
doc: >
Permissions for said lane marking to be crossed.
- var_name: type
type: carla.LaneMarkingType
doc: >
Lane marking type.
2019-05-03 19:13:41 +08:00
- var_name: width
2019-06-04 00:35:57 +08:00
type: float
2019-05-03 19:13:41 +08:00
doc: >
Horizontal lane marking thickness.
# --------------------------------------
2019-05-03 19:13:41 +08:00
- class_name: Waypoint
# - DESCRIPTION ------------------------
doc: >
Waypoints in CARLA are described as 3D directed points. They store a certain carla.Transform which locates the waypoint in a road and orientates it according to the lane. They also store the road information belonging to said point regarding its lane and lane markings. All of this information is retrieved as provided by the OpenDRIVE file.
2019-05-03 19:13:41 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: id
2019-06-04 00:35:57 +08:00
type: int
2019-05-03 19:13:41 +08:00
doc: >
The identificator is generated using a hash combination of the <b>road</b>, <b>section</b>, <b>lane</b> and <b>s</b> values that correspond to said point in the OpenDRIVE geometry. The <b>s</b> precision is set to 2 centimeters, so 2 waypoints closer than 2 centimeters in the same road, section and lane, will have the same identificator.
2019-05-03 19:13:41 +08:00
- var_name: transform
2019-06-04 00:35:57 +08:00
type: carla.Transform
2019-05-03 19:13:41 +08:00
doc: >
Position and orientation of the waypoint according to the current lane information. This data is computed the first time it is accessed. It is not created right away in order to ease computing costs when lots of waypoints are created but their specific transform is not needed.
2019-05-03 19:13:41 +08:00
- var_name: road_id
2019-06-04 00:35:57 +08:00
type: int
2019-05-03 19:13:41 +08:00
doc: >
OpenDRIVE road's id.
2019-05-03 19:13:41 +08:00
- var_name: section_id
2019-06-04 00:35:57 +08:00
type: int
2019-05-03 19:13:41 +08:00
doc: >
OpenDRIVE section's id, based on the order that they are originally defined.
2019-05-03 19:13:41 +08:00
- var_name: lane_id
2019-06-04 00:35:57 +08:00
type: int
2019-05-03 19:13:41 +08:00
doc: >
OpenDRIVE lane's id, this value can be positive or negative which represents the direction of the current lane with respect to the road. For more information refer to OpenDRIVE [documentation](http://www.opendrive.org/docs/OpenDRIVEFormatSpecRev1.4H.pdf#page=20)
2019-05-03 19:13:41 +08:00
- var_name: s
2019-06-04 00:35:57 +08:00
type: float
2019-05-03 19:13:41 +08:00
doc: >
OpenDRIVE <b>s</b> value of the current position.
- var_name: is_junction
type: bool
doc: >
<b>True</b> if the current Waypoint is on a junction as defined by OpenDRIVE.
- var_name: lane_width
type: float
doc: >
Horizontal size of the road at current <b>s</b>.
2019-05-03 19:13:41 +08:00
- var_name: lane_change
2019-06-04 00:35:57 +08:00
type: carla.LaneChange
2019-05-03 19:13:41 +08:00
doc: >
Lane change definition of the current Waypoint's location, based on the traffic rules defined in the OpenDRIVE file. It states if a lane change can be done and in which direction.
2019-05-03 19:13:41 +08:00
- var_name: lane_type
2019-06-04 00:35:57 +08:00
type: carla.LaneType
2019-05-03 19:13:41 +08:00
doc: >
The lane type of the current Waypoint, based on OpenDRIVE 1.4 standard.
2019-05-03 19:13:41 +08:00
- var_name: right_lane_marking
2019-06-04 00:35:57 +08:00
type: carla.LaneMarking
2019-05-03 19:13:41 +08:00
doc: >
The right lane marking information based on the direction of the Waypoint.
2019-05-03 19:13:41 +08:00
- var_name: left_lane_marking
2019-06-04 00:35:57 +08:00
type: carla.LaneMarking
2019-05-03 19:13:41 +08:00
doc: >
The left lane marking information based on the direction of the Waypoint.
2019-05-03 19:13:41 +08:00
# - METHODS ----------------------------
methods:
- def_name: get_left_lane
return: carla.Waypoint
doc: >
Generates a Waypoint at the center of the left lane based on the direction of the current Waypoint, taking into account if the lane change is allowed in this location.
Will return <b>None</b> if the lane does not exist
# --------------------------------------
- def_name: get_right_lane
return: carla.Waypoint
doc: >
Generates a waypoint at the center of the right lane based on the direction of the current waypoint, taking into account if the lane change is allowed in this location.
Will return <b>None</b> if the lane does not exist.
# --------------------------------------
2019-05-03 19:13:41 +08:00
- def_name: next
params:
2019-06-04 18:13:12 +08:00
- param_name: distance
type: float
doc: >
The approximate distance where to get the next waypoints.
2019-06-04 18:13:12 +08:00
return: list(carla.Waypoint)
2019-05-03 19:13:41 +08:00
doc: >
Returns a list of waypoints at a certain approximate `distance` from the current one. It takes into account the road and its possible deviations without performing any lane change and returns one waypoint per option.
The list may be empty if the lane is not connected to any other at the specified distance.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name: next_until_lane_end
params:
- param_name: distance
type: float
doc: >
The approximate distance between waypoints
return: list(carla.Waypoint)
2019-05-03 19:13:41 +08:00
doc: >
Returns a list of waypoints from this to the end of the lane separated by a certain `distance`.
2019-05-03 19:13:41 +08:00
# --------------------------------------
- def_name: previous
params:
- param_name: distance
type: float
doc: >
The approximate distance where to get the previous waypoints.
return: list(carla.Waypoint)
2019-05-03 19:13:41 +08:00
doc: >
This method does not return the waypoint previously visited by an actor, but a list of waypoints at an approximate `distance` but in the opposite direction of the lane. Similarly to **<font color="#7fb800">next()</font>**, it takes into account the road and its possible deviations without performing any lane change and returns one waypoint per option.
The list may be empty if the lane is not connected to any other at the specified distance.
# --------------------------------------
- def_name: previous_until_lane_start
params:
- param_name: distance
type: float
doc: >
The approximate distance between waypoints
return: list(carla.Waypoint)
doc: >
Returns a list of waypoints from this to the start of the lane separated by a certain `distance`.
2019-05-03 19:13:41 +08:00
# --------------------------------------
2020-02-17 17:34:06 +08:00
- def_name: get_landmarks
params:
- param_name: distance
type: float
doc: >
2020-02-18 19:58:14 +08:00
Distance to search for landmarks from the current waypoint (metres in OpenDRIVE).
2020-02-17 17:34:06 +08:00
- param_name: stop_at_junction
type: bool
default: False
doc: >
Enables or disables the landmark search through junctions.
return: list(carla.Landmark)
doc: >
Returns a list of landmarks in the road from the current waypoint until the specified distance.
# --------------------------------------
- def_name: get_landmarks_of_type
params:
- param_name: distance
type: float
doc: >
2020-02-18 19:58:14 +08:00
Distance to search for landmarks from the current waypoint (metres in OpenDRIVE).
2020-02-17 17:34:06 +08:00
- param_name: type
type: str
doc: >
2020-02-18 19:58:14 +08:00
Type of landmarks to search.
2020-02-17 17:34:06 +08:00
- param_name: stop_at_junction
type: bool
default: False
doc: >
Enables or disables the landmark search through junctions.
return: list(carla.Landmark)
doc: >
2020-02-18 19:58:14 +08:00
Returns a list of landmarks in the road of a certain type from the current waypoint until the specified distance.
2020-02-17 17:34:06 +08:00
# --------------------------------------
- def_name: __str__
# --------------------------------------
- class_name: Junction
# - DESCRIPTION ------------------------
doc: >
Class that embodies the intersections on the road described in the OpenDRIVE file according to OpenDRIVE 1.4 standards.
# - PROPERTIES -------------------------
instance_variables:
- var_name: id
type: int
doc: >
Identificator found in the OpenDRIVE file.
- var_name: bounding_box
type: carla.BoundingBox
doc: >
Bounding box encapsulating the junction lanes.
# - METHODS ----------------------------
methods:
- def_name: get_waypoints
params:
- param_name: lane_type
type: carla.LaneType
doc: >
Type of lanes to get the waypoints.
return: list(tuple(carla.Waypoint))
doc: >
Returns a list of pairs of waypoints. Every tuple on the list contains first an initial and then a final waypoint within the intersection boundaries that describe the beginning and the end of said lane along the junction. Lanes follow their OpenDRIVE definitions so there may be many different tuples with the same starting waypoint due to possible deviations, as this are considered different lanes.
# --------------------------------------
2020-02-17 17:34:06 +08:00
- class_name: LandmarkOrientation
# - DESCRIPTION ------------------------
doc: >
2020-02-20 18:26:23 +08:00
Helper class to define the orientation of a landmark in the road. The definition is not directly translated from OpenDRIVE but converted for the sake of understanding.
2020-02-17 17:34:06 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: Positive
doc: >
2020-02-18 19:58:14 +08:00
The landmark faces towards vehicles going on the same direction as the road's geometry definition (lanes 0 and negative in OpenDRIVE).
2020-02-17 17:34:06 +08:00
- var_name: Negative
doc: >
2020-02-18 19:58:14 +08:00
The landmark faces towards vehicles going on the opposite direction to the road's geometry definition (positive lanes in OpenDRIVE).
2020-02-17 17:34:06 +08:00
- var_name: Both
doc: >
2020-02-18 19:58:14 +08:00
Affects vehicles going in both directions of the road.
2020-02-17 17:34:06 +08:00
# --------------------------------------
- class_name: LandmarkType
# - DESCRIPTION ------------------------
doc: >
2020-02-20 18:26:23 +08:00
Helper class containing a set of commonly used landmark types as defined by the default country code in the [OpenDRIVE standard](http://opendrive.org/docs/OpenDRIVEFormatSpecRev1.5M.pdf) (Germany 2017).
2020-02-18 19:58:14 +08:00
__carla.Landmark does not reference this class__. The landmark type is a string that varies greatly depending on the country code being used. This class only makes it easier to manage some of the most commonly used in the default set by describing them as an enum.
2020-02-17 17:34:06 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: Danger
doc: >
Type 101.
- var_name: LanesMerging
doc: >
Type 121.
- var_name: CautionPedestrian
doc: >
Type 133.
- var_name: CautionBicycle
doc: >
Type 138.
- var_name: LevelCrossing
doc: >
Type 150.
- var_name: Stop
doc: >
Type 206.
- var_name: Yield
doc: >
Type 205.
- var_name: MandatoryTurnDirection
doc: >
Type 209.
- var_name: MandatoryLeftRightDirection
doc: >
Type 211.
- var_name: TwoChoiceTurnDirection
doc: >
Type 214.
- var_name: Roundabout
doc: >
Type 215.
- var_name: PassRightLeft
doc: >
Type 222.
- var_name: AccessForbidden
doc: >
Type 250.
- var_name: AccessForbiddenMotorvehicles
doc: >
Type 251.
- var_name: AccessForbiddenTrucks
doc: >
Type 253.
- var_name: AccessForbiddenBicycle
doc: >
Type 254.
- var_name: AccessForbiddenWeight
doc: >
Type 263.
- var_name: AccessForbiddenWidth
doc: >
Type 264.
- var_name: AccessForbiddenHeight
doc: >
Type 265.
- var_name: AccessForbiddenWrongDirection
doc: >
Type 267.
- var_name: ForbiddenUTurn
doc: >
Type 272.
- var_name: MaximumSpeed
doc: >
Type 274.
- var_name: ForbiddenOvertakingMotorvehicles
doc: >
Type 276.
- var_name: ForbiddenOvertakingTrucks
doc: >
Type 277.
- var_name: AbsoluteNoStop
doc: >
Type 283.
- var_name: RestrictedStop
doc: >
Type 286.
- var_name: HasWayNextIntersection
doc: >
Type 301.
- var_name: PriorityWay
doc: >
Type 306.
- var_name: PriorityWayEnd
doc: >
Type 307.
- var_name: CityBegin
doc: >
Type 310.
- var_name: CityEnd
doc: >
Type 311.
- var_name: Highway
doc: >
Type 330.
- var_name: RecomendedSpeed
doc: >
Type 380.
- var_name: RecomendedSpeedEnd
doc: >
Type 381.
# --------------------------------------
- class_name: Landmark
# - DESCRIPTION ------------------------
doc: >
2020-02-20 18:26:23 +08:00
Class that defines any type of traffic landmark or sign affecting a road. These class mediates between the [OpenDRIVE](http://opendrive.org/docs/OpenDRIVEFormatSpecRev1.5M.pdf) definition of the landmarks and their representation in the simulation.
This class retrieves all the information defining a landmark in OpenDRIVE and facilitates information about which lanes does it affect and when.
2020-02-18 19:58:14 +08:00
2020-02-20 18:26:23 +08:00
Landmarks will be accessed by carla.Waypoint objects trying to retrieve the regulation of their lane. Therefore some attributes depend on the waypoint that is consulting the landmark and so, creating the object.
2020-02-17 17:34:06 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: road_id
type: int
doc: >
2020-02-20 18:26:23 +08:00
The OpenDRIVE ID of the road where this landmark is defined. Due to OpenDRIVE road definitions, this road may be different from the road the landmark is currently affecting. It is mostly the case in junctions where the road diverges in different routes.
2020-02-18 19:58:14 +08:00
<small>Example: a traffic light is defined in one of the divergent roads in a junction, but it affects all the possible routes</small>
2020-02-17 17:34:06 +08:00
- var_name: distance
type: float
doc: >
2020-02-18 19:58:14 +08:00
Distance between the landmark and the waypoint creating the object (querying `get_landmarks` or `get_landmarks_of_type`).
2020-02-17 17:34:06 +08:00
- var_name: s
type: float
doc: >
2020-02-18 19:58:14 +08:00
Distance where the landmark is positioned along the geometry of the road `road_id`.
2020-02-17 17:34:06 +08:00
- var_name: t
type: float
doc: >
2020-02-18 19:58:14 +08:00
Lateral distance where the landmark is positioned from the edge of the road `road_id`.
2020-02-17 17:34:06 +08:00
- var_name: id
type: str
doc: >
2020-02-18 19:58:14 +08:00
Unique ID of the landmark in the OpenDRIVE file.
2020-02-17 17:34:06 +08:00
- var_name: name
type: str
doc: >
2020-02-18 19:58:14 +08:00
Name of the landmark in the in the OpenDRIVE file.
2020-02-17 17:34:06 +08:00
- var_name: is_dynamic
type: bool
doc: >
2020-02-18 19:58:14 +08:00
Indicates if the landmark has state changes over time such as traffic lights.
2020-02-17 17:34:06 +08:00
- var_name: orientation
2020-02-18 19:58:14 +08:00
type: carla.LandmarkOrientation
2020-02-17 17:34:06 +08:00
doc: >
2020-02-18 19:58:14 +08:00
Indicates which lanes the landmark is facing towards to.
2020-02-17 17:34:06 +08:00
- var_name: z_offset
type: float
doc: >
2020-02-18 19:58:14 +08:00
Height where the landmark is placed.
2020-02-17 17:34:06 +08:00
- var_name: country
type: str
doc: >
2020-02-18 19:58:14 +08:00
Country code where the landmark is defined (default to OpenDRIVE is Germany 2017).
2020-02-17 17:34:06 +08:00
- var_name: type
type: str
doc: >
2020-02-18 19:58:14 +08:00
Type identificator of the landmark according to the country code.
2020-02-17 17:34:06 +08:00
- var_name: sub_type
type: str
doc: >
2020-02-18 19:58:14 +08:00
Subtype identificator of the landmark according to the country code.
2020-02-17 17:34:06 +08:00
- var_name: value
type: float
doc: >
Value printed in the signal (e.g. speed limit, maximum weight, etc).
- var_name: unit
type: str
doc: >
2020-02-18 19:58:14 +08:00
Units of measurement for the attribute `value`.
2020-02-17 17:34:06 +08:00
- var_name: height
type: float
doc: >
Total height of the signal.
- var_name: width
type: float
doc: >
Total width of the signal.
- var_name: text
type: str
doc: >
Additional text in the signal.
- var_name: h_offset
type: float
doc: >
2020-02-20 18:26:23 +08:00
Orientation offset of the signal relative to the the definition of `road_id` at `s` in OpenDRIVE.
2020-02-17 17:34:06 +08:00
- var_name: pitch
type: float
doc: >
2020-02-18 19:58:14 +08:00
Pitch rotation of the signal.
2020-02-17 17:34:06 +08:00
- var_name: roll
type: float
doc: >
2020-02-18 19:58:14 +08:00
Roll rotation of the signal.
2020-02-17 17:34:06 +08:00
- var_name: waypoint
type: carla.Waypoint
doc: >
2020-02-18 19:58:14 +08:00
A waypoint placed in the lane of the one that made the query and at the `s` of the landmark. It is the first waypoint for which the landmark will be effective.
2020-02-17 17:34:06 +08:00
- var_name: transform
type: carla.Transform
doc: >
2020-02-18 19:58:14 +08:00
The location and orientation of the landmark in the simulation.
2020-02-17 17:34:06 +08:00
# - METHODS ----------------------------
methods:
- def_name: get_lane_validities
return: list(tuple(int))
doc: >
2020-02-20 18:26:23 +08:00
Returns which lanes the landmark is affecting to. As there may be specific lanes where the landmark is not effective, the return is a list of pairs containing ranges of the __lane_id__ affected:
2020-02-18 19:58:14 +08:00
<small>Example: In a road with 5 lanes, being 3 not affected: [(from_lane1,to_lane2),(from_lane4,to_lane5)]</small>
2020-02-17 17:34:06 +08:00
# --------------------------------------
2019-05-03 19:13:41 +08:00
...