roboptim::SplineLength Class Reference
[Mathematical functions]

Approximate the length of a Spline. More...

#include <roboptim/trajectory/spline-length.hh>

Inheritance diagram for roboptim::SplineLength:
roboptim::TrajectoryCost< CubicBSpline > DerivableFunction

List of all members.

Public Member Functions

 SplineLength (const CubicBSpline &spline, const size_type nDiscretizationPoints=100, boost::optional< interval_t > interval=boost::none_t()) throw ()
virtual ~SplineLength () throw ()

Protected Member Functions

void impl_compute (result_t &, const argument_t &) const throw ()
void impl_gradient (gradient_t &, const argument_t &, size_type) const throw ()

Detailed Description

Approximate the length of a Spline.

The length is computed using:

\[\frac{1}{2} \int_{t_{min}}^{t_{max}} ||\ddot{\Gamma_p(t)}||^2 dt\]

$t_{min}$ and $t_{max}$ are given when the object is instantiated.

Examples:

spline-optimization.cc.


Constructor & Destructor Documentation

roboptim::SplineLength::SplineLength ( const CubicBSpline spline,
const size_type  nDiscretizationPoints = 100,
boost::optional< interval_t >  interval = boost::none_t () 
) throw ()

Construct the function from a Spline and a definition interval.

The interval allows to only compute the length of the Spline on a specific interval. The step associated to the interval controls the approximation precision.

Parameters:
spline spline used for length computation
interval interval on which the length is computed.
nDiscretizationPoints number of discretization points