37 : CostTerm(
"Node Cost")
54 for (
auto n :
nodes_->GetNodes()) {
56 cost += std::pow(val,2);
67 for (
int i=0; i<
nodes_->GetRows(); ++i)
68 for (
auto idx :
nodes_->GetNodeInfoAtOptIndex(i))
69 if (idx.node_deriv_==
deriv_ && idx.node_dim_==
dim_) {
71 jac.coeffRef(0, i) += 2.0*val;
virtual void InitVariableDependedQuantities(const VariablesPtr &x) override
NodeCost(const std::string &nodes_id, Dx deriv, int dim)
Constructs a cost term for the optimization problem.
double GetCost() const override
Position and velocity of nodes used to generate a Hermite spline.
std::shared_ptr< Nodes > nodes_
void FillJacobianBlock(std::string var_set, Jacobian &) const override
Dx
< the values or derivative. For motions e.g. position, velocity, ...