20 template<
typename UpdateNrVars>
23 static_assert(std::is_same<UpdateNrVars, UpdateNrVarsRobot>::value
24 || std::is_same<UpdateNrVars, UpdateNrVarsLambda>::value,
25 "This should not be instanciated with unexpected UpdateNrVars classes");
31 template<
typename U = UpdateNrVars,
32 typename =
typename std::enable_if<std::is_same<U, UpdateNrVarsRobot>::value>::type>
33 explicit Update(
unsigned int rIndex) : UpdateNrVars(rIndex)
37 template<
typename U = UpdateNrVars,
38 typename =
typename std::enable_if<std::is_same<U, UpdateNrVarsLambda>::value>::type>
39 explicit Update(
const tasks::qp::ContactId & cid) : UpdateNrVars(cid)
49 virtual const Eigen::MatrixXd &
A()
const = 0;
52 const std::vector<rbd::MultiBodyConfig> &,
53 const tasks::qp::SolverData &)
56 const auto & A_ =
A();
57 auto nInEq = A_.rows();
58 AFull_.setZero(nInEq, UpdateNrVars::nrVars_);
59 AFull_.block(0, UpdateNrVars::ABegin_, nInEq, A_.cols()) = A_;
67 struct IsUpdate :
public std::is_base_of<UpdateTag, T>
79 void updateImpl(
const std::vector<rbd::MultiBody> &,
80 const std::vector<rbd::MultiBodyConfig> &,
81 const tasks::qp::SolverData &);
87 Eigen::MatrixXd ALambda_;