30 #ifndef TOWR_VARIABLES_POLYNOMIAL_H_ 31 #define TOWR_VARIABLES_POLYNOMIAL_H_ 36 #include <Eigen/Dense> 65 explicit Polynomial(
int poly_order,
int poly_dim);
118 void SetDuration(
double duration);
125 void SetNodes(
const Node& n0,
const Node& n1);
136 VectorXd GetDerivativeOfPosWrtDuration(
double t)
const;
144 double GetDerivativeWrtStartNode(
Dx dfdt,
Dx node_deriv,
double t)
const;
152 double GetDerivativeWrtEndNode(
Dx dfdt,
Dx node_deriv,
double t)
const;
157 const double GetDuration()
const {
return T_; };
164 double GetDerivativeOfPosWrtStartNode(
Dx node_deriv,
double t_local)
const;
165 double GetDerivativeOfVelWrtStartNode(
Dx node_deriv,
double t_local)
const;
166 double GetDerivativeOfAccWrtStartNode(
Dx node_deriv,
double t_local)
const;
168 double GetDerivativeOfPosWrtEndNode(
Dx node_deriv,
double t_local)
const;
169 double GetDerivativeOfVelWrtEndNode(
Dx node_deriv,
double t_local)
const;
170 double GetDerivativeOfAccWrtEndNode(
Dx node_deriv,
double t_local)
const;
175 #endif // TOWR_VARIABLES_POLYNOMIAL_H_ Stores at state comprised of values and higher-order derivatives.
A polynomial of arbitrary order and dimension.
double T_
the total duration of the polynomial.
std::vector< Coefficients > CoeffIDVec
Node n1_
the start and final node comprising the polynomial.
Polynomial(int poly_order, int poly_dim)
Constructs a polynomial with zero coefficient values.
double GetDerivativeWrtCoeff(double t, Dx poly_deriv, Coefficients coeff) const
The derivative of the polynomial with respect to the coefficients.
std::vector< VectorXd > coeff_
virtual ~Polynomial()=default
Represents a Cubic-Hermite-Polynomial.
State GetPoint(double t) const
A node represents the state of a trajectory at a specific time.
Dx
< the values or derivative. For motions e.g. position, velocity, ...