#include <Tasks/QPConstr.h>
Public Member Functions | |
BoundedSpeedConstr (const std::vector< rbd::MultiBody > &mbs, int robotIndex, double timeStep) | |
void | addBoundedSpeed (const std::vector< rbd::MultiBody > &mbs, const std::string &bodyName, const Eigen::Vector3d &bodyPoint, const Eigen::MatrixXd &dof, const Eigen::VectorXd &speed) |
void | addBoundedSpeed (const std::vector< rbd::MultiBody > &mbs, const std::string &bodyName, const Eigen::Vector3d &bodyPoint, const Eigen::MatrixXd &dof, const Eigen::VectorXd &lowerSpeed, const Eigen::VectorXd &upperSpeed) |
bool | removeBoundedSpeed (const std::string &bodyName) |
void | resetBoundedSpeeds () |
Remove all bounded speed constraint. More... | |
std::size_t | nrBoundedSpeeds () const |
void | updateBoundedSpeeds () |
Reallocate A and b matrix. More... | |
virtual void | updateNrVars (const std::vector< rbd::MultiBody > &mbs, const SolverData &data) override |
virtual void | update (const std::vector< rbd::MultiBody > &mbs, const std::vector< rbd::MultiBodyConfig > &mbc, const SolverData &data) override |
virtual std::string | nameGenInEq () const override |
virtual std::string | descGenInEq (const std::vector< rbd::MultiBody > &mb, int line) override |
virtual int | maxGenInEq () const override |
virtual const Eigen::MatrixXd & | AGenInEq () const override |
virtual const Eigen::VectorXd & | LowerGenInEq () const override |
virtual const Eigen::VectorXd & | UpperGenInEq () const override |
![]() | |
virtual | ~ConstraintFunction () override |
void | addToSolver (QPSolver &sol) |
void | addToSolver (const std::vector< rbd::MultiBody > &mbs, QPSolver &sol) |
void | removeFromSolver (QPSolver &sol) |
![]() | |
virtual | ~Constraint () |
Constraint some link velocity in link frame by direct integration.
\[ S (\underline{v} - v) \leq S a \Delta_{dt} \leq S (\overline{v} - v) \]
with \( \underline{v} \) and \( \overline{v} \) the velocity lower and upper bound, \( v \) the link velocity in link frame, \( a \) the link acceleration in link frame and \( S \) the axis selection matrix.
tasks::qp::BoundedSpeedConstr::BoundedSpeedConstr | ( | const std::vector< rbd::MultiBody > & | mbs, |
int | robotIndex, | ||
double | timeStep | ||
) |
mbs | Multi-robot system. |
robotIndex | Constrained robot Index in mbs. |
timeStep | Time step in second. |
void tasks::qp::BoundedSpeedConstr::addBoundedSpeed | ( | const std::vector< rbd::MultiBody > & | mbs, |
const std::string & | bodyName, | ||
const Eigen::Vector3d & | bodyPoint, | ||
const Eigen::MatrixXd & | dof, | ||
const Eigen::VectorXd & | lowerSpeed, | ||
const Eigen::VectorXd & | upperSpeed | ||
) |
Add a bounded speed constraint. Don't forget to call updateBoundedSpeeds and QPSolver::updateConstrSize. You can also only call QPSolver::nrVars or QPSolver::updateConstrsNrVars or QPSolver::updateNrVars.
mbs | Multi-robot system (must be the same given in the constructor. |
bodyId | Constrained body id in mbs[robotIndex]. |
bodyPoint | static translation applied on the link \( v = xlt(bodyPoint) v_{bodyId} \). |
dof | \( S \in \mathbb{R}^{n \times 6} \). |
lowerSpeed | Lower velocity \( \underline{v} \in \mathbb{R}^{n} \). |
upperSpeed | Upper velocity \( \overline{v} \in \mathbb{R}^{n} \). |
void tasks::qp::BoundedSpeedConstr::addBoundedSpeed | ( | const std::vector< rbd::MultiBody > & | mbs, |
const std::string & | bodyName, | ||
const Eigen::Vector3d & | bodyPoint, | ||
const Eigen::MatrixXd & | dof, | ||
const Eigen::VectorXd & | speed | ||
) |
Add a targeted speed constraint. Don't forget to call updateBoundedSpeeds and QPSolver::updateConstrSize. You can also only call QPSolver::nrVars or QPSolver::updateConstrsNrVars or QPSolver::updateNrVars.
mbs | Multi-robot system (must be the same given in the constructor. |
bodyId | Constrained body id in mbs[robotIndex]. |
bodyPoint | static translation applied on the link \( v = xlt(bodyPoint) v_{bodyId} \). |
dof | \( S \in \mathbb{R}^{n \times 6} \). |
speed | Targeted velocity \( \underline{v} \in \mathbb{R}^{n} \) and \( \overline{v} \in \mathbb{R}^{n} \). |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
std::size_t tasks::qp::BoundedSpeedConstr::nrBoundedSpeeds | ( | ) | const |
bool tasks::qp::BoundedSpeedConstr::removeBoundedSpeed | ( | const std::string & | bodyName | ) |
Remove a bounded speed constraint.
bodyName | Remove the constraint applied on bodyName. |
void tasks::qp::BoundedSpeedConstr::resetBoundedSpeeds | ( | ) |
Remove all bounded speed constraint.
|
overridevirtual |
Implements tasks::qp::Constraint.
void tasks::qp::BoundedSpeedConstr::updateBoundedSpeeds | ( | ) |
Reallocate A and b matrix.
|
overridevirtual |
Implements tasks::qp::Constraint.
|
overridevirtual |