How erol001/mobile-robotics-project works
This repository implements camera-guided navigation for a Thymio robot: camera frames yield a metric map, robot pose, obstacles, and goal; planning and waypoint following produce motion commands, with proximity-based avoidance and robot I/O closing the loop. main.py is the runtime orchestrator. The sampled source supports the service and vision internals shown; some main-loop calls and peripheral UI wiring are omitted because the excerpts are partial.
Main entry points: main.py Runtime loop · vision_service.py Vision service · planner_service.py Planner service · camera.py Camera and map warp
Components 17
Runtime orchestration
- Runtime loop
main.py - Display and trace
functions/hud.py - Run trace
functions/trace.py
Camera perception
- Vision service
services/vision_service.py - Camera and map warp
functions/vision/camera.py - AprilTag mapping
functions/vision/apriltags.py - Robot pose
functions/vision/pose.py - Obstacle geometry
functions/vision/obstacles.py - Goal detection
functions/vision/goal.py
Navigation and control
- Planner service
services/planner_service.py - Visibility graph and A*
functions/planner.py - Pose estimator
services/ekf_service.py - Waypoint controller
services/control_service.py - Local avoidance
services/local_avoidance_service.py
Robot and monitoring
- Thymio interface
functions/thymio_io.py - Kidnap monitor
services/kidnap_service.py
Other components
- Operator
Connections 18
- Operator → Runtime loop: starts run
- Runtime loop → Vision service: reads frames
- Vision service → Camera and map warp: warps frames
- Camera and map warp → AprilTag mapping: detects tags
- Vision service → Robot pose: estimates pose
- Vision service → Obstacle geometry: extracts obstacles
- Vision service → Goal detection: detects goal
- Vision service → Runtime loop: returns perception
- Runtime loop → Pose estimator: updates estimate
- Runtime loop → Planner service: requests plan
- Planner service → Visibility graph and A*: builds graph and searches
- Planner service → Runtime loop: returns path
- Runtime loop → Waypoint controller: computes motion
- Runtime loop → Local avoidance: blends avoidance
- Runtime loop → Thymio interface: reads sensors and sends motors
- Runtime loop → Kidnap monitor: checks proximity
- Runtime loop → Display and trace: renders status
- Runtime loop → Run trace: records run