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 >.
|
| 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...
|
|
T | x (double t) const |
| Position at time t. More...
|
|
T | dx (double t) const |
| Velocity at time t. More...
|
|
T | ddx (double t) const |
| Acceleration at time t. More...
|
|
T | getStart () const |
| Returns the start position of the interpolator. More...
|
|
T | getEnd () const |
| Returns the end position of the interpolator. More...
|
|
double | duration () const |
| Returns the duration of the interpolator. More...
|
|
T | switchTime () const |
|
virtual | ~Interpolator () |
| Virtual destructor.
|
|
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
-
◆ 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::Exception | is thrown the calculated duration is < 0 |
rw::common::Exception | is 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 |
◆ ddx()
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()
Velocity at time t.
- Parameters
-
t | [in] time between 0 and length |
- Returns
- Velocity
Implements Interpolator< T >.
◆ getEnd()
Returns the end position of the interpolator.
- Returns
- The end position of the interpolator
◆ getStart()
Returns the start position of the interpolator.
- Returns
- The start position of the interpolator
◆ x()
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:
- LimiterLinearInterpolator.hpp