Drake
Builder Class Reference

Convenient builder class which makes it easy to construct a multilane road network. More...

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

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

Public Member Functions

 Builder (double lane_width, const api::HBounds &elevation_bounds, double linear_tolerance, double angular_tolerance, double scale_length, ComputationPolicy computation_policy)
 Constructs a Builder which can be used to specify and assemble a multilane implementation of an api::RoadGeometry. More...
 
double get_lane_width () const override
 Gets lane_width value. More...
 
const api::HBoundsget_elevation_bounds () const override
 Gets elevation_bounds value. More...
 
double get_linear_tolerance () const override
 Gets linear_tolerance value. More...
 
double get_angular_tolerance () const override
 Gets angular_tolerance value. More...
 
double get_scale_length () const override
 Gets scale_length value. More...
 
ComputationPolicy get_computation_policy () const override
 Gets computation_policy value. More...
 
const ConnectionConnect (const std::string &id, const LaneLayout &lane_layout, const StartReference::Spec &start_spec, const LineOffset &line_offset, const EndReference::Spec &end_spec) override
 Connects start_spec's Endpoint to an end-point linearly displaced from start_spec's Endpoint. More...
 
const ConnectionConnect (const std::string &id, const LaneLayout &lane_layout, const StartReference::Spec &start_spec, const ArcOffset &arc_offset, const EndReference::Spec &end_spec) override
 Connects start_spec's Endpoint to an end-point displaced from start_spec's Endpoint via an arc. More...
 
const ConnectionConnect (const std::string &id, const LaneLayout &lane_layout, const StartLane::Spec &start_spec, const LineOffset &line_offset, const EndLane::Spec &end_spec) override
 Creates a Connection whose planar reference curve is a line. More...
 
const ConnectionConnect (const std::string &id, const LaneLayout &lane_layout, const StartLane::Spec &start_spec, const ArcOffset &arc_offset, const EndLane::Spec &end_spec) override
 Creates a Connection whose planar reference curve is an arc. More...
 
void SetDefaultBranch (const Connection *in, int in_lane_index, const api::LaneEnd::Which in_end, const Connection *out, int out_lane_index, const api::LaneEnd::Which out_end) override
 Sets the default branch for one end of a connection. More...
 
GroupMakeGroup (const std::string &id) override
 Creates a new empty connection group with ID string id. More...
 
GroupMakeGroup (const std::string &id, const std::vector< const Connection * > &connections) override
 Creates a new connection group with ID id, populated with the given connections. More...
 
std::unique_ptr< const api::RoadGeometryBuild (const api::RoadGeometryId &id) const override
 Produces a RoadGeometry, with the ID id. More...
 
Does not allow copy, move, or assignment
 Builder (const Builder &)=delete
 
Builderoperator= (const Builder &)=delete
 
 Builder (Builder &&)=delete
 
Builderoperator= (Builder &&)=delete
 
- Public Member Functions inherited from BuilderBase
 BuilderBase ()=default
 
virtual ~BuilderBase ()=default
 
 BuilderBase (const BuilderBase &)=delete
 
BuilderBaseoperator= (const BuilderBase &)=delete
 
 BuilderBase (BuilderBase &&)=delete
 
BuilderBaseoperator= (BuilderBase &&)=delete
 

Detailed Description

Convenient builder class which makes it easy to construct a multilane road network.

multilane is a simple road-network implementation:

  • multiple lanes per segment;
  • constant lane width, lane_bounds, and elevation_bounds, same for all lanes;
  • only linear and constant-curvature-arc primitives in XY-plane;
  • cubic polynomials (parameterized on XY-arc-length) for elevation and superelevation;
  • superelevation (bank of road) rotates around the reference line (r = 0) of the path.

The Builder class simplifies the assembly of multilane road network components into a valid RoadGeometry. In the Builder model, an Endpoint specifies a point in world coordinates (along with a direction, slope, and superelevation parameters). A Connection is a path from an explicit start Endpoint to an end Endpoint calculated via a linear (LineOffset) or arc displacement (ArcOffset). A Group is a collection of Connections.

Builder::Build() constructs a RoadGeometry. Each Connection yields a Segment bearing multiple Lanes. Each Group yields a Junction containing the Segments associated with the grouped Connections; ungrouped Connections each receive their own Junction.

Specific suffixes are used to name Maliput entities. The following list explains the naming convention:

Note: 'lane_index' is the index in the Segment, and 'branch_point_index' is is the index in the RoadGeometry.

Constructor & Destructor Documentation

Builder ( const Builder )
delete
Builder ( Builder &&  )
delete
Builder ( double  lane_width,
const api::HBounds elevation_bounds,
double  linear_tolerance,
double  angular_tolerance,
double  scale_length,
ComputationPolicy  computation_policy 
)

Constructs a Builder which can be used to specify and assemble a multilane implementation of an api::RoadGeometry.

