Drake
SplineLane Class Reference

Specialization of drake::maliput::rndf::Lane with a spline curve as its reference path. More...

#include <drake/automotive/maliput/rndf/spline_lane.h>

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

Public Member Functions

 SplineLane (const api::LaneId &id, const api::Segment *segment, const std::vector< std::tuple< ignition::math::Vector3d, ignition::math::Vector3d >> &control_points, double width, int index)
 Constructs a SplineLane, a lane specified by a spline segment defined in the xy-plane (the ground plane) of the world frame. More...
 
 ~SplineLane () override=default
 
Does not allow copy, move, or assignment
 SplineLane (const SplineLane &)=delete
 
SplineLaneoperator= (const SplineLane &)=delete
 
 SplineLane (SplineLane &&)=delete
 
SplineLaneoperator= (SplineLane &&)=delete
 
- Public Member Functions inherited from Lane
 Lane (const api::LaneId &id, const api::Segment *segment, int index)
 Constructs a Lane. More...
 
void SetStartBp (BranchPoint *bp)
 Sets the pointer of the BranchPoint that contains a api::LaneEnd::Which::kStart value attached to this lane pointer. More...
 
void SetEndBp (BranchPoint *bp)
 Sets the pointer of the BranchPoint that contains a api::LaneEnd::Which::kFinish value attached to this lane pointer. More...
 
BranchPointstart_bp ()
 Getter of the BranchPoint set as starting. More...
 
BranchPointend_bp ()
 Getter of the BranchPoint set as ending. More...
 
 ~Lane () override=default
 
 Lane (const Lane &)=delete
 
Laneoperator= (const Lane &)=delete
 
 Lane (Lane &&)=delete
 
Laneoperator= (Lane &&)=delete
 
- Public Member Functions inherited from Lane
const LaneId id () const
 Returns the persistent identifier. More...
 
const Segmentsegment () const
 Returns the Segment to which this Lane belongs. More...
 
int index () const
 Returns the index of this Lane within the Segment which owns it. More...
 
const Laneto_left () const
 Returns a pointer to the adjacent Lane to the left of this Lane. More...
 
const Laneto_right () const
 Returns a pointer to the adjacent Lane to the right of this Lane. More...
 
double length () const
 Returns the arc-length of the Lane along its reference curve. More...
 
RBounds lane_bounds (double s) const
 Returns the nominal lateral (r) bounds for the lane as a function of s. More...
 
RBounds driveable_bounds (double s) const
 Returns the driveable lateral (r) bounds of the lane as a function of s. More...
 
HBounds elevation_bounds (double s, double r) const
 Returns the elevation (h) bounds of the lane as a function of (s, r). More...
 
GeoPosition ToGeoPosition (const LanePosition &lane_pos) const
 Returns the GeoPosition corresponding to the given LanePosition. More...
 
LanePosition ToLanePosition (const GeoPosition &geo_position, GeoPosition *nearest_point, double *distance) const
 Determines the LanePosition corresponding to GeoPosition geo_position. More...
 
Rotation GetOrientation (const LanePosition &lane_pos) const
 Returns the rotation which expresses the orientation of the Lane-frame basis at lane_pos with respect to the world frame basis. More...
 
LanePosition EvalMotionDerivatives (const LanePosition &position, const IsoLaneVelocity &velocity) const
 Computes derivatives of LanePosition given a velocity vector velocity. More...
 
const BranchPointGetBranchPoint (const LaneEnd::Which which_end) const
 Returns the lane's BranchPoint for the end specified by which_end. More...
 
const LaneEndSetGetConfluentBranches (const LaneEnd::Which which_end) const
 Returns the set of LaneEnd's which connect with this lane on the same side of the BranchPoint at which_end. More...
 
const LaneEndSetGetOngoingBranches (const LaneEnd::Which which_end) const
 Returns the set of LaneEnd's which continue onward from this lane at the BranchPoint at which_end. More...
 
std::unique_ptr< LaneEndGetDefaultBranch (const LaneEnd::Which which_end) const
 Returns the default ongoing LaneEnd connected at which_end. More...
 
 Lane (const Lane &)=delete
 
Laneoperator= (const Lane &)=delete
 
 Lane (Lane &&)=delete
 
Laneoperator= (Lane &&)=delete
 

Static Public Member Functions

static double ComputeLength (const std::vector< std::tuple< ignition::math::Vector3d, ignition::math::Vector3d >> &control_points)
 Computes the length of a SplineLane created using control_points. More...
 
static double SplineErrorBound ()
 

Additional Inherited Members

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

Detailed Description

Specialization of drake::maliput::rndf::Lane with a spline curve as its reference path.

RNDF specification lacks elevation and superelevation so all the Lanes will depict a flat path just over the ground.

Constructor & Destructor Documentation

SplineLane ( const SplineLane )
delete
SplineLane ( SplineLane &&  )
delete
SplineLane ( const api::LaneId id,
const api::Segment segment,
const std::vector< std::tuple< ignition::math::Vector3d, ignition::math::Vector3d >> &  control_points,
double  width,
int  index 
)

Constructs a SplineLane, a lane specified by a spline segment defined in the xy-plane (the ground plane) of the world frame.

Parameters
idThe ID of the api::Lane.
segmentA pointer to the segment that contains this lane, which must remain valid for the lifetime of this class.
control_pointsA collection of knots and their tangents where the interpolated curve will pass. There must be at least two control points. The tuple's first value is the knot point while its second value is the tangent at the knot point.
widthThe width of the lane based on the RNDF lane_width parameter. It will be used to set a constant lane_bound value along the road.
indexThe index that can be used to reference this Lane from api::Segment::lane() call.

This implementation uses ignition::math::Spline and ArcLengthParameterizedSpline which is used as the inverse function that maps the s parameter of s,r,h frame to ignition::math's Spline t parameter.

Exceptions
std::runtime_errorWhen the size of control_points is less than

Here is the call graph for this function:

~SplineLane ( )
overridedefault

Member Function Documentation

double ComputeLength ( const std::vector< std::tuple< ignition::math::Vector3d, ignition::math::Vector3d >> &  control_points)
static

Computes the length of a SplineLane created using control_points.

Parameters
control_pointsA collection of knots and their tangents where the interpolated curve will pass. There must be at least two control points. The tuple's first value is the knot point while its second value is the tangent at the knot point.
Returns
The length of the baseline computed as a spline.
Exceptions
std::runtime_errorWhen the size of control_points is less than

Here is the caller graph for this function:

SplineLane& operator= ( SplineLane &&  )
delete
SplineLane& operator= ( const SplineLane )
delete
static double SplineErrorBound ( )
inlinestatic
Returns
the error bound that the path length interpolator will attempt to attain when approximating the inverse function that maps the s coordinate of api::LanePosition frame into the t parameter that ignition::math::Spline uses to evaluate the function.

Here is the caller graph for this function:


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