Compass
FREEHeading compass from IMU, odometry or pose orientation
When to reach for it
Compass renders a heading from an orientation (an IMU, odometry or pose topic) or a GPS heading message. Style picks the look: a dial (the default), a heading-up dial, a tape, a number, a pixel arrow or a diamond ripple; Show Degrees and Show N/E/S/W Labels belong to the dial. 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 by default: Frame Convention starts on ENU (East-North). 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 orientation or GPS heading 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.1ENU is the ROS standard. On odometry or a pose topic, north is real only if that frame is aligned to the earth (GPS or a compass); otherwise the heading is relative to where the robot started.
Calibration 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.
Every style points at the same heading and prints it in degrees, and says No orientation when a message carries none. Dial is the default, and the only style that Show Degrees and Show N/E/S/W Labels change.