seed_r7_lower_controller.h
Go to the documentation of this file.
1 #ifndef _LOWER_CONTROLLER_H_
2 #define _LOWER_CONTROLLER_H_
3 
4 #include <ros/ros.h>
6 
7 
8 namespace robot_hardware
9 {
10 
12 {
13  public:
14  LowerController(const std::string& _port);
16 
17  void getPosition();
18  void sendPosition(uint16_t _time, std::vector<int16_t>& _data);
19  void remapAeroToRos(std::vector<int16_t>& _ros, std::vector<int16_t>& _aero);
20  void remapRosToAero(std::vector<int16_t>& _aero, std::vector<int16_t>& _ros);
21  void runScript(uint8_t _number, uint16_t _script);
22  void sendVelocity(std::vector<int16_t>& _data);
23  void onServo(bool _value);
24  float getBatteryVoltage();
25  std::string getFirmwareVersion();
26  void getRobotStatus(int8_t _number);
27  void checkRobotStatus();
28 
29  bool is_open_;
30  std::vector<int16_t> raw_data_;
31 
32  std::vector<std::string> upper_name_;
33  std::vector<std::string> name_;
34  std::vector<int> aero_index_;
35  std::vector<std::pair<int,std::string>> aero_table_;
36 
37  std::vector<std::string> wheel_name_;
38  std::vector<int> wheel_aero_index_;
39  std::vector<std::pair<int,std::string>> wheel_table_;
40 
41  bool comm_err_;
42  struct RobotStatus {
44  bool calib_err_;
45  bool motor_err_;
46  bool temp_err_;
47  bool res_err_;
50  bool power_err_;
51  } robot_status_;
52 
53  protected:
55  const static uint32_t BAUDRATE = 1000000;
56 
73  can1_power = 15,
74  };
75 };
76 
77 }
78 
79 #endif
std::vector< std::string > wheel_name_
std::vector< std::pair< int, std::string > > aero_table_
LowerController(const std::string &_port)
void runScript(uint8_t _number, uint16_t _script)
void remapRosToAero(std::vector< int16_t > &_aero, std::vector< int16_t > &_ros)
void sendPosition(uint16_t _time, std::vector< int16_t > &_data)
struct robot_hardware::LowerController::RobotStatus robot_status_
void remapAeroToRos(std::vector< int16_t > &_ros, std::vector< int16_t > &_aero)
void sendVelocity(std::vector< int16_t > &_data)
std::vector< std::pair< int, std::string > > wheel_table_
aero::controller::AeroCommand * lower_
std::vector< std::string > upper_name_


seed_r7_ros_controller
Author(s): Yohei Kakiuchi
autogenerated on Sun Apr 18 2021 02:40:34