FixTheRobot Explore Robotics / Systems Engineering / Design & Selection / Module 02

Design & Selection · Module 02

Inertial and positioning: IMU, GNSS, RTK, GNSS/INS, barometer, magnetometer

Inertial sensors give fast relative motion; GNSS gives slow absolute position; barometers and magnetometers add altitude and heading. Each covers another’s weakness.

  • Intermediate
  • Module 02: Sensor Selection, Trade-offs & Integration
  • Written for ROS 2 Jazzy where ROS 2 is used
  • Sources checked 2026-11-05

Assumptions: Class-level tendencies of each sensor type, not product specifications. Ratings (good, degraded, poor) and classes (range, accuracy, rate) are coarse and exist to flag obvious mismatches; the datasheet and your own tests decide.

1. Engineering problem

An IMU measures acceleration and rotation rate at high rate, but integrating them drifts. GNSS bounds the drift with absolute position at a low rate and fails indoors or near structures. A barometer and a magnetometer add relative altitude and a heading reference, with their own interference problems. Integrated GNSS/INS units package the combination.

2. When is this needed?

  • Choosing a sensor type for a new robot, or a replacement when one fails to meet a requirement.
  • Explaining to a team why a sensor behaves differently in the field than on the bench.
  • Writing the datasheet checklist before you buy.

3. Selection and design decisions

Comparison of the sensor types in this guide
Sensor typeTypical range classAccuracy classRate classComputePowerCost
IMU (accelerometer + gyroscope)n/adecimetre classabout 100 Hz and abovevery lowvery lowlow
GNSS (multi-constellation)global (no range limit)metre classabout 10s of Hz or lessvery lowvery lowvery low
RTK GNSSglobal (no range limit)millimetre classabout 10s of Hz or lessvery lowvery lowmedium
GNSS/INS (integrated unit)global (no range limit)centimetre classabout 100 Hz and abovevery lowlowhigh
Barometer / pressure sensorn/adecimetre classabout 100 Hz and abovevery lowvery lowvery low
Magnetometern/ametre classabout 100 Hz and abovevery lowvery lowvery low
Robustness to common conditions
Sensor typedarknessdirect sunlightfog or smokerain or spraydustglass and mirrors
IMU (accelerometer + gyroscope)goodgoodgoodgoodgoodgood
GNSS (multi-constellation)goodgoodgoodgoodgoodgood
RTK GNSSgoodgoodgoodgoodgoodgood
GNSS/INS (integrated unit)goodgoodgoodgoodgoodgood
Barometer / pressure sensorgooddegradedgooddegradedgoodgood
Magnetometergoodgoodgoodgoodgoodgood

Every sensor type below follows the same 18-point template, from what it measures to the alternatives. Use the interactive Sensor Comparison Tool to compare any of them side by side.

IMU (accelerometer + gyroscope)

  1. What it measures: Linear acceleration and angular velocity (orientation is estimated, not measured directly).
  2. How it is used in robotics: a core sensor for Indoor autonomous mobile robot, Outdoor ground robot, UAV, Humanoid robot, Agricultural robot, Underwater robot; see the application guides for the role in each robot type.
  3. Practical advantages: High rate, no external dependency, works anywhere; Bridges gaps between slower sensors and enables deskewing.
  4. Practical disadvantages: Integrates noise and bias into rapid drift; Needs a heading reference (magnetometer, GNSS, vision); Sensitive to vibration and temperature.
  5. What it does better than alternatives: High-rate motion measurement with no external dependency, bridging gaps between slower sensors.
  6. What it cannot reliably measure: Position or heading without drift on its own.
  7. Conditions that degrade it: none of the six common conditions in this guide; check temperature, vibration and electromagnetic interference.
  8. Typical failure scenarios: Bias that changes with temperature; Vibration saturating or aliasing the accelerometer; Wrong axis convention or mounting transform; Timestamp offset to other sensors.
  9. Most suitable applications: Indoor autonomous mobile robot, Outdoor ground robot, UAV, Humanoid robot, Agricultural robot, Underwater robot.
  10. Datasheet specifications to check: Gyroscope and accelerometer noise density and bias instability; Range and sample rate (and internal filtering/bandwidth); Temperature behaviour; Time stamping (hardware sync input); Axis alignment and orientation convention.
  11. How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range does not measure range, best-case accuracy decimetre class, typical update rate about 100 Hz and above.
  12. Mounting and placement: Rigid, near the centre of rotation if possible; isolate from vibration; Record the exact mounting orientation and lever arm.
  13. Electrical and communication interfaces: typically SPI, I2C, UART, CAN, USB.
  14. ROS 2 integration: standard message type sensor_msgs/Imu. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
  15. Calibration and synchronisation: Bias, scale and axis alignment; noise parameters for fusion; extrinsic and time offset to camera/LiDAR. Used with camera, LiDAR, GNSS and wheel odometry.
  16. Compute, power and cost (relative): compute very low, power very low, cost low, calibration effort low. Measure bandwidth and CPU on your own platform (see the throughput guide).
  17. Validation and troubleshooting: Log a still IMU for several minutes (bias, noise), then rotate by a known angle on a turntable or by hand to a stop and compare; check axis directions.
  18. Alternative choices: Barometer / pressure sensor, Magnetometer, Wheel / joint encoder.

