How stop16/dmu-nurinarae-smartrobot-2023 works
Project Type and Purpose
• Project Type: A hybrid system mixing high-level control/algorithms (written in Python) with low-level microcontroller firmware (Arduino .ino files). It covers both algorithm development (decision making, sensor processing) and direct hardware control (motor control, PWM, servo tests).
File Structure
• Top-Level Files (e.g., Algorithm.py, Algorithm_from_pi.py, Color_detection_v2.py, cam_test.py, etc.) indicate modules that process sensor data, run decision algorithms, and perhaps perform testing.
• Directories:
• Firmware_for_A, Firmware_for_B, Servotest – These folders contain Arduino sketches (firmware) for different microcontrollers or components of the robot.
• Test and Utility Files (e.g., color_detection_test.py, line_trace22.ino, pwm_test.py, serialtest.py, tuning.py) help verify proper functioning of both algorithm modules and hardware interface routines.
• The file tree suggests a clear separation between high-level algorithmic control (Python) and low-level hardware actuation (Arduino firmware).
README for Additional Insights
• No extra sections about configuration or detailed architecture are provided, so the file tree’s organization is our best guide.
Main Components
a. High-Level Control (Python Modules):
• Algorithm Modules: "Algorithm.py" and "Algorithm_from_pi.py" – these likely implement navigation or behavior logic.
• Test/Utility Scripts: "pwm_test.py", "serialtest.py", and "tuning.py" – Scripts for testing and fine-tuning various hardware parameters.
b. Embedded Control (Firmware / Arduino Code):
• Microcontroller Firmware:
• "Firmware_for_A/Firmware_for_A.ino" and "Firmware_for_B/Firmware_for_B.ino" – distinct firmware images for possibly different microcontrollers.
• "Servotest/Servotest.ino" – dedicated testing for servos.
• "line_trace22.ino" – likely contains code for line-following functionality.
c. Communication Mechanisms:
• There is a strong suggestion of communication links (e.g., via serial – reinforced by "serialtest.py") between the high-level Python control running on a central processor (or Raspberry Pi) and the microcontrollers running Arduino firmware.
d. Additional Elements:
a. Start by mapping out each major subsystem:
• A. Central Processing Unit (CPU):
• B. Embedded Controllers:
• C. Communication Interfaces:
• Insert a “Communication Layer” (e.g., Serial Communication) between the CPU and Embedded Controllers, denoting the flow of commands and sensor data.
• D. Sensors & Actuators (Physical Interfaces):
• Blocks for Sensors (camera, line sensor) and Actuators (motors, servos) to show that the firmware interacts with physical hardware.
b. Relationships and Interactions:
• From the High-Level Control block to the Communication Interface and then to each Embedded Controller.
• That testing/diagnostic scripts (e.g., serialtest, pwm_test) may interact with both the high-level system and hardware, serving as validation tools.
c. Design Principles and Technologies:
• Modularity: Separate high-level decision-making from low-level actuator control.
• Communication: Reliance on serial communication (as indicated by the test scripts) between different system components.
• Use of Familiar frameworks and tools: Python for algorithms; Arduino IDE environment for firmware development.
• Testing and Tuning: Indicate that there are dedicated testing modules for tuning performance (which are crucial in robotics competitions).
Specific Elements
• From sensors to processing.
• From the CPU to the microcontrollers.
• Feedback from the hardware back to the CPU.
• Another for embedded firmware.
• Additional styling for external hardware components.
Final Reminders
• Every major file group is represented, so reviewers and team members can quickly understand the relationship between software, firmware, and hardware.
• Keep annotations brief but descriptive enough so that each component’s role in the overall system is clear.