maliput_malidrive
SpiralGroundCurve Class Reference

Detailed Description

GroundCurve specification for a reference curve that describes a clothoid or Euler spiral.

Queries accept p ∈ [p0, p1] with a linear tolerance.

#include <src/maliput_malidrive/road_curve/spiral_ground_curve.h>

Inheritance diagram for SpiralGroundCurve:
[legend]

Public Member Functions

 MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN (SpiralGroundCurve)
 
 SpiralGroundCurve ()=delete
 
 SpiralGroundCurve (double linear_tolerance, const maliput::math::Vector2 &xy0, double heading0, double curvature0, double curvature1, double arc_length, double p0, double p1)
 Constructs an SpiralGroundCurve. More...
 
- Public Member Functions inherited from GroundCurve
 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
 

Additional Inherited Members

- Static Public Attributes inherited from GroundCurve
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 inherited from GroundCurve
 GroundCurve ()=default
 

Constructor & Destructor Documentation

◆ SpiralGroundCurve() [1/2]

SpiralGroundCurve ( )
delete

◆ SpiralGroundCurve() [2/2]

SpiralGroundCurve ( double  linear_tolerance,
const maliput::math::Vector2 xy0,
double  heading0,
double  curvature0,
double  curvature1,
double  arc_length,
double  p0,
double  p1 
)

Constructs an SpiralGroundCurve.

Parameters
linear_toleranceA non-negative value expected to be the same as maliput::api::RoadGeometry::linear_tolerance().
xy0A 2D vector that represents the first point of the spiral.
heading0The orientation of the tangent vector at xy0.
curvature0The curvature of the spiral at p0. The absolute difference of the curvatures at p1 and p0 must be greater than GroundCurve::kEpsilon.
curvature1The curvature of the spiral at p1. The absolute difference of the curvatures at p1 and p0 must be greater than GroundCurve::kEpsilon.
arc_lengthThe spiral's length. It must be greater or equal to GroundCurve::kEpsilon.
p0The value of the \( p \) parameter at the beginning of the spiral, which must be non negative and smaller than p1 by at least GroundCurve::kEpsilon.
p1The value of the \( p \) parameter at the end of the spiral, which must be greater than p0 by at least GroundCurve::kEpsilon.
Exceptions
maliput::common::assertion_errorWhen linear_tolerance is non-positive.
maliput::common::assertion_errorWhen arc_length is smaller than GroundCurve::kEpsilon.
maliput::common::assertion_errorWhen p0 is negative.
maliput::common::assertion_errorWhen p1 is not sufficiently larger than p0.

Member Function Documentation

◆ MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN ( SpiralGroundCurve  )

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