ML-Based Rescue Robot | RoboCup International 2023 Bordeaux, France
Role: Electronics, Software and Control Systems
GitHub RepositoryProblem Statement
Build an autonomous robot capable of following a line with green markers, avoiding obstacles, traversing over ramps, speed-bumps and sew-saw. Inside the Evacuation zone, the robot’s task is to pick up the silver balls and drop them in the green safe zone and pick up the black balls and drop them in a red safe zone.
Mechanical Design Overview
- Went through 6 prototypes and finally landed on N20 motors for each wheel. Regular wheel in the front and omni-directional wheels in the back.
- Fully designed in OnShape around DFA and DFM principles.
- 3D printed parts with Acrylic chassis
- 3 servo gripper for picking up balls
- 2 containers to separate silver and black balls

Front View

Back View
My Contributions
Electronics
- Started with an Arduino Uno for the low level control, but since each motor required two interrupt pins, I switched to Teensy 4.0 since it has more hardware interrupt pins. Teensy 4.0 handled the low level motor control and sensor data processing.
- Used Raspberry Pi 4 for the ML based object detection to distribute the workload between the two processors.
- The sensor suite included a IMU - MPU6050, motor encoders (one for each wheel), i2C expander, color sensors, Time of flight sensors and IR sensors
- The robot required multiple color and time of flight sensors with same i2C address, so i used an i2C expander to communicate with each sensor independently
- Used MPU6050 for ramp detection and increase speed to avoid stalling. The IMU was also used to make accurate turns in the evacuation zone in the presence of debris.
- Used the Pi camera for Object detection
- Used Buck converters to provide the different voltage rails required by the system.
- Used limit switches to detect obstacles.
- A total of 5 servos were used for picking up the balls, separating and depositing them.

View of entire Electronics system
Control Systems
- Implemented a PD controller for each motor to maintain a constant RPM under varied conditions
- Developed a proportional ball tracking controller using the bounding box coordinates provided by the object detector. The centre of the camera frame was used as reference, allowing the robot to align itself with the ball before initiating the pickup sequence.

Silver Ball Detection
Software
- The Teensy was programmed in C++ using the Arduino IDE. The software was organized into separate functions rather than placing all functionality in a single file, improving readability and simplifying debugging.
- The Raspberry Pi 4 used Python+OpenCV+TensorFlow.
- TensorflowLite with SSD MobileNet v2 FPN-Lite 320
- Dataset contained 250 images of victims and safe zones under various lighting and exposure conditions
- Achieved over 85% accuracy in detection
- A serial communication was setup between the Teensy and the RPi4, to initiate the ML algorithm, transmit bounding box coordinates and coordinate the ball pick up and drop sequence.

Flowchart of System Architecture
Results
The robot completed all tasks inside the eight-minute limit, achieved over 85% victim detection accuracy in the evacuation zone. Our Team was one of only two teams at the competition to get every ball into its correct zone.

Final Robot