A spline built from node values and fixed polynomial durations. More...
#include <node_spline.h>
Public Member Functions | |
virtual Jacobian | GetJacobianOfPosWrtDurations (double t) const |
How the spline position changes when the polynomial durations change. | |
Jacobian | GetJacobianWrtNodes (double t, Dx dxdt) const |
How the spline changes when the node values change. | |
Jacobian | GetJacobianWrtNodes (int poly_id, double t_local, Dx dxdt) const |
How the spline changes when the node values change. | |
int | GetNodeVariablesCount () const |
NodeSpline (NodeSubjectPtr const node_variables, const VecTimes &polynomial_durations) | |
Constructs a spline with constant durations. | |
void | UpdateNodes () |
Called by subject to update the polynomials with new node values. | |
~NodeSpline () | |
Protected Member Functions | |
void | FillJacobianWrtNodes (int poly_id, double t_local, Dx dxdt, Jacobian &jac, bool fill_with_zeros) const |
Fills specific elements of the Jacobian with respect to nodes. | |
Protected Attributes | |
Jacobian | jac_wrt_nodes_structure_ |
A spline built from node values and fixed polynomial durations.
This class is responsible for combining the optimized node values with fixed polynomial durations to construct a sequence of CubicHermitePolynomial. For this it observers whether the node values change and then updates all the polynomials accordingly.
Definition at line 50 of file node_spline.h.
towr::NodeSpline::NodeSpline | ( | NodeSubjectPtr const | node_variables, |
const VecTimes & | polynomial_durations | ||
) |
Constructs a spline with constant durations.
nodes_variables | The optimized node variables (pos, vel). |
phase_durations | The fixed duration of each phase. |
Definition at line 36 of file node_spline.cc.
void towr::NodeSpline::FillJacobianWrtNodes | ( | int | poly_id, |
double | t_local, | ||
Dx | dxdt, | ||
Jacobian & | jac, | ||
bool | fill_with_zeros | ||
) | const [protected] |
Fills specific elements of the Jacobian with respect to nodes.
poly_id | The ID of the polynomial for which to get the sensitivity. |
t_local | The time passed in the polynomial with poly_id. |
dxdt | Whether the function is position, velocity or acceleration. |
jac[in/out] | The correctly sized Jacobian to fill. |
fill_with_zeros | True if only sparsity pattern should be set. |
Definition at line 86 of file node_spline.cc.
virtual Jacobian towr::NodeSpline::GetJacobianOfPosWrtDurations | ( | double | t | ) | const [inline, virtual] |
How the spline position changes when the polynomial durations change.
t | The time along the spline at which the sensitivity is required. |
Reimplemented in towr::PhaseSpline.
Definition at line 103 of file node_spline.h.
NodeSpline::Jacobian towr::NodeSpline::GetJacobianWrtNodes | ( | double | t, |
Dx | dxdt | ||
) | const |
How the spline changes when the node values change.
t | The time along the spline at which the sensitivity is required. |
dxdt | Whether the derivative of the pos, vel or acc is desired. |
Definition at line 64 of file node_spline.cc.
NodeSpline::Jacobian towr::NodeSpline::GetJacobianWrtNodes | ( | int | poly_id, |
double | t_local, | ||
Dx | dxdt | ||
) | const |
How the spline changes when the node values change.
poly_id | Polynomial for which the sensitivity is desired. |
t_local | Local time in that specific polynomial. |
dxdt | Whether the derivative of the pos, vel or acc is desired. |
Definition at line 73 of file node_spline.cc.
int towr::NodeSpline::GetNodeVariablesCount | ( | ) | const |
Definition at line 58 of file node_spline.cc.
void towr::NodeSpline::UpdateNodes | ( | ) | [virtual] |
Called by subject to update the polynomials with new node values.
Implements towr::NodesObserver.
Definition at line 47 of file node_spline.cc.
Jacobian towr::NodeSpline::jac_wrt_nodes_structure_ [mutable, protected] |
The size and non-zero elements of the Jacobian of the position w.r.t nodes.
Definition at line 110 of file node_spline.h.