maliput
InverseArcLengthIntegrator Class Referencefinal

Detailed Description

Wraps maliput::drake::systems::ScalarInitialValueProblem<double> by using a pImpl.

This convenient class helps to compute the inverse of an arc length integral of the world function given its arc length and returns either corresponding parameter or a function that helps with multiple queries and return the parameter. This class does not expose any drake / eigen specific type, which serves as a useful interface for the future. Backends can rely on linking against this library only and private linkage will solve any required dependency.

#include <include/maliput/drake/inverse_arc_length_integrator.h>

Public Types

using ScalarOdeFunction = std::function< double(const double &s, const double &p, const math::Vector2 &k)>
 Type alias for the scalar ODE dx/dt = f(t, x; 𝐤) function type. More...
 

Public Member Functions

 MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (InverseArcLengthIntegrator)
 
 InverseArcLengthIntegrator (const ScalarOdeFunction &function, const IntegratorConfiguration &config)
 Constructs an InverseArcLengthIntegrator. More...
 
 ~InverseArcLengthIntegrator ()
 
double Evaluate (double s, const math::Vector2 &k) const
 Evaluates the inverse arc length at s and with context k. More...
 
std::function< double(double)> InverseFunction (double s0, double s1, const math::Vector2 &k, double tolerance, double epsilon=0.0) const
 Computes a functor that can be used for sucessive queries at different p parameter values of the arc length. More...
 

Member Typedef Documentation

◆ ScalarOdeFunction

using ScalarOdeFunction = std::function<double(const double& s, const double& p, const math::Vector2& k)>

Type alias for the scalar ODE dx/dt = f(t, x; 𝐤) function type.

Parameters
sThe independent variable s ∈ ℝ , i.e. the arc length.
pThe dependent variable p ∈ ℝ , i.e. the parameter.
kThe parameter vector 𝐤 ∈ ℝ² .
Returns
The derivative dp/ds ∈ ℝ.

Constructor & Destructor Documentation

◆ InverseArcLengthIntegrator()

InverseArcLengthIntegrator ( const ScalarOdeFunction function,
const IntegratorConfiguration config 
)

Constructs an InverseArcLengthIntegrator.

Parameters
functionA functor with the ScalarOdeFunction.
configA IntegratorConfiguration with the initial state of the integrator and its configurations.

◆ ~InverseArcLengthIntegrator()

Member Function Documentation

◆ Evaluate()

double Evaluate ( double  s,
const math::Vector2 k 
) const

Evaluates the inverse arc length at s and with context k.

Parameters
sThe arc length of the scalar ODE function.
kThe context of the function.
Returns
The parameter of thefunction.

◆ InverseFunction()

std::function< double(double)> InverseFunction ( double  s0,
double  s1,
const math::Vector2 k,
double  tolerance,
double  epsilon = 0.0 
) const

Computes a functor that can be used for sucessive queries at different p parameter values of the arc length.

Parameters
p0The start of the integration domain.
p1The end of the integration domain.
p1The context k of the integration domain.
toleranceThe absolute tolerance to determine whether the used p parameter is within range [p0, p1].
epsilonSometimes, due to numerical errors, consumers need to constraint the extent of the computed values. This variables shrinks s1. Default is 0.0.
Returns
A std::function that converts an arc length value into the original function parameter that produced it.

◆ MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN ( InverseArcLengthIntegrator  )

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