GNSS (multi-constellation)

  1. What it measures: Global position (and velocity) from satellite signals.
  2. How it is used in robotics: a core sensor for Outdoor ground robot, UAV, Agricultural robot; see the application guides for the role in each robot type.
  3. Practical advantages: Absolute global position, no drift; Cheap and small.
  4. Practical disadvantages: Metre-level accuracy without corrections; Unavailable indoors; degraded near buildings, canopy and under bridges (multipath); Low update rate.
  5. What it does better than alternatives: Absolute global position with no drift.
  6. What it cannot reliably measure: Work indoors, or give reliable heading while stationary.
  7. Conditions that degrade it: none of the six common conditions in this guide; check temperature, vibration and electromagnetic interference.
  8. Typical failure scenarios: Multipath near buildings causing position jumps; Antenna obstruction or poor ground plane; Jamming or spoofing; Cold-start delays.
  9. Most suitable applications: Outdoor ground robot, UAV, Agricultural robot.
  10. Datasheet specifications to check: Supported constellations and bands; Horizontal accuracy and how it is specified (CEP, with or without corrections); Update rate; Time-to-first-fix; Antenna type and connector; PPS output; Whether it reports accuracy estimates and satellite counts.
  11. How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range global (no range limit), best-case accuracy metre class, typical update rate about 10s of Hz or less.
  12. Mounting and placement: Antenna on top with a clear sky view and metal ground plane; Keep away from noisy electronics, cables and transmitters.
  13. Electrical and communication interfaces: typically UART (NMEA/UBX), USB, CAN.
  14. ROS 2 integration: standard message type sensor_msgs/NavSatFix. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
  15. Calibration and synchronisation: Antenna lever arm to the base frame; fix the datum/frame convention (ENU vs NED). GNSS + IMU is the standard outdoor pair.
  16. Compute, power and cost (relative): compute very low, power very low, cost very low, calibration effort very low. Measure bandwidth and CPU on your own platform (see the throughput guide).
  17. Validation and troubleshooting: Log a static antenna with clear sky (scatter), then repeat near a building; compare reported accuracy with the observed scatter.
  18. Alternative choices: RTK GNSS, GNSS/INS (integrated unit), UWB (ultra-wideband) ranging.

RTK GNSS

  1. What it measures: Centimetre-class global position using carrier-phase corrections from a base or network.
  2. How it is used in robotics: a core sensor for Agricultural robot; see the application guides for the role in each robot type.
  3. Practical advantages: Centimetre-level when it holds a fixed solution; Absolute and drift-free.
  4. Practical disadvantages: Needs a correction link (radio or network) and a clear sky; Falls back to float or standalone near obstructions; Higher cost and setup.
  5. What it does better than alternatives: Centimetre-class absolute position outdoors when corrections are available.
  6. What it cannot reliably measure: Hold a fixed solution under canopy, near tall structures, or without corrections.
  7. Conditions that degrade it: none of the six common conditions in this guide; check temperature, vibration and electromagnetic interference.
  8. Typical failure scenarios: Correction link dropout; Float/fixed flipping near trees and buildings; Wrong base coordinates; Multipath.
  9. Most suitable applications: Agricultural robot.
  10. Datasheet specifications to check: RTK fix accuracy and time-to-fix/convergence; Correction formats supported (e.g. RTCM); Dual-band/multi-band support; Update rate; Heading from dual antenna (if offered).
  11. How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range global (no range limit), best-case accuracy millimetre class, typical update rate about 10s of Hz or less.
  12. Mounting and placement: Same as GNSS, with better antenna quality; Plan the correction link and its antenna.
  13. Electrical and communication interfaces: typically UART, USB, CAN, Ethernet.
  14. ROS 2 integration: standard message type sensor_msgs/NavSatFix (with fix status). Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
  15. Calibration and synchronisation: Lever arm; correct base station coordinates. RTK + IMU (and LiDAR) for precision outdoor work.
  16. Compute, power and cost (relative): compute very low, power very low, cost medium, calibration effort low. Measure bandwidth and CPU on your own platform (see the throughput guide).
  17. Validation and troubleshooting: Check time to fixed solution, fixed-versus-float percentage and agreement with a surveyed point; test correction-link dropout.
  18. Alternative choices: GNSS (multi-constellation), GNSS/INS (integrated unit), UWB (ultra-wideband) ranging.

