How nhorro/rover-firmware-ng works
Project type and purpose
• This is an embedded-firmware plus ground-station client system. On the device side it’s STM32CubeIDE / HAL + FreeRTOS–based firmware running on an STM32F767ZITX microcontroller to drive a 4WD rover (read sensors, compute control, drive motors, send/receive messages). On the host side it’s a set of Python clients and Jupyter notebooks (serial, UDP, ZMQ endpoints, PS4 controller interface, video pipeline) to teleoperate and monitor the rover.
File structure
• Top level
• Core: CMSIS + startup + generated HAL + FreeRTOS glue (C files, startup assembler, hal config, interrupt handlers)
• Drivers: CMSIS device headers, STM32F7xx HAL driver sources
• Middlewares: FreeRTOS sources (kernel, portable layer, heap)
• Application: C++ application logic (Inc/Src) organized into Actuators, Controllers (PID), Filters, Protocol (encoder/decoder), Sensors (LM393 tach, MPU9250), Services (CommandReceiver, MainControlLoop, TelemetrySender)
• Python: host-side code – “rover” package (endpoints, protocol definitions, tctm: telecommands/telemetry), “rovervision2” video-processing pipeline, notebooks, PS4 controller script
• Scripts: shell scripts to publish/receive video
• Documentation, configuration (STM32CubeMx .ioc), linker scripts, launch files
README for additional insights
• Firmware uses HAL for peripherals, FreeRTOS for task scheduling, and C++ for separation of application logic from HAL-generated code.
• Python notebooks and scripts talk to firmware over serial, UDP, or ZMQ and also consume video streams for live monitoring.
• Hardware pins and peripherals are defined in HardwareSetup.md; software design in SoftwareDesign.md.
Essential architectural elements
• Sensors and actuators as distinct components
• Protocol encoder/decoder as a separate block mediating between tasks and comm link
• Don’t shy away from showing multiple host-side interfaces (serial, UDP, ZMQ) and video path