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

Implements a fixed value interpolator. More...

#include <FixedInterpolator.hpp>

Inherits Interpolator< T >.

Public Member Functions

 FixedInterpolator (const T &value, double duration)
 Constructs a FixedInterpolator with value value and duration duration. More...
 
 FixedInterpolator (const T &value, const T &zeroValue, double duration)
 Constructs a FixedInterpolator with value value, duration duration and returning zeroValue for velocity and acceleration. More...
 
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::FixedInterpolator< T >

Implements a fixed value interpolator.

The FixedInterpolator will always return the same value and 0 for velocity and acceleration.

Constructor & Destructor Documentation

◆ FixedInterpolator() [1/2]

FixedInterpolator ( const T &  value,
double  duration 
)
inline

Constructs a FixedInterpolator with value value and duration duration.

It is assumed that the template type T can be zeroed by

for (size_t i = 0; i < _zeroValue.size(); i++)
_zeroValue[i] = 0;

to get proper return values for velocity and acceleration.

Parameters
value[in] Value to return for x(double t).
duration[in] Duration of the interpolator.

◆ FixedInterpolator() [2/2]

FixedInterpolator ( const T &  value,
const T &  zeroValue,
double  duration 
)
inline

Constructs a FixedInterpolator with value value, duration duration and returning zeroValue for velocity and acceleration.

Parameters
value[in] Value to return for x(double t).
zeroValuedocumentation missing !
duration[in] Duration of the interpolator.

Member Function Documentation

◆ ddx()

T ddx ( double  t) const
inlinevirtual

Acceleration at time t.

Parameters
t[in] time between 0 and length
Returns
Acceleration

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

Implements Interpolator< T >.

◆ x()

T x ( double  t) const
inlinevirtual

Position at time t.

Parameters
t[in] time between 0 and length
Returns
Position

Implements Interpolator< T >.


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