Hi.
For this issue, I am assuming that the imu data is used for trajectory building. (the following parameter is set to true in the .lua file)
TRAJECTORY_BUILDER_2D.use_imu_data = true
Now the question is, should we pass the /mobile_base/sensors/imu_data_raw topic to the flat_world_imu_node through the turtlebot.launch, or should it be the /mobile_base/sensors/imu_data topic. The main differences between imu_data_raw and imu_data topic as provided by yujinrobot/kobuki package are the angular velocities and covariance matrices. The imu_data_raw publishes non-zero angular velocity around X & Y axis and a zero covariance matrix:
orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0 orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] angular_velocity: x: 0.0274889357189 y: 0.00198531202414 z: -0.0140499004786 angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
This results in the odom frame to be tilted with respect to the map frame, which will get worse as time passes by and finally causes the cartographer to crash. It can be seen in the following picture:
However, the angular velocity around X & Y are set to zero and the covariance matrix is non-zero on the imu_data topic:
orientation: x: 0.0 y: 0.0 z: 0.0 w: 1.0 orientation_covariance: [1.7976931348623157e+308, 0.0, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 0.0, 0.05] angular_velocity: x: 0.0 y: 0.0 z: 0.0
This results in the odom frame to be flat with respect to the map frame as shown here:
Hi. For this issue, I am assuming that the imu data is used for trajectory building. (the following parameter is set to true in the .lua file)
TRAJECTORY_BUILDER_2D.use_imu_data = true
Now the question is, should we pass the
/mobile_base/sensors/imu_data_raw
topic to the flat_world_imu_node through the turtlebot.launch, or should it be the/mobile_base/sensors/imu_data
topic. The main differences between imu_data_raw and imu_data topic as provided by yujinrobot/kobuki package are the angular velocities and covariance matrices. The imu_data_raw publishes non-zero angular velocity around X & Y axis and a zero covariance matrix:orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0 orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] angular_velocity: x: 0.0274889357189 y: 0.00198531202414 z: -0.0140499004786 angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
This results in the odom frame to be tilted with respect to the map frame, which will get worse as time passes by and finally causes the cartographer to crash. It can be seen in the following picture:
However, the angular velocity around X & Y are set to zero and the covariance matrix is non-zero on the imu_data topic:
orientation: x: 0.0 y: 0.0 z: 0.0 w: 1.0 orientation_covariance: [1.7976931348623157e+308, 0.0, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 0.0, 0.05] angular_velocity: x: 0.0 y: 0.0 z: 0.0
This results in the odom frame to be flat with respect to the map frame as shown here: