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);
std::pair< int, double > GetLocalTime(double t_global, const VecTimes &d) const
How much time of the current segment has passed at t_global.
std::shared_ptr< PhaseNodes > Ptr
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_
virtual void UpdatePolynomialDurations() override
Called by subject to update polynomial durations when they changed.
PhaseNodes::Ptr phase_nodes_
VecPoly cubic_polys_
the sequence of polynomials making up the spline.
A variable set composed of the phase durations of an endeffector.
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.
void UpdatePolynomialCoeff()
Updates the cubic-Hermite polynomial coefficients using the currently set nodes values and durations...
VecTimes GetPolyDurations() const
VecDurations GetPhaseDurations() const
static int GetSegmentID(double t_global, const VecTimes &durations)
Eigen::SparseMatrix< double, Eigen::RowMajor > Jacobian
PhaseSpline(PhaseNodes::Ptr const node_variables, PhaseDurations *const phase_durations)
Constructs a spline with varying/optimized phase durations.
PhaseDurationsSubjectPtr phase_durations_
const State GetPoint(double t) const
Eigen::VectorXd GetDerivativeOfPosWrtPhaseDuration(double t) const
How the position at time t changes with current phase duration.
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.