Back to feed
Dev.to
Dev.to
7/7/2026
Building a physical API

Building a physical API

Short summary

The author built 'sentinel,' a Rust telemetry agent that passively listens to a robot's CAN bus to capture motor state data and ships batches to a FastAPI/TimescaleDB backend for observability. Key design choices include best-effort delivery that drops samples instead of growing queues, passive monitoring that never interferes with control traffic via CAN arbitration, and an active polling mode for power-supply monitoring when motors are disengaged. The system surfaces issues like motor overheating, voltage sag, and tracking errors before they damage hardware or corrupt training data.

  • Built a Rust CAN-bus listener that captures 600 fps of motor telemetry without interfering with the control loop
  • Best-effort delivery design drops samples under load and self-reports loss counts, avoiding queue-induced system failure
  • FastAPI + TimescaleDB backend with 30-day retention provides time-series queries for detecting hardware anomalies early

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more