Drake
Builder Class Reference

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

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

Public Member Functions

 Builder (const api::RBounds &lane_bounds, const api::RBounds &driveable_bounds, const api::HBounds &elevation_bounds, const double linear_tolerance, const double angular_tolerance)
 Constructs a Builder which can be used to specify and assemble a monolane implementation of an api::RoadGeometry. More...
 
const ConnectionConnect (const std::string &id, const Endpoint &start, const double length, const EndpointZ &z_end)
 Connects start to an end-point linearly displaced from start. More...
 
const ConnectionConnect (const std::string &id, 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, const api::LaneEnd::Which in_end, const Connection *out, 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 monolane road network.

monolane is a simple road-network implementation:

  • single lane per segment;
  • constant lane_bounds, driveable_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 monolane 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 a single Lane. Each Group yields a Junction containing the Segments associated with the grouped Connections; ungrouped Connections each receive their own Junction.

Constructor & Destructor Documentation

Builder ( const Builder )
delete
Builder ( Builder &&  )
delete
Builder ( const api::RBounds lane_bounds,
const api::RBounds driveable_bounds,
const api::HBounds elevation_bounds,
const double  linear_tolerance,
const double  angular_tolerance 
)

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

The bounds lane_bounds, driveable_bounds, and elevation_bounds are applied uniformly to the single lanes of every segment; lane_bounds must be a subset of driveable_bounds. linear_tolerance and angular_tolerance specify the respective tolerances for the resulting RoadGeometry.

Here is the call graph for this function:

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,
const Endpoint start,
const 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.

Here is the call graph for this function:

Here is the caller graph for this function:

const Connection * Connect ( const std::string &  id,
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.

Here is the call graph for this function:

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,
const api::LaneEnd::Which  in_end,
const Connection out,
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 will set to be out_end of connection out. 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: