mc_solver::TVMQPSolver Struct Referencefinal

#include <mc_solver/TVMQPSolver.h>

Inheritance diagram for mc_solver::TVMQPSolver:
Collaboration diagram for mc_solver::TVMQPSolver:

Public Member Functions

 TVMQPSolver (mc_rbdyn::RobotsPtr robots, double timeStep)
 
 TVMQPSolver (double timeStep)
 
 ~TVMQPSolver () final=default
 
void setContacts (ControllerToken, const std::vector< mc_rbdyn::Contact > &contacts) final
 
const sva::ForceVecd desiredContactForce (const mc_rbdyn::Contact &id) const final
 
double solveTime () final
 
double solveAndBuildTime () final
 
tvm::LinearizedControlProblem & problem () noexcept
 
const tvm::LinearizedControlProblem & problem () const noexcept
 
- Public Member Functions inherited from mc_solver::QPSolver
 QPSolver (mc_rbdyn::RobotsPtr robots, double timeStep, Backend backend)
 
 QPSolver (double timeStep, Backend backend)
 
virtual ~QPSolver ()=default
 
Backend backend () const noexcept
 
void addConstraintSet (ConstraintSet &cs)
 
template<typename T >
void addConstraintSet (const std::unique_ptr< T > &ptr)
 
void removeConstraintSet (ConstraintSet &cs)
 
template<typename T >
void removeConstraintSet (const std::unique_ptr< T > &ptr)
 
void addTask (mc_tasks::MetaTask *task)
 
void addTask (std::shared_ptr< mc_tasks::MetaTask > task)
 
void removeTask (mc_tasks::MetaTask *task)
 
void removeTask (std::shared_ptr< mc_tasks::MetaTask > task)
 
void setContacts (const std::vector< mc_rbdyn::Contact > &contacts={})
 
const std::vector< mc_rbdyn::Contact > & contacts () const noexcept
 
const std::vector< mc_solver::ConstraintSet * > & constraints () const noexcept
 
const std::vector< mc_tasks::MetaTask * > & tasks () const noexcept
 
bool run (FeedbackType fType=FeedbackType::None)
 
const mc_rbdyn::Robotrobot () const
 
mc_rbdyn::Robotrobot ()
 
mc_rbdyn::Robotrobot (unsigned int idx)
 
const mc_rbdyn::Robotrobot (unsigned int idx) const
 
const mc_rbdyn::Robotenv () const
 
mc_rbdyn::Robotenv ()
 
const mc_rbdyn::Robotsrobots () const
 
mc_rbdyn::Robotsrobots ()
 
const mc_rbdyn::RobotsrealRobots () const
 
mc_rbdyn::RobotsrealRobots ()
 
double dt () const
 
void logger (std::shared_ptr< mc_rtc::Logger > logger)
 
std::shared_ptr< mc_rtc::Loggerlogger () const
 
void gui (std::shared_ptr< mc_rtc::gui::StateBuilder > gui)
 
std::shared_ptr< mc_rtc::gui::StateBuildergui () const
 
void controller (mc_control::MCController *ctl) noexcept
 
const mc_control::MCControllercontroller () const noexcept
 
mc_control::MCControllercontroller () noexcept
 

Static Public Member Functions

static TVMQPSolverfrom_solver (QPSolver &solver) noexcept
 
static const TVMQPSolverfrom_solver (const QPSolver &solver) noexcept
 
- Static Public Member Functions inherited from mc_solver::QPSolver
static Backend context_backend ()
 
static void context_backend (Backend backend)
 

Additional Inherited Members

- Public Types inherited from mc_solver::QPSolver
enum  Backend { Backend::Unset, Backend::Tasks, Backend::TVM }
 
- Protected Member Functions inherited from mc_solver::QPSolver
void addTaskToGUI (mc_tasks::MetaTask *task)
 
- Protected Attributes inherited from mc_solver::QPSolver
Backend backend_
 
mc_rbdyn::RobotsPtr robots_p
 
mc_rbdyn::RobotsPtr realRobots_p
 
double timeStep
 
std::vector< mc_rbdyn::Contactcontacts_
 
std::vector< mc_tasks::MetaTask * > metaTasks_
 
std::vector< std::shared_ptr< void > > shPtrTasksStorage
 
std::vector< mc_solver::ConstraintSet * > constraints_
 
std::shared_ptr< mc_rtc::Loggerlogger_ = nullptr
 
std::shared_ptr< mc_rtc::gui::StateBuildergui_ = nullptr
 
mc_control::MCControllercontroller_ = nullptr
 

Detailed Description

This implements the QPSolver interface for the TVM backend

This solver can accepts tasks and constraints from mc_rtc

Constructor & Destructor Documentation

◆ TVMQPSolver() [1/2]

mc_solver::TVMQPSolver::TVMQPSolver ( mc_rbdyn::RobotsPtr  robots,
double  timeStep 
)

◆ TVMQPSolver() [2/2]

mc_solver::TVMQPSolver::TVMQPSolver ( double  timeStep)

◆ ~TVMQPSolver()

mc_solver::TVMQPSolver::~TVMQPSolver ( )
finaldefault

Member Function Documentation

◆ desiredContactForce()

const sva::ForceVecd mc_solver::TVMQPSolver::desiredContactForce ( const mc_rbdyn::Contact id) const
finalvirtual

Desired resultant of contact force in robot surface frame

Parameters
contactContact for which the force is desired. This contact must be one of the active contacts in the solver.
Returns
Contact force in robot surface frame

Implements mc_solver::QPSolver.

◆ from_solver() [1/2]

static const TVMQPSolver& mc_solver::TVMQPSolver::from_solver ( const QPSolver solver)
inlinestaticnoexcept

Helper to get a TVMQPSolver from a QPSolver instance

The caller should make sure the cast is valid by checking the QPSolver backend.

In debug the program will abort otherwise, in release UB abounds

◆ from_solver() [2/2]

static TVMQPSolver& mc_solver::TVMQPSolver::from_solver ( QPSolver solver)
inlinestaticnoexcept

Helper to get a TVMQPSolver from a QPSolver instance

The caller should make sure the cast is valid by checking the QPSolver backend.

In debug the program will abort otherwise, in release UB abounds

◆ problem() [1/2]

const tvm::LinearizedControlProblem& mc_solver::TVMQPSolver::problem ( ) const
inlinenoexcept

Access the internal problem (const)

◆ problem() [2/2]

tvm::LinearizedControlProblem& mc_solver::TVMQPSolver::problem ( )
inlinenoexcept

Access the internal problem

◆ setContacts()

void mc_solver::TVMQPSolver::setContacts ( ControllerToken  ,
const std::vector< mc_rbdyn::Contact > &  contacts 
)
finalvirtual

Implements mc_solver::QPSolver.

◆ solveAndBuildTime()

double mc_solver::TVMQPSolver::solveAndBuildTime ( )
finalvirtual

Returns the building and solving time in ms

Implements mc_solver::QPSolver.

◆ solveTime()

double mc_solver::TVMQPSolver::solveTime ( )
finalvirtual

Returns the solving time in ms

Implements mc_solver::QPSolver.


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