kai-dependable-robot is a Python control stack for the Robobot autonomous platform. It runs on a Raspberry Pi. Sensors and actuators sit behind an MQTT bridge.
Architecture and separation of concerns
The architecture divides robot behavior into strict layers:
- Vision: camera frames become typed ArUco marker and object detections.
- Localization: an Extended Kalman Filter (EKF) fuses odometry and marker observations into a pose estimate.
- Control: reusable low-level movement primitives (line following, driving distances, turning).
- Mission: a non-blocking state machine. Missions advance by calling
tick()on the active state, so the main loop never blocks sensor or MQTT updates.
High-level challenge logic does not issue motor commands or process raw images.
Testing and mock modes
Testing autonomy on physical hardware is slow. The repository treats dependability as a workflow problem. One control stack, explicit execution modes:
- Production: Raspberry Pi, live sensors and actuators.
- Mock Mode: developer laptop, no hardware. Simulated MQTT topics copy the robot’s data shapes, timing, and failure behavior so higher-level logic can be checked.
- Manual Mode: direct operator override for quick hardware checks.
The project relies on pytest to catch regressions in control gains, state transitions, and edge cases before the track. Offline state-logic tests save lab time and keep the loop fast.