maliput_dragway
Lane Class Referencefinal

Detailed Description

Dragway's implementation of api::Lane.

The lane is flat with a height of zero.

The following lane is implemented:

                    lane_bounds
       |<------------------------------->|
                  segment_bounds
   |<--------------------------------------->|
   -------------------------------------------  ———  s = length()
   |                    :                    |   ^
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |
   |                    :                    |   |           world
   |                    :                    |   |           frame:
   |                    :                    |   |
   |                    :                    |   |                X
   |                    :                    |   |                ^
   |                    :                    |   |                |
   |                    :                    |   v                |
   ---------------------o---------------------  ———  s = 0   Y <--o
           r_max                r_min
   |<-------------------|------------------->|
                                           y_offset
                        |<----------------------------------------|
 

The lane's frame is defined by three coordinates: (s, r, h). Coordinate s is between zero and length(). It specifies the longitudinal traversal of the lane. Coordinate r is a value between r_min and r_max. It specifies the lateral traversal at a particular s. Coordinate h specifies the height above the lane's surface at a particular s and r (the lane's surface itself is always at h = 0). Since Dragway lanes are flat and level, z = h for all values of s and r and, in the Dragway's case, z = 0 for the surface itself. The origin of the lane's frame is defined by the o along the above-shown s = 0 line.

Note
Each dragway lane has a teleportation feature at both ends: the (default) ongoing lane for LaneEnd::kFinish is LaneEnd::kStart of the same lane, and vice versa.

#include <include/maliput_dragway/lane.h>

Inheritance diagram for Lane:
[legend]

Public Member Functions

 Lane (const Segment *segment, const api::LaneId &id, int index, double length, double y_offset, const api::RBounds &lane_bounds, const api::RBounds &segment_bounds, const api::HBounds &elevation_bounds)
 Constructs a dragway Lane. More...
 
 ~Lane () final=default
 
double y_offset () const
 Returns the y-offset of this lane's frame relative to the world frame. More...
 
Methods that set the lanes to the left and right of this lane.

The corresponding accessors are api::Lane::to_left() and api::Lane::to_right().

void set_lane_to_left (api::Lane *lane_to_left)
 
void set_lane_to_right (api::Lane *lane_to_right)
 
- Public Member Functions inherited from Lane
LaneId id () const
 
const Segmentsegment () const
 
int index () const
 
const Laneto_left () const
 
const Laneto_right () const
 
double length () const
 
RBounds lane_bounds (double s) const
 
RBounds segment_bounds (double s) const
 
HBounds elevation_bounds (double s, double r) const
 
InertialPosition ToInertialPosition (const LanePosition &lane_pos) const
 
LanePositionResult ToLanePosition (const InertialPosition &inertial_pos) const
 
LanePositionResult ToSegmentPosition (const InertialPosition &inertial_pos) const
 
Rotation GetOrientation (const LanePosition &lane_pos) const
 
LanePosition EvalMotionDerivatives (const LanePosition &position, const IsoLaneVelocity &velocity) const
 
const BranchPointGetBranchPoint (const LaneEnd::Which which_end) const
 
const LaneEndSetGetConfluentBranches (const LaneEnd::Which which_end) const
 
const LaneEndSetGetOngoingBranches (const LaneEnd::Which which_end) const
 
std::optional< LaneEndGetDefaultBranch (const LaneEnd::Which which_end) const
 
bool Contains (const LanePosition &lane_position) const
 

Additional Inherited Members

- Protected Member Functions inherited from Lane
 Lane ()=default
 

Constructor & Destructor Documentation

◆ Lane()

Lane ( const Segment segment,
const api::LaneId id,
int  index,
double  length,
double  y_offset,
const api::RBounds lane_bounds,
const api::RBounds segment_bounds,
const api::HBounds elevation_bounds 
)

Constructs a dragway Lane.

Parameters
segmentThe Segment to which this lane belongs.
idthe lane ID. This can be any user-defined value.
indexThe index of the lane with its Segment.
lengthThe total length of the lane.
y_offsetThe vector from the world frame's origin to the lane's s = 0 and r = 0. This value is positive when the lane's s = 0 and r = 0 is to the left of the world frame's origin, and is negative otherwise.
lane_boundsnominal bounds of the lane, uniform along the entire reference path, which must be a subset of segment_bounds.
segment_boundsThe segment bounds of the lane, uniform along the entire reference path.
elevation_boundsThe elevation bounds of the lane, uniform along the entire reference path.

◆ ~Lane()

~Lane ( )
finalvirtualdefault

Reimplemented from Lane.

Member Function Documentation

◆ set_lane_to_left()

void set_lane_to_left ( api::Lane lane_to_left)

◆ set_lane_to_right()

void set_lane_to_right ( api::Lane lane_to_right)

◆ y_offset()

double y_offset ( ) const

Returns the y-offset of this lane's frame relative to the world frame.


The documentation for this class was generated from the following files: