mc_python_controller.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2019 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
8 #include <mc_control/api.h>
9 
10 namespace mc_control
11 {
12 
14 {
15  bool success;
16  std::string out;
17 };
18 
20 {
21 public:
22  MCPythonController(const std::vector<std::shared_ptr<mc_rbdyn::RobotModule>> & robots, double dt);
23 
24  virtual void reset(const ControllerResetData & reset_data) override;
25 
26  virtual bool run() override;
27 
28  std::function<bool()> run_callback;
29  std::function<void(const ControllerResetData &)> reset_callback;
30  std::function<bool()> handle_python_error;
31 
32 private:
33  bool python_failed_ = false;
34 };
35 
36 } // namespace mc_control
mc_control::MCPythonController::reset_callback
std::function< void(const ControllerResetData &)> reset_callback
Definition: mc_python_controller.h:29
MC_CONTROL_DLLAPI
#define MC_CONTROL_DLLAPI
Definition: api.h:50
mc_control::MCPythonController::run_callback
std::function< bool()> run_callback
Definition: mc_python_controller.h:28
mc_control::MCPythonController::handle_python_error
std::function< bool()> handle_python_error
Definition: mc_python_controller.h:30
mc_control::PythonRWCallback::out
std::string out
Definition: mc_python_controller.h:16
api.h
MCController.h
mc_control::PythonRWCallback
Definition: mc_python_controller.h:13
mc_control::ControllerResetData
Contains information allowing the controller to start smoothly from the current state of the robot.
Definition: MCController.h:45
mc_control::MCPythonController
Definition: mc_python_controller.h:19
mc_control
Definition: CompletionCriteria.h:10
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::PythonRWCallback::success
bool success
Definition: mc_python_controller.h:15