Drake
junction.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <vector>
5 
12 
13 namespace drake {
14 namespace maliput {
15 namespace dragway {
16 
17 class RoadGeometry;
18 
20 class Junction final : public api::Junction {
21  public:
23 
24 
30  int num_lanes,
31  double length,
32  double lane_width,
33  double shoulder_width,
34  double maximum_height);
35 
36  ~Junction() final = default;
37 
38  private:
39  const api::JunctionId do_id() const final { return id_; }
40 
41  const api::RoadGeometry* do_road_geometry() const final;
42 
43  int do_num_segments() const final { return 1; }
44 
45  const api::Segment* do_segment(int index) const final {
46  DRAKE_DEMAND(index < num_segments());
47  return &segment_;
48  }
49 
50  const api::JunctionId id_;
51  const RoadGeometry* const road_geometry_{};
52  const Segment segment_;
53 };
54 
55 } // namespace dragway
56 } // namespace maliput
57 } // namespace drake
Definition: automotive_demo.cc:88
const RoadGeometry * road_geometry() const
Returns the RoadGeometry to which this Junction belongs.
Definition: junction.h:37
Abstract API for the geometry of a road network, including both the network topology and the geometry...
Definition: road_geometry.h:26
#define DRAKE_DEMAND(condition)
Evaluates condition and iff the value is false will trigger an assertion failure with a message showi...
Definition: drake_assert.h:47
TypeSpecificIdentifier< class Junction > JunctionId
Persistent identifier for a Junction element.
Definition: junction.h:17
Dragway&#39;s implementation of api::Junction.
Definition: junction.h:20
Dragway&#39;s implementation of api::RoadGeometry.
Definition: road_geometry.h:23
A Segment represents a bundle of adjacent Lanes which share a continuously traversable road surface...
Definition: segment.h:27
A Junction is a closed set of Segments which have physically coplanar road surfaces, in the sense that RoadPositions with the same h value (height above surface) in the domains of two Segments map to the same GeoPosition.
Definition: junction.h:27
int num_segments() const
Returns the number of Segments in the Junction.
Definition: junction.h:42
#define DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN(Classname)
DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN deletes the special member functions for copy-construction, copy-assignment, move-construction, and move-assignment.
Definition: drake_copyable.h:35
Dragway&#39;s implementation of api::Segment.
Definition: segment.h:55
Provides careful macros to selectively enable or disable the special member functions for copy-constr...