lane_width is the width assigned to all Lanes. It must be greater or equal to zero. Lane reference path (which are offsets of parent Segment reference curve) are centered within the Lane. Lane spacing will be lane_width too. Segment extents will be derived from the composition of left and right shoulders, number of lanes and lane spacing. The elevation_bounds is applied uniformly to all lanes of every segment. linear_tolerance and angular_tolerance specify the respective tolerances for the resulting RoadGeometry. scale_length constrains the maximum level of detail captured by the resulting RoadGeometry. computation_policy sets the speed vs. accuracy balance for computations.

Here is the call graph for this function:

Member Function Documentation

std::unique_ptr< const api::RoadGeometry > Build ( const api::RoadGeometryId id) const
overridevirtual

Produces a RoadGeometry, with the ID id.

Implements BuilderBase.

Here is the call graph for this function:

const Connection * Connect ( const std::string &  id,
const LaneLayout lane_layout,
const StartReference::Spec start_spec,
const LineOffset line_offset,
const EndReference::Spec end_spec 
)
overridevirtual

Connects start_spec's Endpoint to an end-point linearly displaced from start_spec's Endpoint.

line_offset specifies the length of displacement (in the direction of the heading of start_spec's Endpoint). end_spec specifies the elevation characteristics at the end-point.

lane_layout defines the number of lanes, their width, extra shoulder asphalt extensions and placing with respect to connection's reference curve.

Implements BuilderBase.

Here is the call graph for this function:

const Connection * Connect ( const std::string &  id,
const LaneLayout lane_layout,
const StartReference::Spec start_spec,
const ArcOffset arc_offset,
const EndReference::Spec end_spec 
)
overridevirtual

Connects start_spec's Endpoint to an end-point displaced from start_spec's Endpoint via an arc.

arc_offset specifies the shape of the arc. end_spec specifies the elevation characteristics at the end-point.

lane_layout defines the number of lanes, their width, extra shoulder asphalt extensions and placing with respect to connection's reference curve.

Implements BuilderBase.

Here is the call graph for this function:

const Connection * Connect ( const std::string &  id,
const LaneLayout lane_layout,
const StartLane::Spec start_spec,
const LineOffset line_offset,
const EndLane::Spec end_spec 
)
overridevirtual

Creates a Connection whose planar reference curve is a line.

start_spec.lane_id() lane starts at start_spec.endpoint() and end_spec.lane_id() lane ends with end_spec.endpoint_z() which specifies the elevation characteristics.

line_offset specifies the length of displacement (in the direction of the heading of start_spec's Endpoint).

lane_layout defines the number of lanes, their width, extra shoulder asphalt extensions and placing with respect to connection's reference curve.

Implements BuilderBase.

Here is the call graph for this function:

const Connection * Connect ( const std::string &  id,
const LaneLayout lane_layout,
const StartLane::Spec start_spec,
const ArcOffset arc_offset,
const EndLane::Spec end_spec 
)
overridevirtual

Creates a Connection whose planar reference curve is an arc.

start_spec.lane_id() lane starts at start_spec.endpoint() and end_spec.lane_id() lane ends with end_spec.endpoint_z() which specifies the elevation characteristics.

arc_offset specifies the shape of the arc.

lane_layout defines the number of lanes, their width, extra shoulder asphalt extensions and placing with respect to connection's reference curve.

Implements BuilderBase.

Here is the call graph for this function:

double get_angular_tolerance ( ) const
inlineoverridevirtual

Gets angular_tolerance value.

Implements BuilderBase.

ComputationPolicy get_computation_policy ( ) const
inlineoverridevirtual

Gets computation_policy value.

Implements BuilderBase.

Here is the call graph for this function:

const api::HBounds& get_elevation_bounds ( ) const
inlineoverridevirtual

Gets elevation_bounds value.

Implements BuilderBase.

double get_lane_width ( ) const
inlineoverridevirtual

Gets lane_width value.

Implements BuilderBase.

double get_linear_tolerance ( ) const
inlineoverridevirtual

Gets linear_tolerance value.

Implements BuilderBase.

double get_scale_length ( ) const
inlineoverridevirtual

Gets scale_length value.

Implements BuilderBase.

Group * MakeGroup ( const std::string &  id)
overridevirtual

Creates a new empty connection group with ID string id.

Implements BuilderBase.

Group * MakeGroup ( const std::string &  id,
const std::vector< const Connection * > &  connections 
)
overridevirtual

Creates a new connection group with ID id, populated with the given connections.

Implements BuilderBase.

Here is the call graph for this function:

Builder& operator= ( Builder &&  )
delete
Builder& operator= ( const Builder )
delete
void SetDefaultBranch ( const Connection in,
int  in_lane_index,
const api::LaneEnd::Which  in_end,
const Connection out,
int  out_lane_index,
const api::LaneEnd::Which  out_end 
)
overridevirtual

Sets the default branch for one end of a connection.

The default branch for the in_end of connection in at Lane in_lane_indexwill set to be out_end of connection out at Lane out_lane_index. The specified connections must actually be joined at the specified ends (i.e., the Endpoint's for those ends must be coincident and (anti)parallel within the tolerances for the Builder).

Implements BuilderBase.


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