mc_control::details::BackendSpecificController< backend, SolverT > Struct Template Reference

#include <mc_control/MCController.h>

Inheritance diagram for mc_control::details::BackendSpecificController< backend, SolverT >:
Collaboration diagram for mc_control::details::BackendSpecificController< backend, SolverT >:

Public Member Functions

 BackendSpecificController (mc_rbdyn::RobotModulePtr robot, double dt, const mc_rtc::Configuration &config={})
 
 BackendSpecificController (const std::vector< mc_rbdyn::RobotModulePtr > &robots, double dt, const mc_rtc::Configuration &config={}, ControllerParameters params={})
 
const SolverT & solver () const noexcept
 
SolverT & solver () noexcept
 
- Public Member Functions inherited from mc_control::MCController
virtual ~MCController ()
 
virtual bool run ()
 
virtual void createObserverPipelines (const mc_rtc::Configuration &config)
 
virtual bool runObserverPipelines ()
 
virtual bool resetObserverPipelines ()
 Reset the observers. More...
 
bool hasObserverPipeline (const std::string &name) const
 
bool hasObserverPipeline () const
 
const std::vector< mc_observers::ObserverPipeline > & observerPipelines () const
 
std::vector< mc_observers::ObserverPipeline > & observerPipelines ()
 
const mc_observers::ObserverPipelineobserverPipeline (const std::string &name) const
 
mc_observers::ObserverPipelineobserverPipeline (const std::string &name)
 
const mc_observers::ObserverPipelineobserverPipeline () const
 
mc_observers::ObserverPipelineobserverPipeline ()
 
bool run (mc_solver::FeedbackType fType)
 
virtual void stop ()
 
virtual void reset (const ControllerResetData &reset_data)
 
void addCollisions (const std::string &r1, const std::string &r2, const std::vector< mc_rbdyn::Collision > &collisions)
 
bool hasCollision (const std::string &r1, const std::string &r2, const mc_rbdyn::Collision &col) const noexcept
 
bool hasCollision (const std::string &r1, const std::string &r2, const std::string &c1, const std::string &c2) const noexcept
 
void removeCollisions (const std::string &r1, const std::string &r2, const std::vector< mc_rbdyn::Collision > &collisions)
 
void removeCollisions (const std::string &r1, const std::string &r2)
 
void addContact (const Contact &c)
 
void removeContact (const Contact &c)
 
void clearContacts ()
 
const ContactSetcontacts () const
 
bool hasContact (const Contact &c) const
 
bool hasRobot (const std::string &robot) const noexcept
 
const mc_rbdyn::Robotsrobots () const noexcept
 
mc_rbdyn::Robotsrobots () noexcept
 
const mc_solver::QPSolversolver () const noexcept
 
mc_solver::QPSolversolver () noexcept
 
mc_rtc::Loggerlogger () noexcept
 
std::shared_ptr< mc_rtc::gui::StateBuildergui () const noexcept
 
mc_rtc::DataStoredatastore () noexcept
 
const mc_rtc::DataStoredatastore () const noexcept
 
virtual void supported_robots (std::vector< std::string > &out) const
 
mc_rbdyn::RobotloadRobot (mc_rbdyn::RobotModulePtr rm, const std::string &name)
 
void removeRobot (const std::string &name)
 
mc_rtc::Configurationconfig ()
 
const mc_rtc::Configurationconfig () const
 
Grippergripper (const std::string &robot, const std::string &gripper)
 
template<typename T = void>
void anchorFrame (const sva::PTransformd &)
 
template<typename T = void>
void anchorFrameReal (const sva::PTransformd &)
 
template<typename T = void>
const sva::PTransformd & anchorFrame () const
 
template<typename T = void>
const sva::PTransformd & anchorFrameReal () const
 
mc_rtc::Configuration robot_config (const std::string &robot_name) const
 
mc_rtc::Configuration robot_config (const mc_rbdyn::Robot &robot) const
 
const mc_rbdyn::Robotrobot () const noexcept
 
mc_rbdyn::Robotrobot () noexcept
 
const mc_rbdyn::Robotrobot (const std::string &name) const
 
mc_rbdyn::Robotrobot (const std::string &name)
 
const mc_rbdyn::Robotenv () const noexcept
 
mc_rbdyn::Robotenv () noexcept
 
const mc_rbdyn::RobotsrealRobots () const noexcept
 
mc_rbdyn::RobotsrealRobots () noexcept
 
const mc_rbdyn::RobotrealRobot () const noexcept
 
mc_rbdyn::RobotrealRobot () noexcept
 
const mc_rbdyn::RobotrealRobot (const std::string &name) const
 
mc_rbdyn::RobotrealRobot (const std::string &name)
 
const mc_rbdyn::RobotsoutputRobots () const noexcept
 
mc_rbdyn::RobotsoutputRobots () noexcept
 
const mc_rbdyn::RobotoutputRobot () const noexcept
 
mc_rbdyn::RobotoutputRobot () noexcept
 
const mc_rbdyn::RobotoutputRobot (const std::string &name) const
 
mc_rbdyn::RobotoutputRobot (const std::string &name)
 
const mc_rbdyn::RobotsoutputRealRobots () const noexcept
 
