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.
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 /temperature5. Step-by-step investigation
- Record still pressure in a calm room and compute the noise. This is the floor.
- Switch fans and motors and watch for steps (airflow).
- Warm the sensor (hand, heat source) and look for a change.
- Check the enclosure venting and the port position.
- Check the conversion: altitude from pressure needs a reference (sea-level or a ground reading at start); weather moves the reference.
- 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
- sensor_msgs definitions (Jazzy): ros2/common_interfaces, read 2026-11-05.
FluidPressure: absolute pressure in pascals plus a variance (0 means unknown). - Related guide: inertial and positioning sensors guide.