Drake

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 arcsegment. 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 linesegment 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 arcsegment connection. More...  
Type  type () const 
Returns the geometric type of the path. More...  
const std::string &  id () const 
Returns the ID string. More...  
const Endpoint &  start () const 
Returns the parameters of the start point. More...  
const Endpoint &  end () 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...  
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...  
std::unique_ptr< RoadCurve >  CreateRoadCurve () const 
Creates a RoadCurve that describes the reference curve of this Connection. More...  
Does not allow copy, move, or assignment  
Connection (const Connection &)=delete  
Connection &  operator= (const Connection &)=delete 
Connection (Connection &&)=delete  
Connection &  operator= (Connection &&)=delete 
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 (locallyflat) plane of the earth. The outofplane shape of the path will be determined by the EndpointZ (elevation) parameters of the endpoints.
enum Type 

delete 

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 linesegment 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 arcsegment 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 RoadCurvelevel 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.

inline 
Returns the computation policy that applies to RoadCurve instances as constructed by this Connection.
Refer to RoadCurve class documentation for further details.
std::unique_ptr< RoadCurve > CreateRoadCurve  (  )  const 
Creates a RoadCurve that describes the reference curve of this Connection.

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

inline 
Returns the parameters of the endpoint.

inline 
Returns the ID string.
Returns lane_index
lane lateral distance to the reference curve.
lane_index
must be nonnegative and smaller than the number of lanes of this connection.

inline 
Returns lanes' width.
Returns an Endpoint describing the end of the lane_index
lane.
Returns an Endpoint describing the start of the lane_index
lane.

inline 
Returns the left shoulder distance of the segment.

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

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.

inline 

delete 

delete 

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

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

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

inline 
Returns the right shoulder distance of the segment.

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.

inline 
Returns the parameters of the start point.

inline 
Returns the geometric type of the path.