Our Strategy
- Alejandra Palafox Burbano
- Apr 25, 2024
- 3 min read
Updated: May 5, 2024
In our quest to create a robot that can navigate through obstacles, detect colored golf balls, and drop them off at designated locations, our team developed a strategy that allowed us to excel in the final contest. This will provide insights into our strategy and share examples of our robot in action. One of the key elements of our strategy was the use of advanced sensors and algorithms. Our robot was equipped with a LIDAR sensor, a camera, an encoder, a gyro, and a motion tracking camera system that allowed it to detect obstacles and navigate around them with ease.
The main task was obstacle avoidance. The method we chose to incorporate was the A* algorithm. By feeding the program the known map of obstacles, it can produce a set of paths that will guide the robot to each of the designated waypoints in the shortest distance, all the while avoiding each of the obstacles. This technique requires a precise knowledge of the robot’s position. However, if the robot were to only rely on its wheel encoders and rate gyro to determine its X, Y position there would be a noticeable drift called the robot’s dead reckoned position. To correct the drift of the dead reckoned position, X, Y, and theta positions from the motion tracking camera system (OptiTrack) are used so that Kalman filter code can mix the dead reckoned data with the data from the motion tracking system. This will ignore the natural drift the robot's sensors perceive and allow more accurate movements within the course to optimize the robot's path and avoid touching walls. The motion tracking system is made up of 24 cameras throughout the room that sense the robot's location by its motion capture markers (shiny balls on top) and digitally shows the motion of the robot in a software called Motive. This data is sent to the raspberry pi that then sends it to the red board for movement control.
Color detection was another crucial aspect of our project, so we implemented a robust color detection system that allowed our robot to accurately identify the colored golf balls. This was achieved through a combination of color sensors and image processing techniques. The camera was used to detect the colors of the golf balls with the aid of OpenMV IDE. With this software, we were able to figure out how the robot saw different colors and based off of this, filter the pixels seen by the camera to only look at colors within two LAB color space thresholds: one for purple and one for orange. Once this code was downloaded onto the SD card of the camera, it became the default code so that this detection program is always run when the camera is reset at the beginning of each run. By effectively detecting the colors, our robot was able to drive towards, collect, and drop off the golf balls at the correct locations.
In terms of the implementation, we did this in three stages. First, we made the robot do general object avoidance and wall following. Then we applied all of the color detection/color-following code independent of the obstacle avoidance so that we knew how this worked while also ensuring that all our sensors were accurate and functioning. We then turned our focus to getting the robot to successfully traverse the course to all five desired positions. We tried this for different configurations of the course to verify the autonomy of the robot, and not just hard coding the path. Once this was complete, we reintroduced the color detection and golf ball collection to get complete code. We had to do some modifications to the path code once the two were combined to ensure that the path targets are not affected by the divergence of the robots during the collection of the balls.
For those interested in replicating our success, we have made the project source code available for download on our website. This will provide you with a valuable resource to understand the intricacies of our robot's design and implementation. Additionally, our website features more pictures and videos of our robot in action, allowing you to gain further insights into our strategy.

This image shows a possible setup for the course and the configurations of the obstacles (red), golf balls (orange and blue), and the "path" and desired target positions (purple).


Comments