Segment Class Reference

An api::Segment implementation. More...

#include <drake/automotive/maliput/multilane/segment.h>

Public Member Functions

 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
Does not allow copy, move, or assignment
 Segment (const Segment &)=delete
Segmentoperator= (const Segment &)=delete
 Segment (Segment &&)=delete
Segmentoperator= (Segment &&)=delete
- Public Member Functions inherited from Segment
const SegmentId id () const
 Returns the persistent identifier. More...
const Junctionjunction () const
 Returns the Junction to which this Segment belongs. More...
int num_lanes () const
 Returns the number of Lanes contained in this Segment. More...
const Lanelane (int index) const
 Returns the Lane indexed by index. More...
 Segment (const Segment &)=delete
Segmentoperator= (const Segment &)=delete
 Segment (Segment &&)=delete
Segmentoperator= (Segment &&)=delete

Additional Inherited Members

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

Detailed Description

An api::Segment implementation.

Constructor & Destructor Documentation

◆ Segment() [1/3]

Segment ( const Segment )

◆ Segment() [2/3]

Segment ( Segment &&  )

◆ Segment() [3/3]

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.

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 ( )

Reimplemented from Segment.

Member Function Documentation

◆ 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).

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.
A Lane object.

◆ operator=() [1/2]

Segment& operator= ( const Segment )

◆ operator=() [2/2]

Segment& operator= ( Segment &&  )

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