MCController.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2022 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
8 #include <mc_control/Contact.h>
9 
11 
13 #include <mc_rbdyn/Robots.h>
14 
15 #include <mc_rtc/DataStore.h>
16 #include <mc_rtc/gui.h>
17 #include <mc_rtc/log/Logger.h>
18 #include <mc_rtc/unique_ptr.h>
19 
25 #include <mc_solver/QPSolver.h>
26 
27 #include <mc_tasks/PostureTask.h>
28 
29 namespace mc_rbdyn
30 {
31 struct Contact;
32 }
33 
34 #include <mc_control/api.h>
35 
36 namespace mc_control
37 {
38 
46 {
48  const std::vector<std::vector<double>> q;
49 };
50 
53 {
54  inline ControllerParameters() = default;
55  inline ControllerParameters(const ControllerParameters &) = default;
56  inline ControllerParameters(ControllerParameters &&) = default;
57  inline ControllerParameters & operator=(const ControllerParameters &) = default;
58  inline ControllerParameters & operator=(ControllerParameters &&) = default;
59 
60 #define ADD_PARAMETER(TYPE, NAME, DEFAULT) \
61  TYPE NAME##_ = DEFAULT; \
62  ControllerParameters & NAME(TYPE value) \
63  { \
64  NAME##_ = value; \
65  return *this; \
66  }
67 
70  ADD_PARAMETER(bool, load_robot_config, true)
73  ADD_PARAMETER(bool, overwrite_config, false)
75  ADD_PARAMETER(bool, load_robot_config_with_module_name, true)
77  ADD_PARAMETER(std::vector<std::string>, load_robot_config_into, {"robots"})
84  ADD_PARAMETER(std::vector<std::string>, extra_configurations, {})
85 
87  inline ControllerParameters(mc_solver::QPSolver::Backend backend) : backend_(backend) {}
88 };
89 
90 struct MCGlobalController;
91 
99 {
100  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
101  friend struct MCGlobalController;
102 
103 public:
106 
107  virtual ~MCController();
120  virtual bool run();
121 
130  virtual void createObserverPipelines(const mc_rtc::Configuration & config);
131 
152  virtual bool runObserverPipelines();
153 
160  virtual bool resetObserverPipelines();
161 
166  bool hasObserverPipeline(const std::string & name) const;
167 
169  bool hasObserverPipeline() const;
170 
175  const std::vector<mc_observers::ObserverPipeline> & observerPipelines() const;
177  std::vector<mc_observers::ObserverPipeline> & observerPipelines();
178 
184  const mc_observers::ObserverPipeline & observerPipeline(const std::string & name) const;
186  mc_observers::ObserverPipeline & observerPipeline(const std::string & name);
187 
193  const mc_observers::ObserverPipeline & observerPipeline() const;
195  mc_observers::ObserverPipeline & observerPipeline();
196 
203  bool run(mc_solver::FeedbackType fType);
204 
212  virtual void stop();
213 
229  virtual void reset(const ControllerResetData & reset_data);
230 
236  void addCollisions(const std::string & r1,
237  const std::string & r2,
238  const std::vector<mc_rbdyn::Collision> & collisions);
239 
241  bool hasCollision(const std::string & r1, const std::string & r2, const mc_rbdyn::Collision & col) const noexcept;
242 
244  bool hasCollision(const std::string & r1,
245  const std::string & r2,
246  const std::string & c1,
247  const std::string & c2) const noexcept;
248 
254  void removeCollisions(const std::string & r1,
255  const std::string & r2,
256  const std::vector<mc_rbdyn::Collision> & collisions);
257 
263  void removeCollisions(const std::string & r1, const std::string & r2);
264 
270  void addContact(const Contact & c);
271 
277  void removeContact(const Contact & c);
278 
280  void clearContacts();
281 
283  const ContactSet & contacts() const;
284 
286  bool hasContact(const Contact & c) const;
287 
289  inline bool hasRobot(const std::string & robot) const noexcept { return robots().hasRobot(robot); }
290 
294  inline const mc_rbdyn::Robots & robots() const noexcept { return solver().robots(); }
295 
297  inline mc_rbdyn::Robots & robots() noexcept { return solver().robots(); }
298 
306  inline const mc_rbdyn::Robot & robot() const noexcept { return robots().robot(); }
307 
309  inline mc_rbdyn::Robot & robot() noexcept { return robots().robot(); }
310 
316  inline const mc_rbdyn::Robot & robot(const std::string & name) const { return robots().robot(name); }
317 
319  inline mc_rbdyn::Robot & robot(const std::string & name) { return robots().robot(name); }
320 
328  inline const mc_rbdyn::Robot & env() const noexcept { return robots().env(); }
329 
331  inline mc_rbdyn::Robot & env() noexcept { return robots().env(); }
337  inline const mc_solver::QPSolver & solver() const noexcept { return *qpsolver; }
338 
340  inline mc_solver::QPSolver & solver() noexcept { return *qpsolver; }
341 
343  inline mc_rtc::Logger & logger() noexcept { return *logger_; }
344 
346  inline std::shared_ptr<mc_rtc::gui::StateBuilder> gui() const noexcept { return gui_; }
347 
349  inline mc_rtc::DataStore & datastore() noexcept { return datastore_; }
350 
352  const mc_rtc::DataStore & datastore() const noexcept { return datastore_; }
353 
361  inline const mc_rbdyn::Robots & realRobots() const noexcept { return solver().realRobots(); }
363  inline mc_rbdyn::Robots & realRobots() noexcept { return solver().realRobots(); }
364 
368  inline const mc_rbdyn::Robot & realRobot() const noexcept { return realRobots().robot(); }
370  inline mc_rbdyn::Robot & realRobot() noexcept { return realRobots().robot(); }
371 
377  inline const mc_rbdyn::Robot & realRobot(const std::string & name) const { return realRobots().robot(name); }
378 
380  inline mc_rbdyn::Robot & realRobot(const std::string & name) { return realRobots().robot(name); }
393  inline const mc_rbdyn::Robots & outputRobots() const noexcept { return *outputRobots_; }
395  inline mc_rbdyn::Robots & outputRobots() noexcept { return *outputRobots_; }
396 
400  inline const mc_rbdyn::Robot & outputRobot() const noexcept { return outputRobots_->robot(); }
402  inline mc_rbdyn::Robot & outputRobot() noexcept { return outputRobots_->robot(); }
403 
409  inline const mc_rbdyn::Robot & outputRobot(const std::string & name) const { return outputRobots_->robot(name); }
410 
412  inline mc_rbdyn::Robot & outputRobot(const std::string & name) { return outputRobots_->robot(name); }
426  inline const mc_rbdyn::Robots & outputRealRobots() const noexcept { return *outputRealRobots_; }
428  inline mc_rbdyn::Robots & outputRealRobots() noexcept { return *outputRealRobots_; }
429 
433  inline const mc_rbdyn::Robot & outputRealRobot() const noexcept { return outputRealRobots_->robot(); }
435  inline mc_rbdyn::Robot & outputRealRobot() noexcept { return outputRealRobots_->robot(); }
436 
442  inline const mc_rbdyn::Robot & outputRealRobot(const std::string & name) const
443  {
444  return outputRealRobots_->robot(name);
445  }
446 
448  inline mc_rbdyn::Robot & outputRealRobot(const std::string & name) { return outputRealRobots_->robot(name); }
461  virtual void supported_robots(std::vector<std::string> & out) const;
462 
473  mc_rbdyn::Robot & loadRobot(mc_rbdyn::RobotModulePtr rm, const std::string & name);
474 
479  void removeRobot(const std::string & name);
480 
482  mc_rtc::Configuration & config() { return config_; }
483 
485  const mc_rtc::Configuration & config() const { return config_; }
486 
495  Gripper & gripper(const std::string & robot, const std::string & gripper);
496 
500  template<typename T>
501  struct DeprecatedAnchorFrame : public std::false_type
502  {
503  };
504 
509  template<typename T = void> // void for shorter error message
510  inline void anchorFrame(const sva::PTransformd &)
511  {
512  static_assert(DeprecatedAnchorFrame<T>::value,
513  "[MC_RTC_DEPRECATED] The anchorFrame and anchorFrameReal accessors are no longer supported, please "
514  "remove calls to these functions from your code and replace it with a datastore callback. For "
515  "further information please refer to the observer's tutorial: "
516  "https://jrl-umi3218.github.io/mc_rtc/tutorials/recipes/observers.html");
517  }
518 
523  template<typename T = void> // void for shorter error message
524  inline void anchorFrameReal(const sva::PTransformd &)
525  {
526  static_assert(DeprecatedAnchorFrame<T>::value,
527  "[MC_RTC_DEPRECATED] The anchorFrame and anchorFrameReal accessors are no longer supported, please "
528  "remove calls to these functions from your code and replace it with a datastore callback. For "
529  "further information please refer to the observer's tutorial: "
530  "https://jrl-umi3218.github.io/mc_rtc/tutorials/recipes/observers.html");
531  }
536  template<typename T = void> // void for shorter error message
537  inline const sva::PTransformd & anchorFrame() const
538  {
539  static_assert(DeprecatedAnchorFrame<T>::value,
540  "[MC_RTC_DEPRECATED] The anchorFrame and anchorFrameReal accessors are no longer supported, please "
541  "remove calls to these functions from your code and replace it with a datastore callback. For "
542  "further information please refer to the observer's tutorial: "
543  "https://jrl-umi3218.github.io/mc_rtc/tutorials/recipes/observers.html");
544  return robot().posW();
545  }
546 
551  template<typename T = void> // void for shorter error message
552  inline const sva::PTransformd & anchorFrameReal() const
553  {
554  static_assert(DeprecatedAnchorFrame<T>::value,
555  "[MC_RTC_DEPRECATED] The anchorFrame and anchorFrameReal accessors are no longer supported, please "
556  "remove calls to these functions from your code and replace it with a datastore callback. For "
557  "further information please refer to the observer's tutorial: "
558  "https://jrl-umi3218.github.io/mc_rtc/tutorials/recipes/observers.html");
559  return robot().posW();
560  }
561 
562 protected:
571  MCController(std::shared_ptr<mc_rbdyn::RobotModule> robot, double dt, ControllerParameters params = {});
572 
583  MCController(std::shared_ptr<mc_rbdyn::RobotModule> robot,
584  double dt,
585  const mc_rtc::Configuration & config,
586  ControllerParameters params = {});
587 
596  MCController(const std::vector<std::shared_ptr<mc_rbdyn::RobotModule>> & robot_modules,
597  double dt,
598  ControllerParameters params = {});
599 
610  MCController(const std::vector<std::shared_ptr<mc_rbdyn::RobotModule>> & robot_modules,
611  double dt,
612  const mc_rtc::Configuration & config,
613  ControllerParameters params = {});
614 
626  const std::string & name,
627  mc_rbdyn::Robots & robots,
628  const mc_rbdyn::LoadRobotParameters & params);
629 
631  void addRobotToLog(const mc_rbdyn::Robot & robot);
632 
634  void addRobotToGUI(const mc_rbdyn::Robot & robot);
635 
637  void updateContacts();
638 
639 protected:
641  std::shared_ptr<mc_solver::QPSolver> qpsolver;
642 
651  std::vector<mc_rbdyn::RobotConverter> converters_;
652 
654  std::vector<mc_observers::ObserverPipeline> observerPipelines_;
655 
657  std::shared_ptr<mc_rtc::Logger> logger_;
659  std::shared_ptr<mc_rtc::gui::StateBuilder> gui_;
660 
663 
667 
670  std::vector<mc_solver::ConstraintSetPtr> constraints_;
671 
673  std::shared_ptr<mc_solver::ContactConstraint> contact_constraint_ = nullptr;
674 
677  std::map<std::pair<std::string, std::string>, std::shared_ptr<mc_solver::CollisionsConstraint>> collision_constraints_;
678 
684  using ContactTableDataT = std::tuple<std::string, std::string, std::string, std::string, std::string, double>;
686  std::vector<ContactTableDataT> contacts_table_;
687 
688  using duration_ms = std::chrono::duration<double, std::milli>;
690  duration_ms updateContacts_dt_{0};
691 
692 public:
694  const double timeStep;
706  std::shared_ptr<mc_tasks::PostureTask> postureTask;
707  /* Controller's name */
708  const std::string name_;
710  const std::string loading_location_;
711 
719  mc_rtc::Configuration robot_config(const std::string & robot_name) const;
720 
722  mc_rtc::Configuration robot_config(const mc_rbdyn::Robot & robot) const;
723 
730  static void set_loading_location(std::string_view location);
731 
736  static void set_name(std::string_view name);
737 };
738 
739 namespace details
740 {
741 
748 template<MCController::Backend backend, typename SolverT>
750 {
752  : MCController(robot, dt, config, backend)
753  {
754  }
755 
756  BackendSpecificController(const std::vector<mc_rbdyn::RobotModulePtr> & robots,
757  double dt,
758  const mc_rtc::Configuration & config = {},
759  ControllerParameters params = {})
760  : MCController(robots, dt, config, params.backend(backend))
761  {
762  }
763 
764  const SolverT & solver() const noexcept { return SolverT::from_solver(MCController::solver()); }
765 
766  SolverT & solver() noexcept { return SolverT::from_solver(MCController::solver()); }
767 };
768 
769 } // namespace details
770 
771 } // namespace mc_control
772 
773 #ifdef WIN32
774 # define CONTROLLER_MODULE_API __declspec(dllexport)
775 #else
776 # if __GNUC__ >= 4
777 # define CONTROLLER_MODULE_API __attribute__((visibility("default")))
778 # else
779 # define CONTROLLER_MODULE_API
780 # endif
781 #endif
mc_rtc::Configuration
Simplify access to values hold within a JSON file.
Definition: Configuration.h:165
Contact.h
mc_rbdyn::Robots
Definition: Robots.h:15
DataStore.h
KinematicsConstraint.h
mc_control::MCController::solver
const mc_solver::QPSolver & solver() const noexcept
Definition: MCController.h:337
PostureTask.h
mc_control::MCController::anchorFrameReal
const sva::PTransformd & anchorFrameReal() const
Definition: MCController.h:552
mc_control::details::BackendSpecificController::BackendSpecificController
BackendSpecificController(mc_rbdyn::RobotModulePtr robot, double dt, const mc_rtc::Configuration &config={})
Definition: MCController.h:751
mc_control::MCController::converters_
std::vector< mc_rbdyn::RobotConverter > converters_
Definition: MCController.h:651
mc_control::ControllerResetData::q
const std::vector< std::vector< double > > q
Definition: MCController.h:48
mc_control::MCController::name_
const std::string name_
Definition: MCController.h:708
mc_control::ContactSet
std::unordered_set< Contact, std::hash< Contact >, std::equal_to< Contact >, Eigen::aligned_allocator< Contact > > ContactSet
Definition: Contact.h:62
ObserverPipeline.h
Configuration.h
MC_CONTROL_DLLAPI
#define MC_CONTROL_DLLAPI
Definition: api.h:50
mc_control::details::BackendSpecificController::solver
const SolverT & solver() const noexcept
Definition: MCController.h:764
mc_control::MCController::realRobots
const mc_rbdyn::Robots & realRobots() const noexcept
Definition: MCController.h:361
mc_control::MCController::config
const mc_rtc::Configuration & config() const
Definition: MCController.h:485
ContactConstraint.h
mc_solver::QPSolver
Definition: QPSolver.h:85
mc_control::MCController::outputRobot
mc_rbdyn::Robot & outputRobot() noexcept
Definition: MCController.h:402
mc_control::MCController::robot
mc_rbdyn::Robot & robot() noexcept
Definition: MCController.h:309
mc_rtc::DataStore
Generic data store.
Definition: DataStore.h:132
mc_rbdyn::Robot
Definition: Robot.h:62
mc_rbdyn::RobotsPtr
std::shared_ptr< Robots > RobotsPtr
Definition: fwd.h:17
mc_control::details::BackendSpecificController::solver
SolverT & solver() noexcept
Definition: MCController.h:766
mc_control::ControllerParameters::ControllerParameters
ControllerParameters(mc_solver::QPSolver::Backend backend)
Definition: MCController.h:87
mc_control::MCController::anchorFrameReal
void anchorFrameReal(const sva::PTransformd &)
Definition: MCController.h:524
mc_control::ControllerParameters
Extra parameters that influence the creator construction.
Definition: MCController.h:52
mc_control::MCController::outputRealRobots
mc_rbdyn::Robots & outputRealRobots() noexcept
Definition: MCController.h:428
mc_control::MCController::outputRobot
mc_rbdyn::Robot & outputRobot(const std::string &name)
Definition: MCController.h:412
mc_control::MCController::contacts_changed_
bool contacts_changed_
Definition: MCController.h:682
mc_control::MCController::robot
mc_rbdyn::Robot & robot(const std::string &name)
Definition: MCController.h:319
mc_control::MCGlobalController
Definition: mc_global_controller.h:22
mc_control::MCController::datastore
const mc_rtc::DataStore & datastore() const noexcept
Definition: MCController.h:352
mc_control::MCController::realRobot
mc_rbdyn::Robot & realRobot() noexcept
Definition: MCController.h:370
mc_control::MCController::DeprecatedAnchorFrame
Definition: MCController.h:501
mc_control::MCController::selfCollisionConstraint
mc_rtc::unique_ptr< mc_solver::CollisionsConstraint > selfCollisionConstraint
Definition: MCController.h:702
mc_control::MCController::constraints_
std::vector< mc_solver::ConstraintSetPtr > constraints_
Definition: MCController.h:670
mc_control::MCController::outputRobots_
mc_rbdyn::RobotsPtr outputRobots_
Definition: MCController.h:648
mc_rtc::Logger
Logs controller data to disk.
Definition: Logger.h:29
mc_observers::ObserverPipeline
State observation pipeline.
Definition: ObserverPipeline.h:37
mc_control::Contact
Definition: Contact.h:25
mc_control::MCController::contacts_
ContactSet contacts_
Definition: MCController.h:680
mc_control::MCController::robots
const mc_rbdyn::Robots & robots() const noexcept
Definition: MCController.h:294
DynamicsConstraint.h
mc_control::MCController::outputRealRobot
mc_rbdyn::Robot & outputRealRobot() noexcept
Definition: MCController.h:435
mc_solver::QPSolver::Backend
Backend
Definition: QPSolver.h:90
mc_rbdyn::LoadRobotParameters
Definition: Robot.h:32
api.h
Logger.h
mc_control::MCController::compoundJointConstraint
mc_rtc::unique_ptr< mc_solver::CompoundJointConstraint > compoundJointConstraint
Definition: MCController.h:704
mc_control::MCController::outputRobots
const mc_rbdyn::Robots & outputRobots() const noexcept
Definition: MCController.h:393
mc_control::MCController::gui
std::shared_ptr< mc_rtc::gui::StateBuilder > gui() const noexcept
Definition: MCController.h:346
mc_control::MCController::postureTask
std::shared_ptr< mc_tasks::PostureTask > postureTask
Definition: MCController.h:706
Robots.h
mc_control::MCController::realRobot
const mc_rbdyn::Robot & realRobot() const noexcept
Definition: MCController.h:368
mc_control::MCController::datastore_
mc_rtc::DataStore datastore_
Definition: MCController.h:666
mc_control::MCController::outputRobot
const mc_rbdyn::Robot & outputRobot() const noexcept
Definition: MCController.h:400
mc_control::MCController::config_
mc_rtc::Configuration config_
Definition: MCController.h:662
mc_control::MCController::contactConstraint
mc_rtc::unique_ptr< mc_solver::ContactConstraint > contactConstraint
Definition: MCController.h:696
mc_control::MCController::observerPipelines_
std::vector< mc_observers::ObserverPipeline > observerPipelines_
Definition: MCController.h:654
mc_control::MCController::logger
mc_rtc::Logger & logger() noexcept
Definition: MCController.h:343
mc_control::MCController::datastore
mc_rtc::DataStore & datastore() noexcept
Definition: MCController.h:349
mc_control::MCController::qpsolver
std::shared_ptr< mc_solver::QPSolver > qpsolver
Definition: MCController.h:641
mc_control::MCController::realRobot
const mc_rbdyn::Robot & realRobot(const std::string &name) const
Definition: MCController.h:377
mc_control::MCController::outputRobots
mc_rbdyn::Robots & outputRobots() noexcept
Definition: MCController.h:395
mc_control::MCController::hasRobot
bool hasRobot(const std::string &robot) const noexcept
Definition: MCController.h:289
RobotConverter.h
unique_ptr.h
mc_rbdyn::loadRobot
MC_RBDYN_DLLAPI RobotsPtr loadRobot(const RobotModule &module, const LoadRobotParameters &params={})
mc_control::MCController::MCController
MCController(std::shared_ptr< mc_rbdyn::RobotModule > robot, double dt, ControllerParameters params={})
mc_control::MCController::solver
mc_solver::QPSolver & solver() noexcept
Definition: MCController.h:340
CollisionsConstraint.h
mc_control::details::BackendSpecificController::BackendSpecificController
BackendSpecificController(const std::vector< mc_rbdyn::RobotModulePtr > &robots, double dt, const mc_rtc::Configuration &config={}, ControllerParameters params={})
Definition: MCController.h:756
mc_control::MCController::outputRealRobots
const mc_rbdyn::Robots & outputRealRobots() const noexcept
Definition: MCController.h:426
mc_control::MCController::gui_
std::shared_ptr< mc_rtc::gui::StateBuilder > gui_
Definition: MCController.h:659
mc_control::MCController::outputRealRobot
mc_rbdyn::Robot & outputRealRobot(const std::string &name)
Definition: MCController.h:448
mc_control::MCController::anchorFrame
void anchorFrame(const sva::PTransformd &)
Definition: MCController.h:510
mc_control::MCController::anchorFrame
const sva::PTransformd & anchorFrame() const
Definition: MCController.h:537
mc_rbdyn::Robots::robots
mc_rbdyn::Robots & robots() noexcept
Definition: Robots.h:51
mc_control::MCController::kinematicsConstraint
mc_rtc::unique_ptr< mc_solver::KinematicsConstraint > kinematicsConstraint
Definition: MCController.h:700
mc_control::MCController::timeStep
const double timeStep
Definition: MCController.h:694
std
Definition: Contact.h:66
mc_control::MCController::outputRealRobots_
mc_rbdyn::RobotsPtr outputRealRobots_
Definition: MCController.h:649
mc_control::details::BackendSpecificController
Definition: MCController.h:749
mc_control::ControllerResetData
Contains information allowing the controller to start smoothly from the current state of the robot.
Definition: MCController.h:45
CompoundJointConstraint.h
mc_control::MCController::env
mc_rbdyn::Robot & env() noexcept
Definition: MCController.h:331
mc_control::MCController::duration_ms
std::chrono::duration< double, std::milli > duration_ms
Definition: MCController.h:688
mc_control::MCController::robot
const mc_rbdyn::Robot & robot() const noexcept
Definition: MCController.h:306
mc_control::MCController::outputRealRobot
const mc_rbdyn::Robot & outputRealRobot() const noexcept
Definition: MCController.h:433
mc_control::fsm::Contact
mc_control::Contact Contact
Definition: Controller.h:22
mc_control::MCController::realRobots
mc_rbdyn::Robots & realRobots() noexcept
Definition: MCController.h:363
mc_rbdyn::RobotModulePtr
std::shared_ptr< RobotModule > RobotModulePtr
Definition: RobotModule.h:629
ADD_PARAMETER
#define ADD_PARAMETER(TYPE, NAME, DEFAULT)
Definition: MCController.h:60
mc_control
Definition: CompletionCriteria.h:10
mc_solver::QPSolver::Backend::Tasks
@ Tasks
mc_control::MCController::realRobot
mc_rbdyn::Robot & realRobot(const std::string &name)
Definition: MCController.h:380
gui.h
mc_control::MCController::env
const mc_rbdyn::Robot & env() const noexcept
Definition: MCController.h:328
mc_control::Gripper
A robot's gripper reprensentation.
Definition: generic_gripper.h:34
mc_rbdyn
Definition: generic_gripper.h:14
mc_control::MCController::outputRealRobot
const mc_rbdyn::Robot & outputRealRobot(const std::string &name) const
Definition: MCController.h:442
mc_control::MCController::ContactTableDataT
std::tuple< std::string, std::string, std::string, std::string, std::string, double > ContactTableDataT
Definition: MCController.h:684
mc_control::MCController::robots
mc_rbdyn::Robots & robots() noexcept
Definition: MCController.h:297
mc_rbdyn::Collision
Definition: Collision.h:20
mc_control::MCController::outputRobot
const mc_rbdyn::Robot & outputRobot(const std::string &name) const
Definition: MCController.h:409
mc_control::MCController
MCController is the base class to implement all controllers. It assumes that at least two robots are ...
Definition: MCController.h:98
mc_control::MCController::contacts_table_
std::vector< ContactTableDataT > contacts_table_
Definition: MCController.h:686
mc_control::MCController::dynamicsConstraint
mc_rtc::unique_ptr< mc_solver::DynamicsConstraint > dynamicsConstraint
Definition: MCController.h:698
mc_control::MCController::logger_
std::shared_ptr< mc_rtc::Logger > logger_
Definition: MCController.h:657
mc_control::MCController::config
mc_rtc::Configuration & config()
Definition: MCController.h:482
mc_control::MCController::collision_constraints_
std::map< std::pair< std::string, std::string >, std::shared_ptr< mc_solver::CollisionsConstraint > > collision_constraints_
Definition: MCController.h:677
mc_control::MCController::robot
const mc_rbdyn::Robot & robot(const std::string &name) const
Definition: MCController.h:316
mc_control::MCController::loading_location_
const std::string loading_location_
Definition: MCController.h:710
mc_rtc::unique_ptr< mc_solver::ContactConstraint >
QPSolver.h