~/projects/aaqr

AAQR — Autonomous Air Quality Rover

A robot that drives a route on its own, stops at each waypoint, and measures the air. It combines ROS 2 navigation with a distributed sensor pipeline on Raspberry Pi hardware, mounted on a Roomba chassis. Built in 2023–24 across two repos, now one documented project.

ROS 2 Nav2 Python Flask SQLite Raspberry Pi

how it works

  1. Record a route. Drive the robot to each location and save its pose with a keypress. Poses are written to a YAML file per map.
  2. Navigate. Nav2 drives the robot through the saved waypoints in order.
  3. Pause and sample. At every waypoint the robot waits 5 seconds while the onboard sensor node reads the air.
  4. Stream. Readings go over HTTP as JSON to a Flask server on a second Raspberry Pi.
  5. Store and correlate. The server saves everything to a timestamped SQLite database and ties readings to the robot's physical position.

three components

navigation/

ROS 2 package on a TurtleBot4: a waypoint recorder, an autonomous navigator, and a TF2 listener that publishes the robot's position.

sensor/

A script on a Raspberry Pi Zero that reads every Enviro+ sensor, shows values on an LCD, and POSTs JSON to the server.

server/

A Flask app on a Raspberry Pi 4 that receives readings, stores them in SQLite, and serves a live dashboard.

what it measures

SensorMeasurement
BME280Temperature, pressure, humidity
PMS5003Particulate matter: PM1, PM2.5, PM10
Enviro+ gasOxidising, reducing and NH3 compounds
LTR559Proximity and ambient light
ST7735 LCDLive readout on the robot

server api

EndpointPurpose
POST /send-dataReceives sensor JSON from the Pi Zero
GET /dataLast 5 minutes of readings as JSON
GET /view-live-dataLive sensor dashboard
GET /view-timestamp-dataSensor averages per waypoint
GET /healthServer health check

waypoint file

Saved poses are plain YAML, so a route is easy to read, edit and version.

1:
  position:    {x: 1.23, y: 4.56, z: 0.0}
  orientation: {x: 0.0, y: 0.0, z: 0.707, w: 0.707}
2:
  position:    {x: 2.10, y: 1.80, z: 0.0}
  orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}
← All projects
© 2026 ayushbuilds.dev