Skip to content

imu_data or imu_data_raw to be passed to flat_world_imu_node? #96

@sradmard

Description

@sradmard

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:
imu_data_raw

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:
imu_data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions