Software Architecture & Logic
The BoxBot software stack is built with ROS2 and Python. When building our software, we prioritized development speed and expandability.
🔗 SOURCE CODE REPOSITORY
Access the full development history, libraries, and autonomous scripts here:
View on GitHubOS & ENVIRONMENT
- Raspberry Pi OS: Ubuntu 24.04, a Debian-based Linux environment.
- ROS2 Jazzy Jalisco: Robotics-focused software framework providing useful abstraction tools.
- Python 3.12: Primary language for autonomous logic and motor control.
LIBRARIES & TOOLS
- RealSense SDK: Enabling depth processing and spatial awareness for RealSense depth camera.
- pupil-apriltags: Python library used for April Tag detection and identification.
- gpiozero: Python library used for Raspberry Pi GPIO interaction.
Autonomous State Machine
Detect, Approach, Squeeze Sequence
The core firmware logic uses a Finite State Machine (FSM) to handle transitions between navigation and manipulation. This prevents mechanical stalls by ensuring the 'squeeze' only activates once the depth camera confirms payload proximity. Additionally, this allows for each state to be tested and validated individually, improving development speed.
Video 1: Testing PWM motor scaling and serial command latency.
Software Architecture
ROS Diagram
Diagram of our ROS system. Drive node handles direct GPIO interaction with motors and motor controllers. Teleoperation node captures keyboard input and sends motor commands. Computer vision node tracks state machine, processes image data, and sends motor commands. Both drive and computer vision nodes run on the Raspberry Pi, while the teleoperation node runs on on a laptop, connecting to the laptop over WiFi.
Software architecture with ROS
State Machine
Our autonomous system uses state machine logic, shown in the diagram below.
State machine