I have created ROS package and integrated with gazebo simulation. So also have IMU ROS driver and can check the ros topic from both side( ros package and gazebo ) correspond accordingly . So with ros2 topic list
i can check the topic list. For /robot/imu
list i would like to check the IMU outputs angles around x, y & z axis in robot coordinates. The IMU ROS driver msg file is :
std_msgs/Header header
int8 mode
bool gnss_fix
bool imu_error
bool magnetometer_pressure_error
bool gnss_error
bool gnss_heading_ins
bool gnss_compass
sensor_msgs/Imu imu
And the output of ros2 topic echo /robot/imu is
header:
stamp:
sec: 1224
nanosec: 600000000
frame_id: robot/body_imu/imu_sensor
orientation:
x: 0.0
y: 0.0
z: 0.18261382665583006
w: 0.9831847183078644
orientation_covariance:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
angular_velocity:
x: 0.0
y: 0.0
z: 1.8199688171336792e-10
angular_velocity_covariance:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
linear_acceleration:
x: 0.0
y: 0.0
z: 9.800000000000002
linear_acceleration_covariance:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
---
As can see IMU orientation is in quaternion . So my question is how to check the IMU outputs angles around x, y & z axis in robot coordinates?
Thanks