maliput_multilane
Segment Class Reference

Detailed Description

An api::Segment implementation.

#include <src/maliput_multilane/segment.h>

Inheritance diagram for Segment:
[legend]

Public Member Functions

 MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (Segment)
 
 Segment (const api::SegmentId &id, const api::Junction *junction, const std::function< void(const api::Lane *)> &register_lane, std::unique_ptr< RoadCurve > road_curve, double r_min, double r_max, const api::HBounds &elevation_bounds)
 Constructs a new Segment. More...
 
LaneNewLane (api::LaneId id, double r0, const api::RBounds &lane_bounds)
 Creates a new Lane object. More...
 
 ~Segment () override=default
 
- Public Member Functions inherited from Segment
SegmentId id () const
 
const Junctionjunction () const
 
int num_lanes () const
 
const Lanelane (int index) const
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ Segment()

Segment ( const api::SegmentId id,
const api::Junction junction,
const std::function< void(const api::Lane *)> &  register_lane,
std::unique_ptr< RoadCurve road_curve,
double  r_min,
double  r_max,
const api::HBounds elevation_bounds 
)

Constructs a new Segment.

The Segment is not fully initialized until NewLane() is called at least once. junction must remain valid for the lifetime of this class.

Parameters
idSegment's ID.
junctionParent junction.
register_lanewill be called on any new Lane instance created as a child of the Segment.
road_curveA curve that defines the reference trajectory over the segment. A child Lane object will be constructed from an offset of the road_curve's reference curve.
r_minLateral distance to the minimum extent of road_curve's curve from where Segment's surface starts. It must be smaller or equal than r_max.
r_maxLateral distance to the maximum extent of road_curve's curve from where Segment's surface ends. It should be greater or equal than r_min.
elevation_boundsThe height bounds over the segment' surface.

◆ ~Segment()

~Segment ( )
overridevirtualdefault

Reimplemented from Segment.

Member Function Documentation

◆ MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN ( Segment  )

◆ NewLane()

Lane * NewLane ( api::LaneId  id,
double  r0,
const api::RBounds lane_bounds 
)

Creates a new Lane object.

Driveable bounds of the lane will be derived based on the lateral offset of it so as to reach r_min and r_max distances (see class constructor for more details).

Parameters
idLane's ID.
r0Lateral displacement of the Lane with respect to segment RoadCurve's reference curve. It must be greater than r_min and smaller than r_max, and be greater than the last lane's r0 displacement (if any).
lane_boundsNominal bounds of the lane, uniform along the entire reference path. It must fit inside segments bounds when those are translated to r0 offset distance.
Returns
A Lane object.

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