mc_rbdyn::RobotsoutputRealRobots () noexcept
 
const mc_rbdyn::RobotoutputRealRobot () const noexcept
 
mc_rbdyn::RobotoutputRealRobot () noexcept
 
const mc_rbdyn::RobotoutputRealRobot (const std::string &name) const
 
mc_rbdyn::RobotoutputRealRobot (const std::string &name)
 

Additional Inherited Members

- Public Types inherited from mc_control::MCController
using Backend = mc_solver::QPSolver::Backend
 
- Static Public Member Functions inherited from mc_control::MCController
static void set_loading_location (std::string_view location)
 
static void set_name (std::string_view name)
 
- Public Attributes inherited from mc_control::MCController
const double timeStep
 
mc_rtc::unique_ptr< mc_solver::ContactConstraintcontactConstraint
 
mc_rtc::unique_ptr< mc_solver::DynamicsConstraintdynamicsConstraint
 
mc_rtc::unique_ptr< mc_solver::KinematicsConstraintkinematicsConstraint
 
mc_rtc::unique_ptr< mc_solver::CollisionsConstraintselfCollisionConstraint
 
mc_rtc::unique_ptr< mc_solver::CompoundJointConstraintcompoundJointConstraint
 
std::shared_ptr< mc_tasks::PostureTaskpostureTask
 
const std::string name_
 
const std::string loading_location_
 
- Protected Types inherited from mc_control::MCController
using ContactTableDataT = std::tuple< std::string, std::string, std::string, std::string, std::string, double >
 
using duration_ms = std::chrono::duration< double, std::milli >
 
- Protected Member Functions inherited from mc_control::MCController
 MCController (std::shared_ptr< mc_rbdyn::RobotModule > robot, double dt, ControllerParameters params={})
 
 MCController (std::shared_ptr< mc_rbdyn::RobotModule > robot, double dt, const mc_rtc::Configuration &config, ControllerParameters params={})
 
 MCController (const std::vector< std::shared_ptr< mc_rbdyn::RobotModule >> &robot_modules, double dt, ControllerParameters params={})
 
 MCController (const std::vector< std::shared_ptr< mc_rbdyn::RobotModule >> &robot_modules, double dt, const mc_rtc::Configuration &config, ControllerParameters params={})
 
mc_rbdyn::RobotloadRobot (mc_rbdyn::RobotModulePtr rm, const std::string &name, mc_rbdyn::Robots &robots, const mc_rbdyn::LoadRobotParameters &params)
 
void addRobotToLog (const mc_rbdyn::Robot &robot)
 
void addRobotToGUI (const mc_rbdyn::Robot &robot)
 
void updateContacts ()
 
- Protected Attributes inherited from mc_control::MCController
std::shared_ptr< mc_solver::QPSolverqpsolver
 
mc_rbdyn::RobotsPtr outputRobots_
 
mc_rbdyn::RobotsPtr outputRealRobots_
 
std::vector< mc_rbdyn::RobotConverterconverters_
 
std::vector< mc_observers::ObserverPipelineobserverPipelines_
 
std::shared_ptr< mc_rtc::Loggerlogger_
 
std::shared_ptr< mc_rtc::gui::StateBuildergui_
 
mc_rtc::Configuration config_
 
mc_rtc::DataStore datastore_
 
std::vector< mc_solver::ConstraintSetPtrconstraints_
 
std::shared_ptr< mc_solver::ContactConstraintcontact_constraint_ = nullptr
 
std::map< std::pair< std::string, std::string >, std::shared_ptr< mc_solver::CollisionsConstraint > > collision_constraints_
 
ContactSet contacts_
 
bool contacts_changed_
 
std::vector< ContactTableDataTcontacts_table_
 
duration_ms updateContacts_dt_ {0}
 

Detailed Description

template<MCController::Backend backend, typename SolverT>
struct mc_control::details::BackendSpecificController< backend, SolverT >

Helper to declare backend-specific controllers

The difference with the default MCController class are:

  • the backend is always the one specified here
  • solver() returns the solver class specified here

Constructor & Destructor Documentation

◆ BackendSpecificController() [1/2]

template<MCController::Backend backend, typename SolverT >
mc_control::details::BackendSpecificController< backend, SolverT >::BackendSpecificController ( mc_rbdyn::RobotModulePtr  robot,
double  dt,
const mc_rtc::Configuration config = {} 
)
inline

◆ BackendSpecificController() [2/2]

template<MCController::Backend backend, typename SolverT >
mc_control::details::BackendSpecificController< backend, SolverT >::BackendSpecificController ( const std::vector< mc_rbdyn::RobotModulePtr > &  robots,
double  dt,
const mc_rtc::Configuration config = {},
ControllerParameters  params = {} 
)
inline

Member Function Documentation

◆ solver() [1/2]

template<MCController::Backend backend, typename SolverT >
const SolverT& mc_control::details::BackendSpecificController< backend, SolverT >::solver ( ) const
inlinenoexcept

◆ solver() [2/2]

template<MCController::Backend backend, typename SolverT >
SolverT& mc_control::details::BackendSpecificController< backend, SolverT >::solver ( )
inlinenoexcept

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