7#ifndef RB_POLYNOMIAL_H_
8#define RB_POLYNOMIAL_H_
43 const std::vector<double>&
start,
44 const std::vector<double>&
end,
49 this->
c_[0] = start[0];
50 this->
c_[1] = start[1];
51 this->
c_[2] = start[2]/2.;
60 double p2 =
c_[1] + 2. *
c_[2] *
T;
61 double p3 = 2. *
c_[2];
67 6 *
T , 12 *
T2 , 20 *
T3;
89 for(
int i=0;
i<
vecT.size(); ++
i)
106 for(
int i=0;
i<
vecT.size(); ++
i)
124 for (
int i = 0;
i <
vecT.size(); ++
i)
A class for constructing polynomial function.
Definition polynomial.h:21
short degree_
An integer indicate degree of polynomial.
Definition polynomial.h:152
rb::math::VectorX getCoeff(void) const
Get the coefficients of the polynomial function.
Definition polynomial.h:145
double t_
The duration (time) of polynomial function f(t).
Definition polynomial.h:154
Polynomial()
Default Construction.
Definition polynomial.h:24
rb::math::VectorX c_
A vector of coefficient of polynomial.
Definition polynomial.h:153
Polynomial(const short deg, const double t=0.)
Construct polynomial with given degree.
Definition polynomial.h:30
double getAcceleration(const double &T) const
Get the 2nd order differential value (acceleration) of polynomial f(t) at time T.
Definition polynomial.h:121
double getPosition(const double &T) const
Get the value (position) of polynomial f(t) at time T.
Definition polynomial.h:86
short getDegree(void) const
Get the degree (order) of the polynomial function.
Definition polynomial.h:136
double getVelocity(const double &T) const
Get the 1st order differential value (velocity) of polynomial f(t) at time T.
Definition polynomial.h:103
void coeffQuintic(const std::vector< double > &start, const std::vector< double > &end, const double &T)
Compute the coefficients of quintic (fifth order) polynomial by giving initial conditions of start an...
Definition polynomial.h:42
A head file define tpyes, and function for matrix manipulating.
Eigen::Array< T, R, C > Array
make Array as alias of Eigen::Array (class template)
Definition matrix.h:31
Eigen::Matrix3d Matrix3
make Matrix3 as alias of Eigen::Matrix3d
Definition matrix.h:20
Eigen::VectorXd VectorX
make VectorX as alias of Eigen::VectorXd
Definition matrix.h:23
Robot Arm Library namespace.
Definition artic.cpp:13