Drake
Connection Class Reference

Representation of a reference path connecting two endpoints. More...

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

Public Types

enum  Type { kLine, kArc }
 Possible connection geometries: line- or arc-segment. More...
 

Public Member Functions

 Connection (const std::string &id, const Endpoint &start, const EndpointZ &end_z, int num_lanes, double r0, double lane_width, double left_shoulder, double right_shoulder, double line_length)
 Constructs a line-segment connection. More...
 
 Connection (const std::string &id, const Endpoint &start, const EndpointZ &end_z, int num_lanes, double r0, double lane_width, double left_shoulder, double right_shoulder, const ArcOffset &arc_offset)
 Constructs an arc-segment connection. More...
 
Type type () const
 Returns the geometric type of the path. More...
 
const std::string & id () const
 Returns the ID string. More...
 
const Endpointstart () const
 Returns the parameters of the start point. More...
 
const Endpointend () const
 Returns the parameters of the endpoint. More...
 
double line_length () const
 Returns the length of the line (for line connections only). More...
 
double radius () const
 Returns the radius of the arc (for arc connections only). More...
 
double d_theta () const
 Returns the angle of the arc (for arc connections only). More...
 
int num_lanes () const
 Returns the number of lanes the Segment will contain. More...
 
double r0 () const
 Returns the lateral offset from the reference curve to the first Lane centerline. More...
 
double lane_width () const
 Returns lanes' width. More...
 
double left_shoulder () const
 Returns the left shoulder distance of the segment. More...
 
double right_shoulder () const
 Returns the right shoulder distance of the segment. More...
 
double lane_offset (int lane_index) const
 Returns lane_index lane lateral distance to the reference curve. More...
 
double r_min () const
 Returns the distance from the reference curve to the right extent of the Segment. More...
 
double r_max () const
 Returns the distance from the reference curve to the left extent of the Segment. More...
 
Endpoint LaneStart (int lane_index) const
 Returns an Endpoint describing the start of the lane_index lane. More...
 
Endpoint LaneEnd (int lane_index) const
 Returns an Endpoint describing the end of the lane_index lane. More...
 
std::unique_ptr< RoadCurveCreateRoadCurve () const
 Creates a RoadCurve that describes the reference curve of this Connection. More...
 
Does not allow copy, move, or assignment
 Connection (const Connection &)=delete
 
Connectionoperator= (const Connection &)=delete
 
 Connection (Connection &&)=delete
 
Connectionoperator= (Connection &&)=delete
 

Detailed Description

Representation of a reference path connecting two endpoints.

Upon building the RoadGeometry, a Connection yields a Segment bearing multiple Lanes with offsets from the reference path. The Segment will belong to its own Junction, unless the Connection was grouped with other Connections into a Group.

Two connection geometries are supported: line and arc. These primitives determine the projection of the reference path onto the (locally-flat) plane of the earth. The out-of-plane shape of the path will be determined by the EndpointZ (elevation) parameters of the endpoints.

Member Enumeration Documentation

enum Type

Possible connection geometries: line- or arc-segment.

Enumerator
kLine 
kArc 

Constructor & Destructor Documentation

Connection ( const Connection )
delete
Connection ( Connection &&  )
delete
Connection ( const std::string &  id,
const Endpoint start,
const EndpointZ end_z,
int  num_lanes,
double  r0,
double  lane_width,
double  left_shoulder,
double  right_shoulder,
double  line_length 
)

Constructs a line-segment connection.

Segment's reference curve begins at start and extends on the plane z=0 line_length distance with start.xy().heading() heading angle. end_z will be used to build elevation and superelevation information of the road.

line_length must be non negative.

Segments will contain num_lanes lanes, which must be greater than zero. First Lane centerline will be placed at r0 distance from the reference curve. Each lane's width will be lane_width, which should be greater or equal to zero.

left_shoulder and right_shoulder are extra spaces added to the right and left side of the first and last lanes of the Segment. They will be added to Segment's bounds and must be greater or equal to zero.

Here is the call graph for this function:

Connection ( const std::string &  id,
const Endpoint start,
const EndpointZ end_z,
int  num_lanes,
double  r0,
double  lane_width,
double  left_shoulder,
double  right_shoulder,
const ArcOffset arc_offset 
)

Constructs an arc-segment connection.

Segment's reference curve begins at start and extends on the plane z=0 with arc_offset.radius() and angle span of arc_offset.d_theta(). end_z will be used to build elevation and superelevation information of the road.

arc_offset.radius() must be positive. arc_offset.d_theta() > 0 indicates a counterclockwise arc from start with initial heading angle start.heading().

Segments will contain num_lanes lanes, which must be greater than zero. First Lane centerline will be placed at r0 distance from the reference curve. Each lane's width will be lane_width, which should be greater or equal to zero.

left_shoulder and right_shoulder are extra spaces added to the right and left side of the first and last lanes of the Segment. They will be added to Segment's bounds and must be greater or equal to zero.

Here is the call graph for this function:

Member Function Documentation

std::unique_ptr< RoadCurve > CreateRoadCurve ( ) const

Creates a RoadCurve that describes the reference curve of this Connection.

Here is the call graph for this function:

Here is the caller graph for this function:

double d_theta ( ) const
inline

Returns the angle of the arc (for arc connections only).

Here is the caller graph for this function:

const Endpoint& end ( ) const
inline

Returns the parameters of the endpoint.

Here is the caller graph for this function:

const std::string& id ( ) const
inline

Returns the ID string.

Here is the caller graph for this function:

double lane_offset ( int  lane_index) const
inline

Returns lane_index lane lateral distance to the reference curve.

lane_index must be non-negative and smaller than the number of lanes of this connection.

Here is the caller graph for this function:

double lane_width ( ) const
inline

Returns lanes' width.

Here is the caller graph for this function:

Endpoint LaneEnd ( int  lane_index) const

Returns an Endpoint describing the end of the lane_index lane.

Here is the call graph for this function:

Here is the caller graph for this function:

Endpoint LaneStart ( int  lane_index) const

Returns an Endpoint describing the start of the lane_index lane.

Here is the call graph for this function:

Here is the caller graph for this function:

double left_shoulder ( ) const
inline

Returns the left shoulder distance of the segment.

Here is the caller graph for this function:

double line_length ( ) const
inline

Returns the length of the line (for line connections only).

Here is the caller graph for this function:

int num_lanes ( ) const
inline

Returns the number of lanes the Segment will contain.

Here is the caller graph for this function:

Connection& operator= ( Connection &&  )
delete
Connection& operator= ( const Connection )
delete
double r0 ( ) const
inline

Returns the lateral offset from the reference curve to the first Lane centerline.

Here is the caller graph for this function:

double r_max ( ) const
inline

Returns the distance from the reference curve to the left extent of the Segment.

Here is the caller graph for this function:

double r_min ( ) const
inline

Returns the distance from the reference curve to the right extent of the Segment.

Here is the caller graph for this function:

double radius ( ) const
inline

Returns the radius of the arc (for arc connections only).

Here is the caller graph for this function:

double right_shoulder ( ) const
inline

Returns the right shoulder distance of the segment.

Here is the caller graph for this function:

const Endpoint& start ( ) const
inline

Returns the parameters of the start point.

Here is the caller graph for this function:

Type type ( ) const
inline

Returns the geometric type of the path.

Here is the caller graph for this function:


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