maliput_dragway
|
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.
#include <include/maliput_dragway/lane.h>
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 Segment * | segment () const |
int | index () const |
const Lane * | to_left () const |
const Lane * | to_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 BranchPoint * | GetBranchPoint (const LaneEnd::Which which_end) const |
const LaneEndSet * | GetConfluentBranches (const LaneEnd::Which which_end) const |
const LaneEndSet * | GetOngoingBranches (const LaneEnd::Which which_end) const |
std::optional< LaneEnd > | GetDefaultBranch (const LaneEnd::Which which_end) const |
bool | Contains (const LanePosition &lane_position) const |
Additional Inherited Members | |
Protected Member Functions inherited from Lane | |
Lane ()=default | |
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.
segment | The Segment to which this lane belongs. |
id | the lane ID. This can be any user-defined value. |
index | The index of the lane with its Segment. |
length | The total length of the lane. |
y_offset | The 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_bounds | nominal bounds of the lane, uniform along the entire reference path, which must be a subset of segment_bounds . |
segment_bounds | The segment bounds of the lane, uniform along the entire reference path. |
elevation_bounds | The elevation bounds of the lane, uniform along the entire reference path. |
void set_lane_to_left | ( | api::Lane * | lane_to_left | ) |
void set_lane_to_right | ( | api::Lane * | lane_to_right | ) |
double y_offset | ( | ) | const |
Returns the y-offset of this lane's frame relative to the world frame.