38 :
NodeSpline(nodes.get(), nodes->ConvertPhaseToPolyDurations(phase_durations->GetPhaseDurations())),
50 for (
int i=0; i<nodes->GetPolynomialCount(); ++i)
58 auto poly_durations =
phase_nodes_->ConvertPhaseToPolyDurations(phase_duration);
80 int poly_id;
double t_local;
86 double inner_derivative =
phase_nodes_->GetDerivativeOfPolyDurationWrtPhaseDuration(poly_id);
87 double prev_polys_in_phase =
phase_nodes_->GetNumberOfPrevPolynomialsInPhase(poly_id);
92 return inner_derivative*(dxdT - prev_polys_in_phase*vel);
VecTimes GetPolyDurations() const
Jacobian GetJacobianOfPos(int phase, const VectorXd &dx_dT, const VectorXd &xd) const
How a change in the phase durations affect the position of a spline.
const VectorXd v() const
read access to the first-derivative of the state, e.g. velocity.
Eigen::VectorXd GetDerivativeOfPosWrtPhaseDuration(double t) const
How the position at time t changes with current phase duration.
Base class to receive up-to-date values of the ContactSchedule.
A spline built from node values and fixed polynomial durations.
Jacobian jac_wrt_nodes_structure_
std::pair< int, double > GetLocalTime(double t_global, const VecTimes &d) const
How much time of the current segment has passed at t_global.
void UpdatePolynomialDurations() override
Called by subject to update polynomial durations when they changed.
VecPoly cubic_polys_
the sequence of polynomials making up the spline.
std::shared_ptr< NodesVariablesPhaseBased > Ptr
A variable set composed of the phase durations of an endeffector.
NodesVariablesPhaseBased::Ptr phase_nodes_
void UpdatePolynomialCoeff()
Updates the cubic-Hermite polynomial coefficients using the currently set nodes values and durations...
static int GetSegmentID(double t_global, const VecTimes &durations)
Eigen::SparseMatrix< double, Eigen::RowMajor > Jacobian
PhaseDurationsSubjectPtr phase_durations_
VecDurations GetPhaseDurations() const
Jacobian GetJacobianOfPosWrtDurations(double t) const override
How the spline position changes when the polynomial durations change.
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.
const State GetPoint(double t) const
PhaseSpline(NodesVariablesPhaseBased::Ptr const node_variables, PhaseDurations *const phase_durations)
Constructs a spline with varying/optimized phase durations.