Go to the documentation of this file.
1 #pragma once
3 #include <cmath>
9 namespace drake {
10 namespace maliput {
11 namespace monolane {
15 class ArcLane : public Lane {
16  public:
20  ArcLane(const api::LaneId& id, const api::Segment* segment,
37  const V2& center, double radius,
38  double theta0, double d_theta,
45  ~ArcLane() override = default;
47  private:
48  // Computes the LanePosition from a given GeoPosition. This function is exact
49  // (to numerical precision) under the assumption that the road is flat
50  // (superelevation is everywhere zero and the elevation has zero gradient),
51  // and a close approximation for lanes exhibiting small elevation changes.
52  //
53  // Note that, when the absolute theta displacement `d_theta_` exceeds 2π, a
54  // unique solution for `s = LanePosition.s` no longer exists. In this case,
55  // the return value of `s` is that which results in the smallest
56  // `abs(theta_of_p(s))`.
57  api::LanePosition DoToLanePosition(const api::GeoPosition& geo_pos,
58  api::GeoPosition* nearest_point,
59  double* distance) const override;
61  V2 xy_of_p(const double p) const override;
62  V2 xy_dot_of_p(const double p) const override;
63  double heading_of_p(const double p) const override;
64  double heading_dot_of_p(const double p) const override;
66  double theta_of_p(double p) const;
68  double r_{};
69  double cx_{};
70  double cy_{};
71  double theta0_{};
72  double d_theta_{};
73 };
75 } // namespace monolane
76 } // namespace maliput
77 } // namespace drake
A cubic polynomial, f(p) = a + b*p + c*p^2 + d*p^3.
Definition: lane.h:49
A position in 3-dimensional geographical Cartesian space, i.e., in the world frame, consisting of three components x, y, and z.
Definition: lane_data.h:128
const CubicPolynomial & superelevation() const
Definition: lane.h:203
Definition: automotive_demo.cc:88
Vector2< double > V2
Definition: lane.h:20
TypeSpecificIdentifier<T> represents an identifier specifically identifying an entity of type T...
Definition: type_specific_identifier.h:38
const CubicPolynomial & elevation() const
Definition: lane.h:201
HBounds elevation_bounds(double s, double r) const
Returns the elevation (h) bounds of the lane as a function of (s, r).
Definition: lane.h:86
Provides Drake&#39;s assertion implementation.
const Segment * segment() const
Returns the Segment to which this Lane belongs.
Definition: lane.h:42
Bounds in the lateral dimension (r component) of a Lane-frame, consisting of a pair of minimum and ma...
Definition: lane_data.h:274
Base class for the monolane implementation of api::Lane.
Definition: lane.h:126
Bounds in the elevation dimension (h component) of a Lane-frame, consisting of a pair of minimum and ...
Definition: lane_data.h:309
A Segment represents a bundle of adjacent Lanes which share a continuously traversable road surface...
Definition: segment.h:27
A 3-dimensional position in a Lane-frame, consisting of three components:
Definition: lane_data.h:187
RBounds driveable_bounds(double s) const
Returns the driveable lateral (r) bounds of the lane as a function of s.
Definition: lane.h:80
RBounds lane_bounds(double s) const
Returns the nominal lateral (r) bounds for the lane as a function of s.
Definition: lane.h:73
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
ArcLane(const ArcLane &)=delete
Provides careful macros to selectively enable or disable the special member functions for copy-constr...
Specialization of Lane with a circular arc as its reference curve in the xy-plane (the ground plane) ...
Definition: arc_lane.h:15