dg_blmc_robots
All Classes Files Functions Variables Pages
dgm_solo_simple_simu.hpp
1 
12 #ifndef DGM_QUADRUPED_HH
13 #define DGM_QUADRUPED_HH
14 
15 #include <dynamic_graph_manager/dynamic_graph_manager.hh>
16 
17 namespace dg_blmc_robots
18 {
22  typedef Eigen::Matrix<double, 8, 1> Vector8d;
23 
27  typedef Eigen::Matrix<double, 8, 1> Vector4d;
28 
29  class DGMQuadrupedSimu : public dynamic_graph::DynamicGraphManager
30  {
31  public:
36 
41 
46  bool is_in_safety_mode();
47 
53 
59  void get_sensors_to_map(dynamic_graph::VectorDGMap& map);
60 
66  void set_motor_controls_from_map(const dynamic_graph::VectorDGMap& map);
67 
68  private:
69 
74  Vector8d motor_torques_;
75  Vector8d motor_target_torques_;
76  Vector8d motor_encoder_indexes_;
77 
78  Vector8d joint_positions_;
79  Vector8d joint_velocities_;
80  Vector8d joint_torques_;
81  Vector8d joint_target_torques_;
82 
83  Vector4d contact_sensors_;
84  Vector4d slider_positions_;
85 
86  Vector8d motor_enabled_;
87  Vector8d motor_ready_;
88 
89  Vector4d motor_board_enabled_;
90  Vector4d motor_board_errors_;
91 
92  Vector8d ctrl_joint_torques_;
93 
94  double motors_inertia_;
95  double motors_torque_constant_;
96  double motors_gear_ratio_;
97  };
98 
99 
100 } // namespace dg_blmc_robots
101 
102 #endif // DGM_TEST_BENCH_8_MOTORS_HH
Vector8d motor_target_currents_
Entries for the simulated hardware.
Definition: dgm_solo_simple_simu.hpp:73
Definition: dgm_solo_simple_simu.hpp:29
void get_sensors_to_map(dynamic_graph::VectorDGMap &map)
get_sensors_to_map acquieres the sensors data and feed it to the input/output map ...
Definition: dgm_solo_simple_simu.cpp:55
Definition: dgm_single_motor.hpp:17
void set_motor_controls_from_map(const dynamic_graph::VectorDGMap &map)
set_motor_controls_from_map reads the input map that contains the controls and send these controls to...
Definition: dgm_solo_simple_simu.cpp:93
DGMQuadrupedSimu()
DemoSingleMotor is the constructor.
Definition: dgm_solo_simple_simu.cpp:15
void initialize_hardware_communication_process()
initialize_hardware_communication_process is the function that initialize the hardware.
Definition: dgm_solo_simple_simu.cpp:42
~DGMQuadrupedSimu()
~DemoSingleMotor is the destructor.
Definition: dgm_solo_simple_simu.cpp:38
bool is_in_safety_mode()
This function make also sure that the joint velocity do not exceed a certain value.
Definition: dgm_solo_simple_simu.cpp:49