In Brief
An omni-directional VEX robot that locates a pool ball using a laser distance sensor and strikes it into a pocket without user input.
Objective
The Autonomous Pool-Playing Robot was built as a group project for my final Mechatronics Project of first year. The robot was built around standard VEX components, and our goal was to push these components to the limits of their capabilities.
My group and I designed, coded and tested an omni-directional robot which could successfully locate and strike a pool ball into a pocket.
My contribution to this project was in the mechanical design of the striking mechanism and the ball detection algorithm I wrote in C++.
Ball Detection Algorithm
The ball detection algorithm was constrained by a single laser distance sensor which forced out-of-the-box thinking to be able to locate the ball. To achieve both efficiency and accuracy, I split the algorithm into two parts:
Step 1:
The robot does a rotating pass across the whole table. By using the robots current position and the dimensions of the table, the theoretical wall distance could be calculated and compared to the laser sensor data. Any large discrepancies between the theoretical and measured distance was flagged as a ball.
Step 2:
After finding the rough direction of the ball, the robot does a slower scan to detect the outer edges of the ball, from these two edges, the robot can align itself with the exact center of the ball.
Striking Mechanism
After many revisions, the final design I settled on used a scissor mechanism to ensure the front face stayed perpendicular with the forward direction.