Drake
Segment Class Reference

An api::Segment implementation. More...

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

Inheritance diagram for Segment:
[legend]
Collaboration diagram for Segment:
[legend]

Public Member Functions

 Segment (const api::SegmentId &id, api::Junction *junction, 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 ( const Segment )
delete
Segment ( Segment &&  )
delete
Segment ( const api::SegmentId id,
api::Junction junction,
std::unique_ptr< RoadCurve road_curve,
double  r_min,
double  r_max,
const api::HBounds elevation_bounds 
)
inline

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

Here is the call graph for this function:

~Segment ( )
overridevirtualdefault

Reimplemented from Segment.

Here is the caller graph for this function:

Member Function Documentation

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.

Here is the call graph for this function:

Here is the caller graph for this function:

Segment& operator= ( const Segment )
delete
Segment& operator= ( Segment &&  )
delete

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