|
maliput
|
Represents a boundary between adjacent lanes or at the edge of a Segment.
A LaneBoundary is owned by a Segment and serves as the interface between two adjacent lanes, or between a lane and the segment edge. For a Segment with N lanes, there are N+1 boundaries:
Where:
Each LaneBoundary provides:
The design ensures that adjacent lanes share the same boundary object, avoiding redundancy and ensuring consistency. For example, Lane 1's right boundary is the same object as Lane 0's left boundary (Boundary 1).
This design is influenced by OpenDRIVE's road marking model and OSI's lane boundary concept.
#include <include/maliput/api/lane_boundary.h>
Public Types | |
| using | Id = TypeSpecificIdentifier< class LaneBoundary > |
| Unique identifier for a LaneBoundary. More... | |
Public Member Functions | |
| virtual | ~LaneBoundary ()=default |
| Id | id () const |
| const Segment * | segment () const |
| int | index () const |
| const Lane * | lane_to_left () const |
| const Lane * | lane_to_right () const |
| std::optional< LaneMarkingResult > | GetMarking (double s) const |
| Gets the lane marking at a specific s-coordinate along this boundary. More... | |
| std::vector< LaneMarkingResult > | GetMarkings () const |
| Gets all lane markings along this boundary. More... | |
| std::vector< LaneMarkingResult > | GetMarkings (double s_start, double s_end) const |
| Gets lane markings within a specified s-range. More... | |
Protected Member Functions | |
| LaneBoundary ()=default | |
| using Id = TypeSpecificIdentifier<class LaneBoundary> |
Unique identifier for a LaneBoundary.
|
virtualdefault |
Reimplemented in LaneBoundary.
|
protecteddefault |
| std::optional<LaneMarkingResult> GetMarking | ( | double | s | ) | const |
Gets the lane marking at a specific s-coordinate along this boundary.
| s | The s-coordinate along the boundary (in the lane coordinate system). Typically in the range [0, segment_length]. |
| std::vector<LaneMarkingResult> GetMarkings | ( | ) | const |
Gets all lane markings along this boundary.
type == kNone to indicate sections without visible markings. | std::vector<LaneMarkingResult> GetMarkings | ( | double | s_start, |
| double | s_end | ||
| ) | const |
Gets lane markings within a specified s-range.
| s_start | Start of the s-range to query [m]. |
| s_end | End of the s-range to query [m]. |
| maliput::common::assertion_error | if s_start > s_end. |
| Id id | ( | ) | const |
| int index | ( | ) | const |
Boundaries are indexed from 0 (rightmost, minimum r) to num_lanes() (leftmost, maximum r).
| const Lane* lane_to_left | ( | ) | const |
| const Lane* lane_to_right | ( | ) | const |
| const Segment* segment | ( | ) | const |