RobWorkProject  23.9.11-
Public Member Functions | List of all members
CubicSplineInterpolator< T > Class Template Reference

This class represents a 3-degree polynomial function, used in Cubic Splines hence the name CubicSegment. More...

#include <CubicSplineInterpolator.hpp>

Inherits Interpolator< T >.

Public Member Functions

 CubicSplineInterpolator (const T &a, const T &b, const T &c, const T &d, double duration)
 
x (double t) const
 Position at time t. More...
 
dx (double t) const
 Velocity at time t. More...
 
ddx (double t) const
 Acceleration at time t. More...
 
double duration () const
 Returns the duration of the interpolator. More...
 
- Public Member Functions inherited from Interpolator< T >
virtual ~Interpolator ()
 Virtual destructor.
 

Additional Inherited Members

- Public Types inherited from Interpolator< T >
typedef rw::core::Ptr< InterpolatorPtr
 smart pointer type to this class
 

Detailed Description

template<class T>
class rw::trajectory::CubicSplineInterpolator< T >

This class represents a 3-degree polynomial function, used in Cubic Splines hence the name CubicSegment.

\( \bf{f}(t)= \bf{a} + \bf{b}\cdot t + \bf{c}\cdot t^2 \bf{d}\cdot t^3 \)

Member Function Documentation

◆ ddx()

T ddx ( double  t) const
inlinevirtual

Acceleration at time t.

Parameters
t[in] time between 0 and length
Returns
Acceleration
Note
The second derivative is a 1-degree polynomial: \( \bf{df}(t)= 2\cdot \bf{c} + 6\cdot \bf{d}\cdot t \)

Implements Interpolator< T >.

◆ duration()

double duration ( ) const
inlinevirtual

Returns the duration of the interpolator.

The duration is defined as the time it takes to move from one end of the interpolator to the other.

Returns
duration

Implements Interpolator< T >.

◆ dx()

T dx ( double  t) const
inlinevirtual

Velocity at time t.

Parameters
t[in] time between 0 and length
Returns
Velocity
Note
The derivative is a 2-degree polynomial: \( \bf{df}(t)= \bf{b} + 2\cdot \bf{c}\cdot t + 3\cdot \bf{d}\cdot t^2 \)

Implements Interpolator< T >.

◆ x()

T x ( double  t) const
inlinevirtual

Position at time t.

Parameters
t[in] time between 0 and length
Returns
Position
Note
The cubic polynomial is given by a 3-degree polynomial: \( \bf{f}(t)= \bf{a} + \bf{b}\cdot t + \bf{c}\cdot t^2 \bf{d}\cdot t^3 \)

Implements Interpolator< T >.


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