maliput_malidrive
|
Describes a parametric, flat and on-the-ground 2D curve.
It will be also referred as the reference curve.
In mathematical terms:
Let \( G(p) \) be a curve that maps \( p, p0, p1 ∈ ℝ / p ⊂ [p0, p1] ∧ p >= 0 \), to the \( (x, y) \) space, i.e. ℝ² in the INERTIAL Frame. Its arc-length is \( L \) and the heading of the tangent vector in the INERTIAL Frame is \( θ \). \( G(p) \) is G¹ in the domain of \( p \).
There exist:
#include <src/maliput_malidrive/road_curve/ground_curve.h>
Public Member Functions | |
MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN (GroundCurve) | |
virtual | ~GroundCurve ()=default |
double | PFromP (double xodr_p) const |
Calculates the \( p \) value that matches with the \( p \) value in the XODR description. More... | |
maliput::math::Vector2 | G (double p) const |
Evaluates \( G(p) \). More... | |
maliput::math::Vector2 | GDot (double p) const |
Evaluates \( G'(p) \). More... | |
double | Heading (double p) const |
Evaluates \( θ(p) \). More... | |
double | HeadingDot (double p) const |
Evaluates \( θ'(p) \). More... | |
double | GInverse (const maliput::math::Vector2 &xy) const |
Evaluates \( G⁻¹(x, y) \). More... | |
double | ArcLength () const |
double | linear_tolerance () const |
double | p0 () const |
double | p1 () const |
bool | IsG1Contiguous () const |
Static Public Attributes | |
static constexpr double | kEpsilon = 1e-13 |
Implementations may opt to allow a tolerance or be up to kEpsilon away from [p0(); p1()]. More... | |
Protected Member Functions | |
GroundCurve ()=default | |
|
virtualdefault |
|
protecteddefault |
double ArcLength | ( | ) | const |
maliput::math::Vector2 G | ( | double | p | ) | const |
Evaluates \( G(p) \).
p | The parameter. It must be in the range \( [`p0()`; `p1()`] \). |
maliput::common::assertion_error | When p is not in \( [`p0()`; `p1()`] \). |
maliput::math::Vector2 GDot | ( | double | p | ) | const |
Evaluates \( G'(p) \).
p | The parameter. It must be in the range \( [`p0()`; `p1()`] \). |
maliput::common::assertion_error | When p is not in \( [`p0()`; `p1()`] \). |
double GInverse | ( | const maliput::math::Vector2 & | xy | ) | const |
Evaluates \( G⁻¹(x, y) \).
xy | A point in ℝ² that is used as a point in the domain of \( G⁻¹ \). When it does not belong to the domain of the inverse function, a point that minimizes its distance is used instead. |
G(p)
to xy
. double Heading | ( | double | p | ) | const |
Evaluates \( θ(p) \).
p | The parameter. It must be in the range \( [`p0()`; `p1()`] \). |
maliput::common::assertion_error | When p is not in \( [`p0()`; `p1()`] \). |
p
. double HeadingDot | ( | double | p | ) | const |
Evaluates \( θ'(p) \).
p | The parameter. It must be in the range \( [`p0()`; `p1()`] \). |
maliput::common::assertion_error | When p is not in \( [`p0()`; `p1()`] \). |
p
. bool IsG1Contiguous | ( | ) | const |
double linear_tolerance | ( | ) | const |
maliput::api::RoadGeometry
requirements. MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN | ( | GroundCurve | ) |
double p0 | ( | ) | const |
double p1 | ( | ) | const |
double PFromP | ( | double | xodr_p | ) | const |
Calculates the \( p \) value that matches with the \( p \) value in the XODR description.
xodr_p | The parameter in the XODR description. |
maliput::common::assertion_error | When xodr_p doesn't match to any parameter value in the XODR domain. |
|
staticconstexpr |