GNSS/INS (integrated unit)

  1. What it measures: Position, velocity and orientation from an integrated GNSS receiver and IMU.
  2. How it is used in robotics: see the application guides for the role in each robot type.
  3. Practical advantages: High-rate pose that bridges short GNSS outages; Turn-key estimator tuned by the vendor.
  4. Practical disadvantages: Cost; the estimator is a black box; Drifts during long outages, depending on IMU grade; Needs antenna lever-arm and alignment setup.
  5. What it does better than alternatives: High-rate continuous pose that bridges short GNSS outages.
  6. What it cannot reliably measure: Stay accurate through long GNSS outages with a low-grade IMU.
  7. Conditions that degrade it: none of the six common conditions in this guide; check temperature, vibration and electromagnetic interference.
  8. Typical failure scenarios: Poor alignment before motion; Wrong lever arm; Long outage degrading the solution unnoticed.
  9. Most suitable applications: supporting roles; see the application guides.
  10. Datasheet specifications to check: Position, velocity and heading accuracy with and without GNSS (and outage duration); IMU grade (noise, bias stability); Output rate and latency; Reported covariance/status; Dual-antenna heading option.
  11. How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range global (no range limit), best-case accuracy centimetre class, typical update rate about 100 Hz and above.
  12. Mounting and placement: Rigid to the chassis; antenna(s) with sky view; measure lever arms precisely.
  13. Electrical and communication interfaces: typically Serial, Ethernet, CAN.
  14. ROS 2 integration: standard message type sensor_msgs/NavSatFix, Imu and vendor odometry messages. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
  15. Calibration and synchronisation: Lever arms and mounting alignment; time sync via PPS. Can replace GNSS + IMU fusion; add LiDAR for GNSS-denied segments.
  16. Compute, power and cost (relative): compute very low, power low, cost high, calibration effort low. Measure bandwidth and CPU on your own platform (see the throughput guide).
  17. Validation and troubleshooting: Compare against a reference through a GNSS outage of a known length; verify lever arms and alignment.
  18. Alternative choices: GNSS (multi-constellation), RTK GNSS, UWB (ultra-wideband) ranging.

Barometer / pressure sensor

  1. What it measures: Absolute air (or water) pressure, used as relative altitude (or depth).
  2. How it is used in robotics: a core sensor for UAV; see the application guides for the role in each robot type.
  3. Practical advantages: Cheap, small, fast; good short-term relative altitude; Pressure sensors also provide depth underwater.
  4. Practical disadvantages: Weather and temperature shifts look like altitude changes; Wind, propwash and airflow disturb readings; Relative, not absolute, altitude.
  5. What it does better than alternatives: Fast, cheap relative altitude (or depth underwater).
  6. What it cannot reliably measure: Give an absolute altitude without a reference.
  7. Conditions that degrade it: direct sunlight (degraded), rain or spray (degraded).
  8. Typical failure scenarios: Propwash or HVAC pressure steps; Direct sun heating the sensor; Enclosure venting too fast or too slow.
  9. Most suitable applications: UAV.
  10. Datasheet specifications to check: Pressure range and resolution; Relative vs absolute accuracy and temperature coefficient; Output rate and noise; Port design for venting/protection.
  11. How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range does not measure range, best-case accuracy decimetre class, typical update rate about 100 Hz and above.
  12. Mounting and placement: Vented, shielded from wind and propwash and sun; foam cover for light; Away from heat sources.
  13. Electrical and communication interfaces: typically I2C, SPI.
  14. ROS 2 integration: standard message type sensor_msgs/FluidPressure. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
  15. Calibration and synchronisation: Zero at start; temperature compensation; fuse with IMU/GNSS. Barometer + IMU (+ GNSS) for UAV altitude.
  16. Compute, power and cost (relative): compute very low, power very low, cost very low, calibration effort very low. Measure bandwidth and CPU on your own platform (see the throughput guide).
  17. Validation and troubleshooting: Log pressure while still, then raise and lower by a known height; check propwash or ventilation effects.
  18. Alternative choices: IMU (accelerometer + gyroscope), Magnetometer, Wheel / joint encoder.

