mc_solver::BoundedSpeedConstr Class Reference

#include <mc_solver/BoundedSpeedConstr.h>

Inheritance diagram for mc_solver::BoundedSpeedConstr:
Collaboration diagram for mc_solver::BoundedSpeedConstr:

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
 

Detailed Description

Manage constraints on the speed of a given frame

Constructor & Destructor Documentation

◆ BoundedSpeedConstr()

mc_solver::BoundedSpeedConstr::BoundedSpeedConstr ( const mc_rbdyn::Robots robots,
unsigned int  robotIndex,
double  dt 
)

Member Function Documentation

◆ addBoundedSpeed() [1/4]

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

Parameters
solverSolver where this constraint exists
frameFrame affected by this constraint
dofCan select degrees of freedom, must be of size (6, n), 1 <= n <= 6
lowerSpeedLower bound speed on the selected dof, must of be of size n
upperSpeedUpper bound speed on the selected dof, must of be of size n

◆ addBoundedSpeed() [2/4]

void mc_solver::BoundedSpeedConstr::addBoundedSpeed ( QPSolver solver,
const mc_rbdyn::RobotFrame frame,
const Eigen::MatrixXd &  dof,
const Eigen::VectorXd &  speed 
)
inline

Add a fixed speed constraint on the given frame

Parameters
solverSolver where this constraint exists
frameFrame affected by this constraint
dofCan select degrees of freedom, must be of size (6, n), 1 <= n <= 6
speedTarget speed on the selected dof, must of be of size n

◆ addBoundedSpeed() [3/4]

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

Parameters
solverSolver where this constraint exists
bodyNameBody affected by this constraint
bodyPointPoint on the given body to affect
dofCan select degrees of freedom, must be of size (6, n), 1 <= n <= 6
lowerSpeedLower bound speed on the selected dof, must of be of size n
upperSpeedUpper bound speed on the selected dof, must of be of size n

◆ addBoundedSpeed() [4/4]

void mc_solver::BoundedSpeedConstr::addBoundedSpeed ( QPSolver solver,
const std::string &  bodyName,
const Eigen::Vector3d &  bodyPoint,
const Eigen::MatrixXd &  dof,
const Eigen::VectorXd &  speed 
)
inline

Add a fixed speed constraint on the given body

Parameters
solverSolver where this constraint exists
bodyNameBody affected by this constraint
bodyPointPoint on the given body to affect
dofCan select degrees of freedom, must be of size (6, n), 1 <= n <= 6
speedTarget speed on the selected dof, must of be of size n

◆ addToSolverImpl()

void mc_solver::BoundedSpeedConstr::addToSolverImpl ( QPSolver solver)
overridevirtual

Should take care of the actual insertion into a concrete solver

Implements mc_solver::ConstraintSet.

◆ nrBoundedSpeeds()

size_t mc_solver::BoundedSpeedConstr::nrBoundedSpeeds ( ) const

◆ removeBoundedSpeed()

bool mc_solver::BoundedSpeedConstr::removeBoundedSpeed ( QPSolver solver,
const std::string &  frameName 
)

Remove all constraints associated to a body or a frame

◆ removeFromSolverImpl()

void mc_solver::BoundedSpeedConstr::removeFromSolverImpl ( QPSolver solver)
overridevirtual

Should take care of the actual removal from a concrete solver

Implements mc_solver::ConstraintSet.

◆ reset()

void mc_solver::BoundedSpeedConstr::reset ( QPSolver solver)

The documentation for this class was generated from the following file: