mc_solver::DynamicsConstraint Class Reference

#include <mc_solver/DynamicsConstraint.h>

Inheritance diagram for mc_solver::DynamicsConstraint:
Collaboration diagram for mc_solver::DynamicsConstraint:

Public Member Functions

 DynamicsConstraint (const mc_rbdyn::Robots &robots, unsigned int robotIndex, double timeStep, bool infTorque=false)
 
 DynamicsConstraint (const mc_rbdyn::Robots &robots, unsigned int robotIndex, double timeStep, const std::array< double, 3 > &damper, double velocityPercent=1.0, bool infTorque=false)
 
tasks::qp::MotionConstr & motionConstr () noexcept
 
mc_tvm::DynamicFunctiondynamicFunction ()
 
void addToSolverImpl (QPSolver &solver) override
 
void removeFromSolverImpl (QPSolver &solver) override
 
unsigned int robotIndex () const noexcept
 
- Public Member Functions inherited from mc_solver::KinematicsConstraint
 KinematicsConstraint (const mc_rbdyn::Robots &robots, unsigned int robotIndex, double timeStep)
 
 KinematicsConstraint (const mc_rbdyn::Robots &robots, unsigned int robotIndex, double timeStep, const std::array< double, 3 > &damper, double velocityPercent=0.5)
 
- 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
 

Protected Attributes

mc_rtc::void_ptr motion_constr_
 
unsigned int robotIndex_
 
- Protected Attributes inherited from mc_solver::KinematicsConstraint
mc_rtc::void_ptr constraint_
 
- Protected Attributes inherited from mc_solver::ConstraintSet
QPSolver::Backend backend_
 
bool inSolver_ = false
 

Additional Inherited Members

- Protected Member Functions inherited from mc_solver::KinematicsConstraint
void addToSolverImpl (mc_solver::QPSolver &solver) override
 
void removeFromSolverImpl (mc_solver::QPSolver &solver) override
 

Detailed Description

Holds dynamics constraints (equation of motion) for a robot

Constructor & Destructor Documentation

◆ DynamicsConstraint() [1/2]

mc_solver::DynamicsConstraint::DynamicsConstraint ( const mc_rbdyn::Robots robots,
unsigned int  robotIndex,
double  timeStep,
bool  infTorque = false 
)

Constructor Builds a regular joint limits constraint and a motion constr depending on the nature of the robot See tasks::qp::MotionConstr for details on the latter one

Parameters
robotsThe robots including the robot affected by this constraint
robotIndexThe index of the robot affected by this constraint
timeStepSolver timestep
infTorqueIf true, ignore the torque limits set in the robot model

◆ DynamicsConstraint() [2/2]

mc_solver::DynamicsConstraint::DynamicsConstraint ( const mc_rbdyn::Robots robots,
unsigned int  robotIndex,
double  timeStep,
const std::array< double, 3 > &  damper,
double  velocityPercent = 1.0,
bool  infTorque = false 
)

Constructor Builds a damped joint limits constraint and a motion constr depending on the nature of the robot See tasks::qp::MotionConstr for details on the latter one

Parameters
robotsThe robots including the robot affected by this constraint
robotIndexThe index of the robot affected by this constraint
timeStepSolver timestep
damperValue of the damper {interaction distance, safety distance, offset}
velocityPercentMaximum joint velocity percentage, 0.5 is advised
infTorqueIf true, ignore the torque limits set in the robot model

Member Function Documentation

◆ addToSolverImpl()

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

Should take care of the actual insertion into a concrete solver

Implements mc_solver::ConstraintSet.

◆ dynamicFunction()

mc_tvm::DynamicFunction& mc_solver::DynamicsConstraint::dynamicFunction ( )
inline

Returns the mc_tvm::DynamicFunction

Assumes the backend was TVM

◆ motionConstr()

tasks::qp::MotionConstr& mc_solver::DynamicsConstraint::motionConstr ( )
inlinenoexcept

Returns the tasks::qp::MotionConstr

This assumes the backend was Tasks

◆ removeFromSolverImpl()

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

Should take care of the actual removal from a concrete solver

Implements mc_solver::ConstraintSet.

◆ robotIndex()

unsigned int mc_solver::DynamicsConstraint::robotIndex ( ) const
inlinenoexcept

Member Data Documentation

◆ motion_constr_

mc_rtc::void_ptr mc_solver::DynamicsConstraint::motion_constr_
protected

Holds the motion constraint implementation

In Tasks backend:

  • tasks::qp::MotionConstr or a derived constraint if the robot has flexibilities

In TVM backend:

◆ robotIndex_

unsigned int mc_solver::DynamicsConstraint::robotIndex_
protected

Robot index for the constraint


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