Magnetometer

  1. What it measures: Local magnetic field vector, used for heading relative to magnetic north.
  2. How it is used in robotics: see the application guides for the role in each robot type.
  3. Practical advantages: Absolute heading reference with no drift; Cheap and small.
  4. Practical disadvantages: Distorted by motors, wires, steel structure and batteries; Poor indoors and near ferrous material; Needs hard- and soft-iron calibration.
  5. What it does better than alternatives: A drift-free absolute heading reference.
  6. What it cannot reliably measure: Give a trustworthy heading near strong or changing magnetic fields.
  7. Conditions that degrade it: none of the six common conditions in this guide; check temperature, vibration and electromagnetic interference.
  8. Typical failure scenarios: Motor current changing the field; Mounted too close to power cables; Calibration invalid after moving it or changing payload.
  9. Most suitable applications: supporting roles; see the application guides.
  10. Datasheet specifications to check: Range and resolution; Noise; Output rate; Calibration support.
  11. How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range does not measure range, best-case accuracy metre class, typical update rate about 100 Hz and above.
  12. Mounting and placement: Far from motors, ESCs and power cables; away from steel.
  13. Electrical and communication interfaces: typically I2C, SPI.
  14. ROS 2 integration: standard message type sensor_msgs/MagneticField. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
  15. Calibration and synchronisation: Hard-iron and soft-iron calibration after final assembly; local declination. With IMU (and GNSS) for heading.
  16. Compute, power and cost (relative): compute very low, power very low, cost very low, calibration effort medium. Measure bandwidth and CPU on your own platform (see the throughput guide).
  17. Validation and troubleshooting: Rotate through a full circle and plot the field (a sphere or circle off-centre indicates hard iron); recheck after assembly.
  18. Alternative choices: IMU (accelerometer + gyroscope), Barometer / pressure sensor, Wheel / joint encoder.

4. Advantages and disadvantages

  • GNSS vs RTK: RTK gives centimetre-class position but needs a correction link and clear sky.
  • Discrete IMU + fusion vs GNSS/INS unit: a unit is turn-key and costly; a discrete IMU is flexible and needs a good estimator.
  • Magnetometer: a free heading reference outdoors and a trap near steel and motors.
  • IMU grade: a better IMU bridges longer outages but costs more.

5. Requirements and constraints

  • Antenna placement with sky view and a ground plane; lever arm to the base frame.
  • Vibration isolation for the IMU; mounting orientation recorded exactly.
  • Correction link availability for RTK.
  • Magnetic environment around the magnetometer.
  • Time stamping: PPS for GNSS, hardware sync for IMU.

6. Architecture

IMU and GNSS → estimator (EKF or factor graph) → global pose and velocity; barometer and magnetometer as optional measurements. See Modules 11 and 12 for configuration and handover.

7. Implementation

Turn the choice into a verified decision in five steps:

  1. Write the requirement as numbers: range, accuracy, rate, environment, failure case to survive.
  2. Shortlist with the Sensor Selection Calculator; read the cards’ “datasheet specifications to verify”.
  3. Read the datasheet for each shortlisted model at your operating conditions (target reflectivity, temperature, mode, interface).
  4. Check the interface, power and ROS 2 driver against the rest of the robot (the throughput and power guides).
  5. Buy one, test it against the validation step in its entry, and only then standardise.

ROS 2 inertial and positioning messages: verified facts

