Compass
FREEHeading compass from IMU orientation
When to reach for it
Compass renders a heading from an IMU quaternion or a GPS heading message. Use it on outdoor robots that care about absolute orientation, or anywhere a numeric yaw alone is harder to interpret than a needle. For a full pose readout, Pose Display (Pro). For attitude on an aircraft, IMU Display (Pro) has the artificial horizon.
Worked example: mavros IMU heading
Topic /mavros/imu/data, schema sensor_msgs/msg/Imu. Source Auto (detect from topic)detects the Imu schema and reads the quaternion. mavros publishes that orientation pre-rotated into ROS's ENU convention: per REP-103, 0 degrees points East, angles increase counter-clockwise. Compass applies that same convention internally by default, matching Frame Convention's own default of ENU (East-North), though the field itself only appears once Source is set to IMU Quaternion. A raw yaw taken straight off the flight controller, before mavros or a fusion node like robot_localization rotates it, usually needs NED (North-East) or Raw yaw there instead.
Watch out for
- Magnetic declination is not corrected for you. A robot that runs near magnetic structure (a steel building, a hard drive) needs Heading Offset (°) (Pro) to bring the displayed heading back to a useful reference.
- If the compass spins the wrong way during a known clockwise rotation, toggle Invert Direction (Pro) rather than rewiring the IMU axes upstream.
Configuration fields
The topic this widget reads from. While connected, tap to pick one the robot advertises.
Auto picks IMU or GPS from the topic's message type.
Dot-path to the field to read, like pose.position.x. Blank uses the message's main value.
Messages per second this widget takes from the topic. Lower saves data, higher shows more.
0.1 to 60, step 0.1Calibration offset added to the displayed heading.
-180 to 180, step 1WITH PROAlign the compass to true north or the robot's front without changing the URDF.
Reverse the rotation sense.
WITH PROFix a compass that turns backward, such as from an upside-down IMU.