36 :ConstraintSet(kSpecifyLater,
"swing-" + ee_motion)
63 auto curr = nodes.at(node_id);
65 Vector2d prev = nodes.at(node_id-1).p().topRows<
k2D>();
66 Vector2d next = nodes.at(node_id+1).p().topRows<
k2D>();
69 Vector2d xy_center = prev + 0.5*distance_xy;
71 for (
auto dim : {
X,
Y}) {
72 g(row++) = curr.p()(dim) - xy_center(dim);
73 g(row++) = curr.v()(dim) - des_vel_center(dim);
93 for (
auto dim : {
X,
Y}) {
void InitVariableDependedQuantities(const VariablesPtr &x) override
static const Bounds BoundZero
Composite::Ptr VariablesPtr
void FillJacobianBlock(std::string var_set, Jacobian &) const override
SwingConstraint(std::string ee_motion_id)
Links the swing constraint with current foot variables.
Semantic information associated with a scalar node value.
VectorXd GetValues() const override
NodesVariablesPhaseBased::Ptr ee_motion_
void SetRows(int num_rows)
std::vector< int > pure_swing_node_ids_
Eigen::SparseMatrix< double, Eigen::RowMajor > Jacobian
VecBound GetBounds() const override
std::string ee_motion_id_
Nodes that are associated to either swing or stance phases.
static const int n_derivatives
value and first derivative.
std::vector< Bounds > VecBound