Joint Level Control
motor.h
1 #ifndef MOTOR_H
2 #define MOTOR_H
3 
4 
5 #include <string>
6 #include <thread>
7 
8 #include "joint_level_control/motor/hacker.h"
9 
14 class Motor
15 {
16 public:
21  Motor(const std::string& can_name, uint8_t can_id);
22  ~Motor();
27  void setCurrent(double current);
28  int writeCAN(can_frame* frame);
29 
30 private:
31  void startAcknowldegeTask();
32  int m_error;
33 
34 private:
35  int can_socket_;
36  CurrentControl current_control_;
37  std::thread acknowledge_thread_;
38 };
39 
40 
41 #endif
This subclass generates Current-Control Messages which allow to control the motor via a current limit...
Definition: message_builder.h:52
This class abstracts the communication with the motorcontrollers (currently Hacker Herkules 5 BLDC).
Definition: motor.h:15
Motor(const std::string &can_name, uint8_t can_id)
Definition: motor.cpp:17
void setCurrent(double current)
Definition: motor.cpp:61