maliput_multilane
|
RoadCurve specification for a reference curve that describes a line.
#include <src/maliput_multilane/line_road_curve.h>
Public Member Functions | |
LineRoadCurve (const math::Vector2 &xy0, const math::Vector2 &dxy, const CubicPolynomial &elevation, const CubicPolynomial &superelevation, double linear_tolerance, double scale_length, ComputationPolicy computation_policy) | |
Constructor. More... | |
~LineRoadCurve () override=default | |
math::Vector2 | xy_of_p (double p) const override |
Computes the reference curve. More... | |
math::Vector2 | xy_dot_of_p (double p) const override |
Computes the first derivative of the reference curve. More... | |
double | heading_of_p (double p) const override |
Computes the heading of the reference curve. More... | |
double | heading_dot_of_p (double p) const override |
Computes the first derivative heading of the reference curve. More... | |
double | l_max () const override |
Computes the path length integral of the reference curve for the whole [0; 1] interval of p, formally l_max = ∫₀¹ |G'(p)| dp where G' = dG/dp. More... | |
math::Vector3 | ToCurveFrame (const math::Vector3 &geo_coordinate, double r_min, double r_max, const api::HBounds &height_bounds) const override |
Converts a inertial_coordinate in the world frame to the composed curve frame, i.e., the superposition of the reference curve, elevation and superelevation polynomials. More... | |
bool | IsValid (double r_min, double r_max, const api::HBounds &height_bounds) const override |
Checks that there are no self-intersections (singularities) in the volume created by applying the constant r_min , r_max and height_bounds to the RoadCurve. More... | |
Public Member Functions inherited from RoadCurve | |
virtual | ~RoadCurve ()=default |
const CubicPolynomial & | elevation () const |
const CubicPolynomial & | superelevation () const |
const double & | linear_tolerance () const |
const double & | scale_length () const |
const ComputationPolicy & | computation_policy () const |
std::function< double(double)> | OptimizeCalcPFromS (double r) const |
Optimizes the computation of the parametric position p along the reference curve from the longitudinal position (in path-length) s along a parallel curve laterally offset by r from the reference curve. More... | |
std::function< double(double)> | OptimizeCalcSFromP (double r) const |
Optimizes the computation of path length integral in the interval of the parameter [0; p] and along a parallel curve laterally offset by r the planar reference curve. More... | |
math::Vector3 | W_of_prh (double p, double r, double h) const |
Returns W, the world function evaluated at p , r , h . More... | |
math::Vector3 | W_prime_of_prh (double p, double r, double h, const Rot3 &Rabg, double g_prime) const |
Returns W' = ∂W/∂p, the partial differential of W with respect to p, evaluated at p , r , h . More... | |
Rot3 | Rabg_of_p (double p) const |
Returns the rotation R_αβγ, evaluated at p along the reference curve. More... | |
Rot3 | Orientation (double p, double r, double h) const |
Returns the rotation R_αβγ, evaluated at p , r and h . More... | |
math::Vector3 | s_hat_of_prh (double p, double r, double h, const Rot3 &Rabg, double g_prime) const |
Returns the s-axis unit-vector, expressed in the world frame, of the (s,r,h) Lane -frame (with respect to the world frame). More... | |
math::Vector3 | r_hat_of_Rabg (const Rot3 &Rabg) const |
Returns the r-axis unit-vector, expressed in the world frame, of the (s,r,h) Lane -frame (with respect to the world frame). More... | |
double | CalcGPrimeAsUsedForCalcSFromP (double p) const |
Computes the most appropriate value for the elevation derivative g' at p , that accounts for the limitations of the arc length parameterization being used. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from RoadCurve | |
RoadCurve (double linear_tolerance, double scale_length, const CubicPolynomial &elevation, const CubicPolynomial &superelevation, ComputationPolicy computation_policy) | |
Constructs a road curve given elevation and superelevation curves. More... | |
|
explicit |
Constructor.
Computes a line from xy0
as the initial point of the line and dxy
as the difference vector that connects the xy0
with the end point of the reference curve.
xy0 | A 2D vector that represents the first point of the lane. |
dxy | A 2D difference vector between the last point and xy0 . |
elevation | CubicPolynomial object that represents the elevation polynomial. See RoadCurve class constructor for more details. |
superelevation | CubicPolynomial object that represents the superelevation polynomial. See RoadCurve class constructor for more details. |
linear_tolerance | The linear tolerance, in meters, for all computations. See RoadCurve class constructor for more details. |
scale_length | The minimum spatial period of variation in the curve, in meters. See RoadCurve class constructor for more details. |
computation_policy | Policy to guide all computations. If geared towards speed, computations will make use of analytical expressions even if not actually correct for the curve as specified. |
maliput::common::assertion_error | if linear_tolerance is not a positive number. |
maliput::common::assertion_error | if scale_length is not a positive number. |
|
overridedefault |
|
overridevirtual |
Computes the first derivative heading of the reference curve.
p | The reference curve parameter. |
p
. Implements RoadCurve.
|
overridevirtual |
Computes the heading of the reference curve.
p | The reference curve parameter. |
p
, i.e., the angle of the tangent vector (with respect to x-axis) in the increasing-p direction. Implements RoadCurve.
|
overridevirtual |
Checks that there are no self-intersections (singularities) in the volume created by applying the constant r_min
, r_max
and height_bounds
to the RoadCurve.
r_min | Minimum lateral distance from the composed curve to evaluate the validity of the geometry. |
r_max | Maximum lateral distance from the composed curve to evaluate the validity of the geometry. |
height_bounds | An api::HBounds object that represents the elevation bounds of the surface mapping. |
Implements RoadCurve.
|
overridevirtual |
Computes the path length integral of the reference curve for the whole [0; 1] interval of p, formally l_max = ∫₀¹ |G'(p)| dp where G' = dG/dp.
Implements RoadCurve.
|
overridevirtual |
Converts a inertial_coordinate
in the world frame to the composed curve frame, i.e., the superposition of the reference curve, elevation and superelevation polynomials.
The resulting coordinates [p, r, h] are saturated in the following domain ranges.
r_min
, r_max
]height_bounds
]inertial_coordinate | A 3D vector in the world frame to be converted to the composed curve frame. |
r_min | Minimum lateral distance from the composed curve to saturate, if it is necessary, the result in the given direction. |
r_max | Maximum lateral distance from the composed curve to evaluate, if it is necessary, the result in the given direction |
height_bounds | An api::HBounds object that represents the elevation bounds of the surface mapping. |
inertial_coordinate
. Implements RoadCurve.
|
overridevirtual |
Computes the first derivative of the reference curve.
p | The reference curve parameter. |
p
, i.e., F'(p0) = (dx/dp, dy/dp) at p0. Implements RoadCurve.
|
overridevirtual |
Computes the reference curve.
p | The reference curve parameter. |
Implements RoadCurve.