lujw2 il y a 1 mois
Parent
commit
fc88144faf

+ 1 - 4
saturn_controller/include/data_interface/data_interface.hpp

@@ -21,8 +21,7 @@ public:
 class ImuInterface {
 public:
   virtual ~ImuInterface() = default;
-  virtual bool
-  getImuData(robot_control::common::MC_MOTION_IMU_DATA *imu_data) = 0;
+  virtual bool getImuData(ImuData &imu_data) = 0;
 };
 
 // 运动控制接口
@@ -53,8 +52,6 @@ public:
   virtual bool
   enterOrExitCharge(robot_control::common::CONTROL_SOURCE_MODE mode,
                     bool is_on_dock) = 0;
-  enterOrExitCharge(robot_control::common::CONTROL_SOURCE_MODE mode,
-                    bool is_on_dock) = 0;
 };
 
 // 高度调整接口

+ 21 - 1
saturn_controller/include/data_interface/data_struct.hpp

@@ -10,8 +10,28 @@ enum class CONTROL_SOURCE_MODE {
   joy_control = 2,
   uwb_control = 3
 };
-}
 
+struct Quaternion {
+  float x;
+  float y;
+  float z;
+  float w;
+};
+
+struct Coordinate {
+  float x;
+  float y;
+  float z;
+};
+
+struct ImuData {
+  Coordinate linear_acceleration;
+  Coordinate angular_velocity;
+  Coordinate magnetic_field;
+  Quaternion orientation;
+};
+
+} // namespace data_interface
 } // namespace saturn_ros2
 
 #endif // !DATA_STRUCT_HPP