FixTheRobot Explore Robotics / Systems Engineering / Troubleshooting

Troubleshooting · Sensors

Barometer altitude fluctuates

A barometer measures air pressure at its port. Anything that changes the pressure at the port looks like a change in height.

  • Related modules: 02
  • ROS 2 Jazzy

1. Symptoms

  • Altitude oscillates by a fraction of a metre to metres while the robot is still or hovering.
  • Steps when a door closes, a fan starts or the sun hits the board.
  • Slow drift over minutes.

2. Possible causes

  • Airflow over the port: wind, propwash, a cooling fan, or a vehicle’s motion.
  • Enclosure pressure: a sealed case whose internal pressure changes with temperature or airflow.
  • Temperature changes at the sensor (sunlight, self-heating).
  • Weather: real changes in atmospheric pressure over hours.
  • Noise: unfiltered readings at a high rate.
  • Conversion error: a wrong reference pressure or a constant offset.

3. Measurements to collect

  • Pressure (Pa) over time with the robot still, with fans and motors on and off.
  • Sensor temperature.
  • Noise (standard deviation) in a still, closed room.
  • Pressure inside and outside the enclosure.

4. Diagnostic commands

Commands are not executed by the site’s automated tests (they need a ROS 2 Jazzy installation or the robot).

ros2 topic echo /pressure --field fluid_pressure
ros2 bag record /pressure /temperature

5. Step-by-step investigation

  1. Record still pressure in a calm room and compute the noise. This is the floor.
  2. Switch fans and motors and watch for steps (airflow).
  3. Warm the sensor (hand, heat source) and look for a change.
  4. Check the enclosure venting and the port position.
  5. Check the conversion: altitude from pressure needs a reference (sea-level or a ground reading at start); weather moves the reference.
  6. Filter and fuse with the IMU or GNSS instead of using it raw.

6. Corrective actions

  • Move the port away from airflow and shield it with foam or a baffle; vent the enclosure to a still region.
  • Isolate the sensor from heat sources and sunlight.
  • Low-pass filter, and fuse with the IMU vertical acceleration.
  • Re-zero at start and for relative height use differences only.
  • Compensate temperature as the datasheet specifies.

7. Validation after the fix

  • Still-air noise is within the datasheet figure.
  • No steps when fans, motors and doors change state.
  • Relative height error over a flight or run is within the requirement.

References