38 +
"-dx_"+std::to_string(deriv)
39 +
"-dim_"+std::to_string(dim))
57 for (
auto n :
nodes_->GetNodes()) {
59 cost +=
weight_*std::pow(val,2);
69 for (
int i=0; i<
nodes_->GetRows(); ++i)
70 for (
auto nvi :
nodes_->GetNodeValuesInfo(i))
73 jac.coeffRef(0, i) +=
weight_*2.0*val;
Composite::Ptr VariablesPtr
void InitVariableDependedQuantities(const VariablesPtr &x) override
Position and velocity of nodes used to generate a Hermite spline.
double GetCost() const override
NodeCost(const std::string &nodes_id, Dx deriv, int dim, double weight)
Constructs a cost term for the optimization problem.
Eigen::SparseMatrix< double, Eigen::RowMajor > Jacobian
std::shared_ptr< NodesVariables > nodes_
void FillJacobianBlock(std::string var_set, Jacobian &) const override
Dx
< the values or derivative. For motions e.g. position, velocity, ...