diff --git a/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/Src/main.c b/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/Src/main.c index 2888d5d10..bc1163dd0 100644 --- a/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/Src/main.c +++ b/aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/Src/main.c @@ -35,8 +35,8 @@ #include #include "flashmemory/flashmemory.h" -#include "sensors/imu/imu_mpu9250.h" -#include "sensors/imu/icm_20948.h" +#include "sensors/imu/drivers/mpu9250/imu_mpu9250.h" +#include "sensors/imu/drivers/icm20948/icm_20948.h" #include "sensors/imu/imu_ros_cmd.h" #include "sensors/baro/baro_ms5611.h" #include "sensors/gps/gps_ublox.h" diff --git a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/icm_20948.cpp b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/icm20948/icm_20948.cpp similarity index 99% rename from aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/icm_20948.cpp rename to aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/icm20948/icm_20948.cpp index e40782119..3092ea202 100644 --- a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/icm_20948.cpp +++ b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/icm20948/icm_20948.cpp @@ -10,7 +10,7 @@ #error "Please define __cplusplus, because this is a c++ based file " #endif -#include "sensors/imu/icm_20948.h" +#include "sensors/imu/drivers/icm20948/icm_20948.h" void ICM20948::init(SPI_HandleTypeDef* hspi, I2C_HandleTypeDef* hi2c, ros::NodeHandle* nh, GPIO_TypeDef* spi_cs_port, uint16_t spi_cs_pin, diff --git a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/icm_20948.h b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/icm20948/icm_20948.h similarity index 99% rename from aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/icm_20948.h rename to aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/icm20948/icm_20948.h index 8b97b2c58..644d00e74 100644 --- a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/icm_20948.h +++ b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/icm20948/icm_20948.h @@ -14,7 +14,7 @@ #define __IMU_ICM_H #include "config.h" -#include "imu_mpu9250.h" +#include "sensors/imu/drivers/mpu9250/imu_mpu9250.h" #define SENSOR_DATA_LENGTH 7 diff --git a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/imu_mpu9250.cpp b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/mpu9250/imu_mpu9250.cpp similarity index 99% rename from aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/imu_mpu9250.cpp rename to aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/mpu9250/imu_mpu9250.cpp index b772aa6f5..87bc975bf 100644 --- a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/imu_mpu9250.cpp +++ b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/mpu9250/imu_mpu9250.cpp @@ -8,8 +8,7 @@ #ifndef __cplusplus #error "Please define __cplusplus, because this is a c++ based file " #endif - -#include "sensors/imu/imu_mpu9250.h" +#include "sensors/imu/drivers/mpu9250/imu_mpu9250.h" uint8_t IMUOnboard::adc_[SENSOR_DATA_LENGTH]; uint32_t IMUOnboard::last_mag_time_; diff --git a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/imu_mpu9250.h b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/mpu9250/imu_mpu9250.h similarity index 99% rename from aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/imu_mpu9250.h rename to aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/mpu9250/imu_mpu9250.h index 3c1c6577b..2e879a5cc 100644 --- a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/imu_mpu9250.h +++ b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/sensors/imu/drivers/mpu9250/imu_mpu9250.h @@ -14,7 +14,7 @@ #include "config.h" #include "math/AP_Math.h" -#include "imu_basic.h" +#include "sensors/imu/imu_basic.h" #define SENSOR_DATA_LENGTH 7 diff --git a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/altitude/altitude_estimate.h b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/altitude/altitude_estimate.h index 0789270eb..38ba2e9d1 100644 --- a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/altitude/altitude_estimate.h +++ b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/altitude/altitude_estimate.h @@ -21,7 +21,8 @@ //////////////////////////////////////// //TODO: should include the super class// //////////////////////////////////////// -#include "sensors/imu/imu_mpu9250.h" +#include "sensors/imu/drivers/mpu9250/imu_mpu9250.h" +#include "sensors/imu/drivers/icm20948/icm_20948.h" #include "sensors/baro/baro_ms5611.h" diff --git a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/attitude/attitude_estimate.h b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/attitude/attitude_estimate.h index f9cf37518..b21f029b8 100644 --- a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/attitude/attitude_estimate.h +++ b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/attitude/attitude_estimate.h @@ -30,7 +30,8 @@ #ifdef SIMULATION #include #else -#include "sensors/imu/imu_mpu9250.h" +#include "sensors/imu/drivers/mpu9250/imu_mpu9250.h" +#include "sensors/imu/drivers/icm20948/icm_20948.h" #include "sensors/gps/gps_ublox.h" #endif diff --git a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/pos/pos_estimate.h b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/pos/pos_estimate.h index bb01e80c3..0e2dc43bb 100644 --- a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/pos/pos_estimate.h +++ b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/pos/pos_estimate.h @@ -20,7 +20,8 @@ //////////////////////////////////////// //TODO: should include the super class// //////////////////////////////////////// -#include "sensors/imu/imu_mpu9250.h" +#include "sensors/imu/drivers/mpu9250/imu_mpu9250.h" +#include "sensors/imu/drivers/icm20948/icm_20948.h" #include "sensors/gps/gps_ublox.h" class PosEstimate diff --git a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/state_estimate.h b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/state_estimate.h index dffd32702..0ff14f987 100644 --- a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/state_estimate.h +++ b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/state_estimate/state_estimate.h @@ -18,7 +18,8 @@ #include /* sensors */ -#include "sensors/imu/imu_mpu9250.h" +#include "sensors/imu/drivers/mpu9250/imu_mpu9250.h" +#include "sensors/imu/drivers/icm20948/icm_20948.h" #include "sensors/baro/baro_ms5611.h" #include "sensors/gps/gps_ublox.h" #endif