Class blmc_drivers::TimePolynome¶
-
template<int ORDER>
class TimePolynome : public blmc_drivers::Polynome<ORDER>, public blmc_drivers::Polynome<ORDER>¶ Simple class that defines \( P(t) \) a polynome of order ORDER.
With \( t \) being the time in any units. It provide simple methods to compute safely \( P(time) \), \( \frac{dP}{dt}(t) \), and \( \frac{dP^2}{dt^2}(t) \)
- Template Parameters:
ORDER –
Public Functions
-
inline TimePolynome()¶
Constructor
-
inline ~TimePolynome()¶
Destructor
-
double compute(double t)¶
TimePolynome<ORDER> definitions.
Compute the value.
-
double compute_derivative(double t)¶
Compute the value of the derivative.
-
double compute_sec_derivative(double t)¶
Compute the value of the second derivative.
-
inline double get_final_time() const¶
-
inline double get_init_pose() const¶
-
inline double get_init_speed() const¶
-
inline double get_init_acc() const¶
-
inline double get_final_pose() const¶
-
inline double get_final_speed() const¶
-
inline double get_final_acc() const¶
-
void set_parameters(double final_time, double init_pose, double init_speed, double final_pose)¶
Computes a polynome trajectory according to the following constraints:
\[\begin{split}\begin{eqnarray*} P(0) &=& init_pose \\ P(0) &=& init_speed = 0 \\ P(0) &=& init_acc = 0 \\ P(final_time_) &=& final_pose \\ P(final_time_) &=& final_speed = 0 \\ P(final_time_) &=& final_acc = 0 \end{eqnarray*}\end{split}\]- Parameters:
final_time – is used in the constraints.
init_pose – is used in the constraints.
init_speed – is used in the constraints.
final_pose – is used in the constraints.
-
inline TimePolynome()
Constructor
-
inline ~TimePolynome()
Destructor
-
double compute(double t)
Compute the value.
-
double compute_derivative(double t)
Compute the value of the derivative.
-
double compute_sec_derivative(double t)
Compute the value of the second derivative.
-
inline double get_final_time() const
-
inline double get_init_pose() const
-
inline double get_init_speed() const
-
inline double get_init_acc() const
-
inline double get_final_pose() const
-
inline double get_final_speed() const
-
inline double get_final_acc() const
-
void set_parameters(double final_time, double init_pose, double init_speed, double final_pose)
Computes a polynome trajectory according to the following constraints:
\[\begin{split}\begin{eqnarray*} P(0) &=& init_pose \\ P(0) &=& init_speed = 0 \\ P(0) &=& init_acc = 0 \\ P(final_time_) &=& final_pose \\ P(final_time_) &=& final_speed = 0 \\ P(final_time_) &=& final_acc = 0 \end{eqnarray*}\end{split}\]- Parameters:
final_time – is used in the constraints.
init_pose – is used in the constraints.
init_speed – is used in the constraints.
final_pose – is used in the constraints.