mc_solver::ConstraintSet Class Referenceabstract

This class is a basis to wrap Constraint functions from Tasks. The aim of such wrappers should be two-folds: More...

#include <mc_solver/ConstraintSet.h>

Inheritance diagram for mc_solver::ConstraintSet:

Public Member Functions

 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

virtual void addToSolverImpl (mc_solver::QPSolver &solver)=0
 
virtual void removeFromSolverImpl (mc_solver::QPSolver &solver)=0
 

Protected Attributes

QPSolver::Backend backend_
 
bool inSolver_ = false
 

Detailed Description

This class is a basis to wrap Constraint functions from Tasks. The aim of such wrappers should be two-folds:

  • provide a safe alternative to the Tasks version wrapped
  • make the class easier to use with mc_* facilities

Constructor & Destructor Documentation

◆ ConstraintSet()

mc_solver::ConstraintSet::ConstraintSet ( )

Constructor, register the solver backend at creation time

◆ ~ConstraintSet()

virtual mc_solver::ConstraintSet::~ConstraintSet ( )
inlinevirtual

Virtual destructor

Member Function Documentation

◆ addToSolver()

void mc_solver::ConstraintSet::addToSolver ( mc_solver::QPSolver solver)

This is called by mc_solver::QPSolver when the constraint is added to the problem

◆ addToSolverImpl()

virtual void mc_solver::ConstraintSet::addToSolverImpl ( mc_solver::QPSolver solver)
protectedpure virtual

◆ backend()

QPSolver::Backend mc_solver::ConstraintSet::backend ( ) const
inlinenoexcept

◆ inSolver()

bool mc_solver::ConstraintSet::inSolver ( ) const
inlinenoexcept

◆ removeFromSolver()

void mc_solver::ConstraintSet::removeFromSolver ( mc_solver::QPSolver solver)

This is called by mc_solver::QPSolver when the constraint is removed from the problem

◆ removeFromSolverImpl()

virtual void mc_solver::ConstraintSet::removeFromSolverImpl ( mc_solver::QPSolver solver)
protectedpure virtual

◆ update()

virtual void mc_solver::ConstraintSet::update ( QPSolver )
inlinevirtual

Update the constraint.

This is called at every iteration of the controller once the constraint has been added to a solver

Parameters
solverSolver in which the constraint has been inserted

Reimplemented in mc_solver::CollisionsConstraint.

Member Data Documentation

◆ backend_

QPSolver::Backend mc_solver::ConstraintSet::backend_
protected

QPSolver backend when the constraint is created

◆ inSolver_

bool mc_solver::ConstraintSet::inSolver_ = false
protected

True if the constraint is in a solver already


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