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

Revision history [back]

click to hide/show revision 1
initial version

What you are describing is standard behavior for the sensor_msgs/Imu orientation field - it reports the delta from the power-on orientation. The source of this orientation value is probably not the magnetometer, but that's just one reason it's not an absolute compass heading.

Your IMU may report a magnetometer output with a sensor_msgs/MagneticField msg. You can in theory convert this to a magnetic North compass reading, but you should not expect it to be very accurate. Many things in the environment will disrupt magnetic field lines.