#include <mc_solver/KinematicsConstraint.h>
Public Member Functions | |
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 Member Functions | |
void | addToSolverImpl (mc_solver::QPSolver &solver) override |
void | removeFromSolverImpl (mc_solver::QPSolver &solver) override |
Protected Attributes | |
mc_rtc::void_ptr | constraint_ |
Protected Attributes inherited from mc_solver::ConstraintSet | |
QPSolver::Backend | backend_ |
bool | inSolver_ = false |
Holds kinematic constraints (joint limits) for the robot
mc_solver::KinematicsConstraint::KinematicsConstraint | ( | const mc_rbdyn::Robots & | robots, |
unsigned int | robotIndex, | ||
double | timeStep | ||
) |
Regular constraint constructor Builds a regular joint limits constraint, prefer a damped joint limits constraint in general See tasks::qp::JointLimitsConstr for detail
robots | The robots including the robot affected by this constraint |
robotIndex | The index of the robot affected by this constraint |
timeStep | Solver timestep |
mc_solver::KinematicsConstraint::KinematicsConstraint | ( | const mc_rbdyn::Robots & | robots, |
unsigned int | robotIndex, | ||
double | timeStep, | ||
const std::array< double, 3 > & | damper, | ||
double | velocityPercent = 0.5 |
||
) |
Damped constraint constructor Builds a damped joint limits constraint See tasks::qp::DamperJointLimitsConstr documentation for detail
robots | The robots including the robot affected by this constraint |
robotIndex | The index of the robot affected by this constraint |
timeStep | Solver timestep |
damper | Value of the damper {interaction distance, safety distance, offset} |
velocityPercent | Maximum joint velocity percentage, 0.5 is advised |
|
overrideprotectedvirtual |
Implementation of mc_solver::ConstraintSet::addToSolver
Implements mc_solver::ConstraintSet.
|
overrideprotectedvirtual |
Implementation of mc_solver::ConstraintSet::removeFromSolver
Implements mc_solver::ConstraintSet.
|
protected |
Holds the constraint implementation
In Tasks backend:
In TVM backend:
The deleter carries the initial type of the constraint