Represent a simple fifth order polynomial trajectory. Its a templated class that can be used with multiple types.
More...
template<class T>
class arl::primitive::Trajectory< T >
Represent a simple fifth order polynomial trajectory. Its a templated class that can be used with multiple types.
The equations which are implemented here are described in book Robotics, Zoe Doulgeri, page 154.
Example of use:
#include <autharl_core/primitive/trajectory.h>
Trajectory<double> t;
double time = 5.0;
double position = t.pos(time);
double velocity = t.vel(time);
double acceleration = t.acc(time);
Usage with vectors:
#include <autharl_core/primitive/trajectory.h>
Trajectory<arma::vec> t;
arma::vec pos_init = {1, 0, 2};
arma::vec vel_init = {1, 0, 2};
arma::vec acc_init = {1, 0, 2};
arma::vec pos_final = {4, 7, 9};
arma::vec vel_final = {4, 7, 9};
arma::vec acc_final = {4, 7, 9};
t.
setParams(10, pos_init, vel_init, acc_init,
20, pos_final, vel_final, acc_final);
double time = 15.0;
arma::vec position = t.pos(time);
arma::vec velocity = t.vel(time);
arma::vec acceleration = t.acc(time);