#include <mc_solver/BoundedSpeedConstr.h>
Public Member Functions | |
BoundedSpeedConstr (const mc_rbdyn::Robots &robots, unsigned int robotIndex, double dt) | |
void | addToSolverImpl (QPSolver &solver) override |
void | removeFromSolverImpl (QPSolver &solver) override |
void | addBoundedSpeed (QPSolver &solver, const std::string &bodyName, const Eigen::Vector3d &bodyPoint, const Eigen::MatrixXd &dof, const Eigen::VectorXd &speed) |
void | addBoundedSpeed (QPSolver &solver, const std::string &bodyName, const Eigen::Vector3d &bodyPoint, const Eigen::MatrixXd &dof, const Eigen::VectorXd &lowerSpeed, const Eigen::VectorXd &upperSpeed) |
void | addBoundedSpeed (QPSolver &solver, const mc_rbdyn::RobotFrame &frame, const Eigen::MatrixXd &dof, const Eigen::VectorXd &speed) |
void | addBoundedSpeed (QPSolver &solver, const mc_rbdyn::RobotFrame &frame, const Eigen::MatrixXd &dof, const Eigen::VectorXd &lowerSpeed, const Eigen::VectorXd &upperSpeed) |
bool | removeBoundedSpeed (QPSolver &solver, const std::string &frameName) |
size_t | nrBoundedSpeeds () const |
void | reset (QPSolver &solver) |
Public Member Functions inherited from mc_solver::ConstraintSet | |
ConstraintSet () | |
void | addToSolver (mc_solver::QPSolver &solver) |
virtual void | update (QPSolver &) |
Update the constraint. More... | |
void | removeFromSolver (mc_solver::QPSolver &solver) |
virtual | ~ConstraintSet () |
bool | inSolver () const noexcept |
QPSolver::Backend | backend () const noexcept |
Additional Inherited Members | |
Protected Attributes inherited from mc_solver::ConstraintSet | |
QPSolver::Backend | backend_ |
bool | inSolver_ = false |
Manage constraints on the speed of a given frame
mc_solver::BoundedSpeedConstr::BoundedSpeedConstr | ( | const mc_rbdyn::Robots & | robots, |
unsigned int | robotIndex, | ||
double | dt | ||
) |
void mc_solver::BoundedSpeedConstr::addBoundedSpeed | ( | QPSolver & | solver, |
const mc_rbdyn::RobotFrame & | frame, | ||
const Eigen::MatrixXd & | dof, | ||
const Eigen::VectorXd & | lowerSpeed, | ||
const Eigen::VectorXd & | upperSpeed | ||
) |
Add a fixed speed constraint on the given frame
solver | Solver where this constraint exists |
frame | Frame affected by this constraint |
dof | Can select degrees of freedom, must be of size (6, n), 1 <= n <= 6 |
lowerSpeed | Lower bound speed on the selected dof, must of be of size n |
upperSpeed | Upper bound speed on the selected dof, must of be of size n |
|
inline |
Add a fixed speed constraint on the given frame
solver | Solver where this constraint exists |
frame | Frame affected by this constraint |
dof | Can select degrees of freedom, must be of size (6, n), 1 <= n <= 6 |
speed | Target speed on the selected dof, must of be of size n |
void mc_solver::BoundedSpeedConstr::addBoundedSpeed | ( | QPSolver & | solver, |
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 on the given body
solver | Solver where this constraint exists |
bodyName | Body affected by this constraint |
bodyPoint | Point on the given body to affect |
dof | Can select degrees of freedom, must be of size (6, n), 1 <= n <= 6 |
lowerSpeed | Lower bound speed on the selected dof, must of be of size n |
upperSpeed | Upper bound speed on the selected dof, must of be of size n |
|
inline |
Add a fixed speed constraint on the given body
solver | Solver where this constraint exists |
bodyName | Body affected by this constraint |
bodyPoint | Point on the given body to affect |
dof | Can select degrees of freedom, must be of size (6, n), 1 <= n <= 6 |
speed | Target speed on the selected dof, must of be of size n |
|
overridevirtual |
Should take care of the actual insertion into a concrete solver
Implements mc_solver::ConstraintSet.
size_t mc_solver::BoundedSpeedConstr::nrBoundedSpeeds | ( | ) | const |
bool mc_solver::BoundedSpeedConstr::removeBoundedSpeed | ( | QPSolver & | solver, |
const std::string & | frameName | ||
) |
Remove all constraints associated to a body or a frame
|
overridevirtual |
Should take care of the actual removal from a concrete solver
Implements mc_solver::ConstraintSet.
void mc_solver::BoundedSpeedConstr::reset | ( | QPSolver & | solver | ) |