ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

robot_pose_ekf doesn't use the orientation vector in an absolute sense (it actually calculates changes in heading). The frame only relates to orientation not translation for the case of the IMU (since it's inertial). If your IMU is oriented to base link, you can just fill the frame with base link. Otherwise, publish a static tf publisher from base_link to imu_frame for how your IMU is oriented relative to your base_link. This would be the technically correct way.

However, I don't think I've seen a node that uses IMU except in the same frame as base link. So your best bet is to align your IMU with base_link so that code that doesn't transform IMU data won't negatively affect you. If you can't mount your IMU in this way, I suggest you write a simple relay node that transforms it manually into base_link on another topic that you then use with the other nodes.

click to hide/show revision 2
answering question directly

You should populate the frame_id of the sensor_msgs/IMU message with the frame in which the sensor is mounted.

robot_pose_ekf doesn't use the orientation vector in an absolute sense (it actually calculates changes in heading). The frame only relates to orientation not translation for the case of the IMU (since it's inertial). If your IMU is oriented to base link, you can just fill the frame with base link. Otherwise, publish a static tf publisher from base_link to imu_frame for how your IMU is oriented relative to your base_link. This would be the technically correct way.

However, I don't think I've seen a node that uses IMU except in the same frame as base link. So your best bet is to align your IMU with base_link so that code that doesn't transform IMU data won't negatively affect you. If you can't mount your IMU in this way, I suggest you write a simple relay node that transforms it manually into base_link on another topic that you then use with the other nodes.