How nboliv/sumorobots works
Project Type and Purpose
• This is an embedded systems/firmware project intended for programming autonomous sumo robots.
• The README indicates that the repository holds the firmware used for different robot prototypes (e.g., Bernadete and others) across annual competitions.
• The repository includes code for actual robot control logic (e.g., motor control, decisions based on sensor inputs), strategy algorithms, and a common library providing essential functionalities for sumo robots.
Analysis of the File Structure
• At the top level, you have various source files (*.c and *.h) and auxiliary files (*.bak, *.lst, *.hex, etc.). These auxiliary files (like the .hex file) point to compiled firmware images intended for the microcontroller.
• The files are grouped by their purpose:
• bernadete3kg_2017_beta related files: Likely the firmware implementation for the Bernadete robot version presented in 2017.
• strategies.* files: Likely contain algorithms or decision-making logic critical to the robot's operation during a match.
• sumo3kg_library.* files: A library module that houses shared functionalities such as sensor reading, motor control routines, communication protocols, or other utilities.
• test.* files: Test harness or module aimed at verifying individual components or overall firmware functionality.
• Auxiliary branches (like .pjt, .cof, .sym, .err, .lst) are supportive assets for project configuration, debugging, and post-compilation analysis.
a. Main Components:
• Hardware Platform: The target microcontroller and robot hardware (sensors, motors, etc.).
• Firmware Application: The central firmware that contains the robot control logic.
• Strategies Module: Contains the autonomous decision-making and tactical algorithms.
• Sumo3kg Library: Encapsulates common functionalities (hardware abstraction for sensor and actuator control, communication protocols, etc.).
• Testing Module: For validating functionalities either in simulation or actual unit/integration tests.
• Build/Deployment Artifacts: Represented by compiled outputs and configuration files (e.g., .hex file for flashing the device).
b. Relationships & Interactions:
• The Hardware Platform interfaces directly with the Firmware Application via a Hardware Abstraction Layer (HAL) embedded within the Sumo3kg Library.
• The Firmware Application serves as the orchestrator, calling core functions from the Sumo3kg Library and incorporating decision-making from the Strategies Module.
• Strategies Module feeds tactical commands into the Firmware Application, adjusting responses based on sensor inputs.
• The Test Module interacts with both the Sumo3kg Library and isolated parts of the Firmware Application to ensure reliability.
• Build/Deployment artifacts result from compiling the Firmware Application and related modules, which in turn drive the Hardware Platform.
c. Architectural Patterns & Design Principles:
• Modularity: The clear separation into modules such as strategies, libraries, and tests shows a modular design enabling isolation and reusability.
• Layered Architecture: The structure can be viewed as layers – from hardware interaction (at the bottom) to high-level control logic.
• Emphasis on maintainability: Backup (.bak) files and error/debug outputs indicate iterative development and debugging practices.
d. Underlying Technologies & Artifacts:
• C Programming: All main source codes (C and header files) indicate low-level, performance-oriented firmware development.
• Microcontroller Toolchain: The presence of .hex, .lst, and .sym files reflects the use of a firmware build process targeting embedded hardware.
• Project Configuration: Files like the .pjt and configuration outputs assist in organizing the build and deployment process.
Elements
• Clear labels for:
• Hardware Platform (sensors, actuators, microcontroller)
• Firmware Application / Main Control Loop (bernadedte3kg firmware)
• Strategies Module
• Sumo3kg Library (HAL, common utilities)
• Testing Module
• Build/Deployment Artifacts
• Data flow from hardware (inputs) to firmware, then to strategies and back out to hardware (outputs).
• Dependencies showing that the firmware calls functions from the library.
• Embedded hardware components versus software modules.
• Development/test artifacts versus production firmware.
Final Recommendations
• Be as detailed as possible – the goal is to capture every essential component and their interactions.
• Avoid overcomplicating: separating the project into its constituent modules and clearly highlighting their interactions is more beneficial than trying to cover every single backup or configuration file.