Message definitions read from the jazzy branch of ros2/common_interfaces on 2026-11-05.

  • sensor_msgs/Imu: acceleration in m/s² (not g) and angular velocity in rad/s. A covariance of all zeros means “covariance unknown”. If an element has no estimate (for example an IMU without orientation output), element 0 of its covariance is set to −1 and the estimate must be disregarded.
  • sensor_msgs/NavSatFix: WGS 84 ellipsoid; latitude and longitude in degrees, altitude in metres above the ellipsoid (NaN if unavailable); position_covariance in m² in East-North-Up order, with a covariance type of unknown, approximated, diagonal known or known; header frame_id is the frame of the receiver, usually the antenna location.
  • sensor_msgs/NavSatStatus: STATUS_NO_FIX −1, STATUS_FIX 0 (unaugmented), STATUS_SBAS_FIX 1, STATUS_GBAS_FIX 2; “a fix is valid when status ≥ STATUS_FIX”. The service field is a bit field (GPS 1, GLONASS 2, COMPASS/BeiDou 4, GALILEO 8).
  • sensor_msgs/MagneticField: field in tesla; NaN for axes the sensor does not report. sensor_msgs/FluidPressure: absolute pressure in pascals plus a variance (0 means unknown), and it is not for contact force sensors.
def estimate_state(cov):
    return "no estimate (cov[0] == -1)" if cov[0] == -1 else ("covariance unknown (all zero)" if not any(cov) else "usable")
print("orientation:", estimate_state([-1] + [0] * 8))
print("angular velocity:", estimate_state([0] * 9))
print("acceleration:", estimate_state([0.04, 0, 0, 0, 0.04, 0, 0, 0, 0.09]))
STATUS_FIX = 0
for s in (-1, 0, 2):
    print("NavSatStatus", s, "valid fix" if s >= STATUS_FIX else "no valid fix")

Printed (checked by the site’s tests):

orientation: no estimate (cov[0] == -1)
angular velocity: covariance unknown (all zero)
acceleration: usable
NavSatStatus -1 no valid fix
NavSatStatus 0 valid fix
NavSatStatus 2 valid fix

Reading it: a driver that has no orientation must send −1 in the first orientation covariance element, and a consumer must check for it; an all-zero covariance means unknown, not perfect; and a fix with status −1 must not be used. The covariance values are illustrative.

8. Real examples

Agricultural rover: RTK GNSS + IMU + wheel encoders for row coverage, monitoring fix quality to fall back to LiDAR.,UAV: GNSS + IMU + barometer + magnetometer on the flight controller, with isolated mounts and calibrated magnetometer.,Outdoor-to-indoor robot: GNSS until the entrance, then LiDAR-inertial (see the handover guide and tool).

9. Failure scenarios

  • IMU (accelerometer + gyroscope): Bias that changes with temperature.
  • GNSS (multi-constellation): Multipath near buildings causing position jumps.
  • RTK GNSS: Correction link dropout.
  • GNSS/INS (integrated unit): Poor alignment before motion.
  • Barometer / pressure sensor: Propwash or HVAC pressure steps.
  • Magnetometer: Motor current changing the field.

10. Troubleshooting

  1. Log the IMU while still: check bias and noise, axis directions and units.
  2. Log GNSS with clear sky and near a building: compare reported accuracy with the real scatter.
  3. Rotate the magnetometer through a circle: an off-centre or squashed plot means calibration or interference.
  4. Check time stamps and lever arms before blaming the estimator.

11. Validation

  • IMU (accelerometer + gyroscope): Log a still IMU for several minutes (bias, noise), then rotate by a known angle on a turntable or by hand to a stop and compare; check axis directions.
  • GNSS (multi-constellation): Log a static antenna with clear sky (scatter), then repeat near a building; compare reported accuracy with the observed scatter.
  • RTK GNSS: Check time to fixed solution, fixed-versus-float percentage and agreement with a surveyed point; test correction-link dropout.
  • GNSS/INS (integrated unit): Compare against a reference through a GNSS outage of a known length; verify lever arms and alignment.
  • Barometer / pressure sensor: Log pressure while still, then raise and lower by a known height; check propwash or ventilation effects.
  • Magnetometer: Rotate through a full circle and plot the field (a sphere or circle off-centre indicates hard iron); recheck after assembly.

12. Engineering checklist

13. Further references

  • Class-level guidance written from general engineering knowledge; it contains no product specifications. Product-specific numbers must come from the manufacturer’s datasheet for the exact model and operating mode.
  • ROS 2 message types: sensor_msgs (jazzy branch).
  • ROS 2 message definitions (Jazzy): ros2/common_interfaces, sensor_msgs/msg, read 2026-11-05.

Related on FixTheRobot