How abtonmoy/wally works
Project Type and Purpose
• WALLY is a modular robotics platform combining embedded firmware (Arduino), on-board compute (Jetson Nano running Python), sensor interfaces, navigation algorithms, and security (face recognition).
• It’s neither a typical web app nor a pure library—it’s an embedded full-stack system: hardware + firmware + application software + simulation/test harness.
File-Structure Analysis
• Top-level components:
• arduino/: Firmware for Arduino Mega (motor control, sensor interfacing).
• authentication/: Python-based face-recognition and lock system.
• devices/: Python wrappers for hardware sensors (camera, GPS, LiDAR, ultrasonic, compass).
• navigation/: Core navigation algorithms (FTG, hybrid, vision-enhanced, waypoint).
• simulation/: Virtual testing of navigation.
• test_applications/: Client/server demos for remote control and calibration.
• main.py: “Mission Control” entry point that ties modules together.
• Supporting files: requirements.txt for dependencies, LICENSE, README, PDF report.
README Insights
• Hardware stack: Jetson Nano (compute), Arduino Mega (motor/sensor I/O), Polulu motors, LiDAR, GPS, camera, ultrasonic, compass, battery.
• Software stack: Python 3.7+, OpenCV, face-recognition (LBPH), FTG, hybrid nav, logging, remote client/server.
• Architecture:
• Jetson Nano runs high-level logic (navigation, authentication, data logging).
• Arduino handles low-level motor control and reads raw sensors.
• Communication via USB serial.
• Simulation layer for offline testing.
a. Main Components (Containers)
1. Hardware Layer
• Arduino Mega (firmware)
• On-board Sensors: LiDAR, GPS module, ultrasonic, digital compass, webcam
• Actuators: Polulu motors
• Power supply
2. Jetson Nano (Software Host)
• Devices module (sensor wrappers)
• Navigation module (FTG, hybrid, vision)
• Authentication module (face detection, recognition, lock system)
• Main application (mission control)
• Data storage (local logs, face templates)
3. External Interfaces
• Remote client/server (test_applications)
• User/operator (via CLI or future mobile/web UI)
• Simulation environment
b. Relationships and Interactions
• Serial link (USB) between Jetson Nano ↔ Arduino Mega
• Devices module reads sensor data → feeds navigation and authentication
• Navigation outputs motion commands → sent to Arduino → drives motors
• Authentication monitors camera feed → grants/revokes access → lock_system ops
• Logging subsystem records events (navigation state, auth attempts) to local storage
• Remote client communicates with main.py over network for telemetry/control
• Simulation harness replaces real sensors with virtual streams, interacts with navigation module
c. Architectural Patterns & Principles
• Layered architecture: Hardware interface → Devices abstraction → Domain logic (navigation/auth) → Orchestration (main.py) → External interfaces (remote, simulation)
• Modularity: Each concern (navigation, authentication, sensor I/O) is a separate Python package
• Dependency injection: high-level modules depend on abstracted device interfaces
• Separation of concerns: embedded firmware vs high-level AI/vision logic
d. Key Technologies
• Python 3.x, OpenCV, RPLidar library, serial communication (pySerial), LBPHFaceRecognizer
• Arduino C++ (Robot.ino, motor.h, bot.h)
• Jetson Nano platform