How minnnnno/inf2004_smartrobo works
INF2004 SmartRobo is embedded robot firmware integrating motion control with line/barcode navigation, terrain monitoring, obstacle avoidance, and Buddy 1 WiFi/MQTT command handling. The principal workflow routes requests through the Vehicle Controller into Buddy 2 motion control; independent safety controls can stop or invalidate commands. Startup composes and starts the application tasks, while supervision and telemetry support runtime monitoring. Relationships below follow explicit README statements and SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: line_following.c Line following · comms.c WiFi and MQTT queues · vehicle_controller.c Vehicle Controller · app_main.c Application startup
Components 25
Application control
- Application startup
app_program/app_main.c - Task startup
app_program/system/app_tasks.c - Application interfaces
app_program/app.h - Vehicle Controller
app_program/controller/vehicle_controller.c - Request and status bus
include/robot.h
Motion control
- Motion runtime
app_program/subsystem2/motion_runtime.c - Motion control
app_program/subsystem2/motion.c - Motion interfaces
include/motion.h - Motor and encoder HAL
include/motion_hal.h - Encoder capture
include/encoder_capture.h - Board configuration
include/board_config.h - Template HAL interface
app_program/subsystem2/template_hal.h
Navigation and sensing
- Line following
app_program/subsystem3/line_following.c - Line rejoin interface
app_program/subsystem3/line_rejoin.h - Route actions
app_program/subsystem3/route.h - Barcode navigation
app_program/subsystem3/barcode.c - Terrain and IMU
app_program/subsystem4/terrain_task.c - Obstacle avoidance
app_program/subsystem5/detour.c - Steering interface
include/steering.h - Subsystem interfaces
include/subsystems.h
Communications and supervision
- WiFi and MQTT queues
app_program/subsystem1/comms.c - Communications interface
app_program/subsystem1/comms.h - Telemetry frame
include/telemetry_frame.h - System supervision
app_program/system/system_runtime.c
Other components
- Operator
Connections 18
- Operator → WiFi and MQTT queues: sends commands
- WiFi and MQTT queues → Vehicle Controller: queues start/stop
- Application startup → Task startup: starts tasks
- Application startup → Vehicle Controller: composes
- Vehicle Controller → Motion runtime: submits requests
- Motion runtime → Motion control: runs motion
- Motion control → Motion interfaces: uses interface
app_program/subsystem2/motion.c - Motor and encoder HAL → Motion interfaces: uses interface
include/motion_hal.h - Line following → Route actions: runs route actions
app_program/subsystem3/line_following.c - Line following → Line rejoin interface: uses interface
app_program/subsystem3/line_following.c - Line following → Steering interface: uses steering
app_program/subsystem3/line_following.c - Line following → Template HAL interface: uses HAL
app_program/subsystem3/line_following.c - Terrain and IMU → Vehicle Controller: requests stops
- Obstacle avoidance → Line rejoin interface: uses rejoin
app_program/subsystem5/detour.c - WiFi and MQTT queues → Telemetry frame: uses frames
- WiFi and MQTT queues → Route actions: references routes
app_program/subsystem1/comms.c - Application startup → System supervision: runs supervision
- Motion runtime → Request and status bus: shares request bus