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, const LineOffset &line_offset, double linear_tolerance, double scale_length, ComputationPolicy computation_policy)
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, double linear_tolerance, double scale_length, ComputationPolicy computation_policy)
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...

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

double linear_tolerance () const
Returns the linear tolerance, in meters, that applies to RoadCurve instances as constructed by this Connection. More...

double scale_length () const
Returns the scale length, in meters, that applies to RoadCurve instances as constructed by this Connection. More...

ComputationPolicy computation_policy () const
Returns the computation policy that applies to RoadCurve instances as constructed by this Connection. 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...

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, const LineOffset & line_offset, double linear_tolerance, double scale_length, ComputationPolicy computation_policy )

Constructs a line-segment connection.

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

line_offset holds the length of the line.

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.

scale_length constrains the maximum level of detail captured by the underlying RoadCurve.

linear_tolerance and computation_policy set the efficiency vs. speed balance for computations in the underlying RoadCurve.

 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, double linear_tolerance, double scale_length, ComputationPolicy computation_policy )

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.

linear_tolerance applies to all RoadCurve-level computations. It must be positive.

scale_length constrains the maximum level of detail captured by the underlying RoadCurve. It must be positive.

computation_policy sets the speed vs. accuracy for computations in the underlying RoadCurve.

## Member Function Documentation

 ComputationPolicy computation_policy ( ) const
inline

Returns the computation policy that applies to RoadCurve instances as constructed by this Connection.

Refer to RoadCurve class documentation for further details.

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

 double d_theta ( ) const
inline

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

 const Endpoint& end ( ) const
inline

Returns the parameters of the endpoint.

 const std::string& id ( ) const
inline

Returns the ID string.

 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.

 double lane_width ( ) const
inline

Returns lanes' width.

 Endpoint LaneEnd ( int lane_index ) const

Returns an Endpoint describing the end of the lane_index lane.

 Endpoint LaneStart ( int lane_index ) const

Returns an Endpoint describing the start of the lane_index lane.

 double left_shoulder ( ) const
inline

Returns the left shoulder distance of the segment.

 double line_length ( ) const
inline

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

 double linear_tolerance ( ) const
inline

Returns the linear tolerance, in meters, that applies to RoadCurve instances as constructed by this Connection.

Refer to RoadCurve class documentation for further details.

 int num_lanes ( ) const
inline

Returns the number of lanes the Segment will contain.

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

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

 double r_max ( ) const
inline

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

 double r_min ( ) const
inline

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

inline

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

 double right_shoulder ( ) const
inline

Returns the right shoulder distance of the segment.

 double scale_length ( ) const
inline

Returns the scale length, in meters, that applies to RoadCurve instances as constructed by this Connection.

Refer to RoadCurve class documentation for further details.

 const Endpoint& start ( ) const
inline

Returns the parameters of the start point.

 Type type ( ) const
inline

Returns the geometric type of the path.

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