|
maliput
|
A Lane represents a lane of travel in a road network.
A Lane defines a curvilinear coordinate system covering the road surface, with a longitudinal 's' coordinate that expresses the arc-length along a central reference curve. The reference curve nominally represents an ideal travel trajectory along the Lane.
Lanes are grouped by Segment. All Lanes belonging to a Segment represent the same road surface, but with different coordinate parameterizations (e.g., each Lane has its own reference curve).
#include <include/maliput/api/lane.h>
Public Member Functions | |
| virtual | ~Lane ()=default |
| LaneId | id () const |
| Returns the persistent identifier. More... | |
| const Segment * | segment () const |
| Returns the Segment to which this Lane belongs. More... | |
| int | index () const |
| Returns the index of this Lane within the Segment which owns it. More... | |
| const Lane * | to_left () const |
| Returns a pointer to the adjacent Lane to the left of this Lane. More... | |
| const Lane * | to_right () const |
| Returns a pointer to the adjacent Lane to the right of this Lane. More... | |
| double | length () const |
| Returns the arc-length of the Lane along its reference curve. More... | |
| RBounds | lane_bounds (double s) const |
| Returns the nominal lateral (r) bounds for the lane as a function of s. More... | |
| RBounds | segment_bounds (double s) const |
| Returns the lateral segment (r) bounds of the lane as a function of s. More... | |
| HBounds | elevation_bounds (double s, double r) const |
Returns the elevation (h) bounds of the lane as a function of (s, r). More... | |
| LaneType | type () const |
Returns the type of Lane, such as driving, biking, etc. More... | |
| InertialPosition | ToInertialPosition (const LanePosition &lane_pos) const |
Returns the maliput::api::InertialPosition corresponding to the given maliput::api::LanePosition. More... | |
| double | GetCurvature (const LanePosition &lane_pos) const |
Returns the signed Euclidean curvature at the given maliput::api::LanePosition. More... | |
| LanePositionResult | ToLanePosition (const InertialPosition &inertial_pos) const |
Determines the LanePosition corresponding to InertialPosition inertial_pos. More... | |
| LanePositionResult | ToSegmentPosition (const InertialPosition &inertial_pos) const |
Determines the LanePosition corresponding to InertialPosition inertial_pos. More... | |
| Rotation | GetOrientation (const LanePosition &lane_pos) const |
Returns the rotation which expresses the orientation of the Lane-frame basis at lane_pos with respect to the Inertial-frame basis. More... | |
| LanePosition | EvalMotionDerivatives (const LanePosition &position, const IsoLaneVelocity &velocity) const |
Computes derivatives of LanePosition given a velocity vector velocity. More... | |
| const BranchPoint * | GetBranchPoint (const LaneEnd::Which which_end) const |
Returns the lane's BranchPoint for the end specified by which_end. More... | |
| const LaneEndSet * | GetConfluentBranches (const LaneEnd::Which which_end) const |
Returns the set of LaneEnd's which connect with this lane on the same side of the BranchPoint at which_end. More... | |
| const LaneEndSet * | GetOngoingBranches (const LaneEnd::Which which_end) const |
Returns the set of LaneEnd's which continue onward from this lane at the BranchPoint at which_end. More... | |
| std::optional< LaneEnd > | GetDefaultBranch (const LaneEnd::Which which_end) const |
Returns the default ongoing LaneEnd connected at which_end, or std::nullopt if no default branch has been established at which_end. More... | |
| const LaneBoundary * | left_boundary () const |
| Returns the LaneBoundary at the left edge of this Lane. More... | |
| const LaneBoundary * | right_boundary () const |
| Returns the LaneBoundary at the right edge of this Lane. More... | |
| bool | Contains (const LanePosition &lane_position) const |
Returns if this lane contains lane_position. More... | |
| std::optional< bool > | is_intersection () const |
| Returns whether this lane is part of an intersection. More... | |
Protected Member Functions | |
| Lane ()=default | |
|
protecteddefault |
| bool Contains | ( | const LanePosition & | lane_position | ) | const |
Returns if this lane contains lane_position.
Returns the elevation (h) bounds of the lane as a function of (s, r).
These are the elevation bounds for a position that is considered to be within the Lane's volume modeled by the RoadGeometry.
s is within [0, length()] of this Lane and r is within lane_bounds(s).
| LanePosition EvalMotionDerivatives | ( | const LanePosition & | position, |
| const IsoLaneVelocity & | velocity | ||
| ) | const |
Computes derivatives of LanePosition given a velocity vector velocity.
velocity is a isometric velocity vector oriented in the Lane-frame at position.
Lane-frame derivatives packed into a LanePosition struct. | const BranchPoint * GetBranchPoint | ( | const LaneEnd::Which | which_end | ) | const |
Returns the lane's BranchPoint for the end specified by which_end.
| const LaneEndSet * GetConfluentBranches | ( | const LaneEnd::Which | which_end | ) | const |
Returns the set of LaneEnd's which connect with this lane on the same side of the BranchPoint at which_end.
At a minimum, this set will include this Lane.
| double GetCurvature | ( | const LanePosition & | lane_pos | ) | const |
Returns the signed Euclidean curvature at the given maliput::api::LanePosition.
The Euclidean curvature magnitude is defined as the reciprocal of the radius of the osculating circle at a given point on the curve: \( |\kappa| = 1/R \).
The sign convention follows the right-hand rule with respect to the lane's h-axis (vertical/normal direction):
| lane_pos | A maliput::api::LanePosition. The s component must be in domain [0, Lane::length()]. The r and h components are used to determine the curvature at the corresponding offset from the centerline. |
| std::optional< LaneEnd > GetDefaultBranch | ( | const LaneEnd::Which | which_end | ) | const |
Returns the default ongoing LaneEnd connected at which_end, or std::nullopt if no default branch has been established at which_end.
| const LaneEndSet * GetOngoingBranches | ( | const LaneEnd::Which | which_end | ) | const |
Returns the set of LaneEnd's which continue onward from this lane at the BranchPoint at which_end.
| Rotation GetOrientation | ( | const LanePosition & | lane_pos | ) | const |
Returns the rotation which expresses the orientation of the Lane-frame basis at lane_pos with respect to the Inertial-frame basis.
| LaneId id | ( | ) | const |
Returns the persistent identifier.
| std::optional< bool > is_intersection | ( | ) | const |
Returns whether this lane is part of an intersection.
true when lane belongs to an intersection. false when lane is known not to belong to an intersection. std::nullopt when intersection information is unavailable. Returns the nominal lateral (r) bounds for the lane as a function of s.
These are the lateral bounds for a position that is considered to be "staying in the lane".
| const LaneBoundary * left_boundary | ( | ) | const |
Returns the LaneBoundary at the left edge of this Lane.
The left boundary is in the +r direction (increasing r coordinate). This is equivalent to segment()->boundary(index() + 1).
| double length | ( | ) | const |
| const LaneBoundary * right_boundary | ( | ) | const |
Returns the LaneBoundary at the right edge of this Lane.
The right boundary is in the -r direction (decreasing r coordinate). This is equivalent to segment()->boundary(index()).
Returns the lateral segment (r) bounds of the lane as a function of s.
These are the lateral bounds for a position that is considered to be "on segment", reflecting the physical extent of the surface of the lane's segment.
| const Lane * to_left | ( | ) | const |
| const Lane * to_right | ( | ) | const |
| InertialPosition ToInertialPosition | ( | const LanePosition & | lane_pos | ) | const |
Returns the maliput::api::InertialPosition corresponding to the given maliput::api::LanePosition.
Note there is no constraint for the r coordinate, as it can be outside the lane boundaries. In that scenario, the resultant inertial position represents a point in the s-r plane at the given s and h coordinates. It's on the user side to verify, if needed, that the lane position is within lane boundaries.
lane_pos must be in domain [0, Lane::length()].| lane_pos | A maliput::api::LanePosition. Although the s component must be in domain [0, Lane::length()], the r component can be outside the lane's RBounds, so that the position is on the s-r plane. |
InertialPosition for the given lane_pos. | LanePositionResult ToLanePosition | ( | const InertialPosition & | inertial_pos | ) | const |
Determines the LanePosition corresponding to InertialPosition inertial_pos.
The LanePosition is expected to be contained within the lane's boundaries.
This method guarantees that its result satisfies the condition that ToInertialPosition(result.lane_position) is within linear_tolerance() of result.nearest_position.
| LanePositionResult ToSegmentPosition | ( | const InertialPosition & | inertial_pos | ) | const |
Determines the LanePosition corresponding to InertialPosition inertial_pos.
The LanePosition is expected to be contained within the segment's boundaries.
This method guarantees that its result satisfies the condition that ToInertialPosition(result.lane_position) is within linear_tolerance() of result.nearest_position.