Public Member Functions | Private Member Functions | Private Attributes
towr::CubicHermitePolynomial Class Reference

Represents a Cubic-Hermite-Polynomial. More...

#include <polynomial.h>

Inheritance diagram for towr::CubicHermitePolynomial:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CubicHermitePolynomial (int dim)
VectorXd GetDerivativeOfPosWrtDuration (double t) const
 How the total duration affect the value ("pos") of the polynomial.
double GetDerivativeWrtEndNode (Dx dfdt, Dx node_deriv, double t) const
 The derivative of the polynomial when changing the end node.
double GetDerivativeWrtStartNode (Dx dfdt, Dx node_deriv, double t) const
 The derivative of the polynomial when changing the start node.
const double GetDuration () const
void SetDuration (double duration)
 sets the total duration of the polynomial.
void SetNodes (const Node &n0, const Node &n1)
 Fully defines the polynomial by the node values using current duration.
void UpdateCoeff ()
 updates the coefficients using current nodes and durations.
virtual ~CubicHermitePolynomial ()

Private Member Functions

double GetDerivativeOfAccWrtEndNode (Dx node_deriv, double t_local) const
double GetDerivativeOfAccWrtStartNode (Dx node_deriv, double t_local) const
double GetDerivativeOfPosWrtEndNode (Dx node_deriv, double t_local) const
double GetDerivativeOfPosWrtStartNode (Dx node_deriv, double t_local) const
double GetDerivativeOfVelWrtEndNode (Dx node_deriv, double t_local) const
double GetDerivativeOfVelWrtStartNode (Dx node_deriv, double t_local) const

Private Attributes

Node n0_
Node n1_
 the start and final node comprising the polynomial.
double T_
 the total duration of the polynomial.

Detailed Description

Represents a Cubic-Hermite-Polynomial.

This class is a third-order ("cubic") polynomial, so: f(t) = Dt^3 + Ct^2 + Bt + A fd(t) = 3Dt^2 + 2Ct + B fdd(t) = 6Dt + 2C

Instead of setting the polynomial coefficients directly, a third-order polynomial is also fully defined by the value and first-derivative of the start and end of the polynomial as well as the duration. This way of specifying a polynomial is called "Hermite".

See also matlab/cubic_hermite_polynomial.m for generation of derivatives.

Definition at line 105 of file polynomial.h.


Constructor & Destructor Documentation

Definition at line 76 of file polynomial.cc.


Member Function Documentation

double towr::CubicHermitePolynomial::GetDerivativeOfAccWrtEndNode ( Dx  node_deriv,
double  t_local 
) const [private]

Definition at line 222 of file polynomial.cc.

double towr::CubicHermitePolynomial::GetDerivativeOfAccWrtStartNode ( Dx  node_deriv,
double  t_local 
) const [private]

Definition at line 174 of file polynomial.cc.

How the total duration affect the value ("pos") of the polynomial.

Parameters:
tThe time [0,T] at which the change in value should be observed.

Definition at line 237 of file polynomial.cc.

double towr::CubicHermitePolynomial::GetDerivativeOfPosWrtEndNode ( Dx  node_deriv,
double  t_local 
) const [private]

Definition at line 189 of file polynomial.cc.

double towr::CubicHermitePolynomial::GetDerivativeOfPosWrtStartNode ( Dx  node_deriv,
double  t_local 
) const [private]

Definition at line 141 of file polynomial.cc.

double towr::CubicHermitePolynomial::GetDerivativeOfVelWrtEndNode ( Dx  node_deriv,
double  t_local 
) const [private]

Definition at line 206 of file polynomial.cc.

double towr::CubicHermitePolynomial::GetDerivativeOfVelWrtStartNode ( Dx  node_deriv,
double  t_local 
) const [private]

Definition at line 158 of file polynomial.cc.

double towr::CubicHermitePolynomial::GetDerivativeWrtEndNode ( Dx  dfdt,
Dx  node_deriv,
double  t 
) const

The derivative of the polynomial when changing the end node.

Parameters:
dxdtWhich polynomial derivative f(t), fd(t) function to use.
node_derivWhether derivative should be w.r.t end-node position or velocity.
tThe time along the polynomial.

Definition at line 124 of file polynomial.cc.

double towr::CubicHermitePolynomial::GetDerivativeWrtStartNode ( Dx  dfdt,
Dx  node_deriv,
double  t 
) const

The derivative of the polynomial when changing the start node.

Parameters:
dxdtWhich polynomial derivative f(t), fd(t) function to use.
node_derivWhether derivative should be w.r.t start-node position or velocity.
tThe time along the polynomial.

Definition at line 107 of file polynomial.cc.

const double towr::CubicHermitePolynomial::GetDuration ( ) const [inline]
Returns:
the total duration of the polynomial.

Definition at line 153 of file polynomial.h.

void towr::CubicHermitePolynomial::SetDuration ( double  duration)

sets the total duration of the polynomial.

Definition at line 92 of file polynomial.cc.

void towr::CubicHermitePolynomial::SetNodes ( const Node n0,
const Node n1 
)

Fully defines the polynomial by the node values using current duration.

Parameters:
n0The value and derivative at the start of the polynomial.
n1The value and derivative at the end of the polynomial.

Definition at line 85 of file polynomial.cc.

updates the coefficients using current nodes and durations.

Definition at line 98 of file polynomial.cc.


Member Data Documentation

Definition at line 157 of file polynomial.h.

the start and final node comprising the polynomial.

Definition at line 157 of file polynomial.h.

the total duration of the polynomial.

Definition at line 153 of file polynomial.h.


The documentation for this class was generated from the following files:


towr_core
Author(s): Alexander W. Winkler
autogenerated on Mon Apr 9 2018 03:12:44