Hey all,
I think the IMU sensor has a minor bug, the units within the IMU are not coherent. The acceleration over x and y are given in cm/s/s, but the acceleration over z is in m/s/s. I feel like what is happening is that the acceleration is given in cm/s/s on all 3 axes and the gravity is added in m/s/s.
Here are some reading I get on my 2D robot using the following:
def publishIMUMessage(self):
data = self.IMUIFace.get_sensor_readings(self.imu_handle)
print(data)
self.imu_msg.header.stamp = rospy.Time.from_seconds(data[0][0])
self.imu_msg.angular_velocity.x = data[0][4]
self.imu_msg.angular_velocity.y = data[0][5]
self.imu_msg.angular_velocity.z = data[0][6]
self.imu_msg.linear_acceleration.x = data[0][1]
self.imu_msg.linear_acceleration.y = data[0][2]
self.imu_msg.linear_acceleration.z = data[0][3]
self.imu_pub.publish(self.imu_msg)
While moving: (It’s a boat it is not accelerating at 54G)
#[(time, acc_x, acc_y, acc_z, gyro_x, gyro_y, gyro_z)]
[(511.20264, 55.390423, -2.7953837, 7.194916, 0.00062335, -0.00899086, 0.00814641)]
[(511.2193, 55.03003, -2.775628, 7.9078984, 0.00102016, -0.01097006, 0.00804718)]
At rest:
#[(time, acc_x, acc_y, acc_z, gyro_x, gyro_y, gyro_z)]
[(527.7486, 0.05149575, -0.51203895, 9.797922, -2.0156001e-05, 2.3386765e-05, -0.00152975)]
[(527.76526, 0.04947602, -0.50816506, 9.795961, -1.8294593e-05, 1.8335544e-05, -0.0015141)]
Thanks,
Best,
Antoine