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>

Public Member Functions

 Builder (double lane_width, const api::HBounds &elevation_bounds, double linear_tolerance, double angular_tolerance)
 Constructs a Builder which can be used to specify and assemble a multilane implementation of an api::RoadGeometry. More...
 
const ConnectionConnect (const std::string &id, int num_lanes, double r0, double left_shoulder, double right_shoulder, const Endpoint &start, double length, const EndpointZ &z_end)
 Connects start to an end-point linearly displaced from start. More...
 
const ConnectionConnect (const std::string &id, int num_lanes, double r0, double left_shoulder, double right_shoulder, const Endpoint &start, const ArcOffset &arc, const EndpointZ &z_end)
 Connects start to an end-point displaced from start via 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)
 Sets the default branch for one end of a connection. More...
 
GroupMakeGroup (const std::string &id)
 Creates a new empty connection group with ID string id. More...
 
GroupMakeGroup (const std::string &id, const std::vector< const Connection * > &connections)
 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
 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
 

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

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.

Member Function Documentation

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

Produces a RoadGeometry, with the ID id.

Here is the call graph for this function:

Here is the caller graph for this function:

const Connection * Connect ( const std::string &  id,
int  num_lanes,
double  r0,
double  left_shoulder,
double  right_shoulder,
const Endpoint start,
double  length,
const EndpointZ z_end 
)

Connects start to an end-point linearly displaced from start.

length specifies the length of displacement (in the direction of the heading of start). z_end specifies the elevation characteristics at the end-point. r0 is the distance from the reference curve to the first Lane centerline. left_shoulder and right_shoulder are extra lateral distances added to the extents of the Segment after the first and last Lanes positions are determined.

Here is the caller graph for this function:

const Connection * Connect ( const std::string &  id,
int  num_lanes,
double  r0,
double  left_shoulder,
double  right_shoulder,
const Endpoint start,
const ArcOffset arc,
const EndpointZ z_end 
)

Connects start to an end-point displaced from start via an arc.

arc specifies the shape of the arc. z_end specifies the elevation characteristics at the end-point. r0 is the distance from the reference curve to the first Lane centerline. left_shoulder and right_shoulder are extra lateral distances added to the extents of the Segment after the first and last Lanes positions are determined.

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

Creates a new empty connection group with ID string id.

Here is the caller graph for this function:

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

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

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 
)

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

Here is the caller graph for this function:


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