RobWorkProject  24.5.15-
Public Types | Public Member Functions | List of all members
LimiterLinearInterpolator< T > Class Template Reference

This class implements an interpolator that will move from a start position to an end position, as fast as possible given a maximum velocity and acceleration. For Types with multiple dimensions, the slowest dimension will set a limit for the whole motion. More...

#include <LimiterLinearInterpolator.hpp>

Inherits Interpolator< T >.

Public Types

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

Public Member Functions

 LimiterLinearInterpolator (const T &start, const T &end, const T &startVelocity, const T &maxVelocity, const T &maxAcceleration)
 This will interpolate a path starting with linear acceleration, and then transition to linear motion. Meaning X = X0 + V0*t + 0.5*a*t^2 for t < switchTime and X = V*t + X1 after the switch time. 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...
 
getStart () const
 Returns the start position of the interpolator. More...
 
getEnd () const
 Returns the end position of the interpolator. More...
 
double duration () const
 Returns the duration of the interpolator. More...
 
switchTime () const
 
- Public Member Functions inherited from Interpolator< T >
virtual ~Interpolator ()
 Virtual destructor.
 

Detailed Description

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

This class implements an interpolator that will move from a start position to an end position, as fast as possible given a maximum velocity and acceleration. For Types with multiple dimensions, the slowest dimension will set a limit for the whole motion.

Template Parameters
TThe type of the position, velocity and acceleration. Currently implemented types are double, rw::math::Q, rw::math::Vector2D and rw::math::Vector3D

Constructor & Destructor Documentation

◆ LimiterLinearInterpolator()

LimiterLinearInterpolator ( const T &  start,
const T &  end,
const T &  startVelocity,
const T &  maxVelocity,
const T &  maxAcceleration 
)

This will interpolate a path starting with linear acceleration, and then transition to linear motion. Meaning X = X0 + V0*t + 0.5*a*t^2 for t < switchTime and X = V*t + X1 after the switch time.

Parameters
start[in] start position
end[in] end position
startVelocity[in] start velocity
maxVelocity[in] maximum velocity
maxAcceleration[in] maximum acceleration
Exceptions
rw::common::Exceptionis thrown the calculated duration is < 0
rw::common::Exceptionis thrown if one of the dimensions can't calculate a valid parameter set that can keep it in continues motion while the slowest dimension is moving

Member Function Documentation

◆ ddx()

T ddx ( double  t) const
virtual

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
virtual

Velocity at time t.

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

Implements Interpolator< T >.

◆ getEnd()

T getEnd ( ) const
inline

Returns the end position of the interpolator.

Returns
The end position of the interpolator

◆ getStart()

T getStart ( ) const
inline

Returns the start position of the interpolator.

Returns
The start position of the interpolator

◆ x()

T x ( double  t) const
virtual

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: