GE 423: Autonomous Ball Collecting Vehicle

The goal of this project is to program our robot to autonomously navigate to five different points in their numbered sequence while avoiding obstacles. Along the way to these five points, our goal was to collect at least two of the five golf balls dispersed in the course. Once all five points have been reached and the remainder golf balls have been captured, we then deposit the orange golf balls at their designated deposit circle (chute) and the blue golf balls at their designated deposit circle (chute).

Introducing our robot ABCx... (Austin, Brandon, Chris, Xiaotian)

Here are the list of all the hardware components that make up our robot:

OMAP-L138 DSP+ARM Processor

TMS320F28335 Microcontroller

2 Pittman LO-COG DC Gearmotor

CMOS Color Camera

URG-04LX Laser Range-Finder (LADAR)

GP2Y0A21YK IR Distance sensor

MaxSonar-EZ1 Ultra Sonic Distance Sensor

HMC6352 Compass Module

2 HS-311 Standard RC Servos

Results

2nd fastest robot with runtime of 78.5 seconds! (1st place: 77.75 seconds)

Team Members

Introducing our awesome team from left to right:

Xiotian Zhang : Mechanical Engineer

Responsibiilties: Path Planning Algorithm, LabVIEW

Min Kyun (Chris) Kim : Electrical Engineer

Responsibiilties: Path Planning Algorithm, LabVIEW, Website Design

Brandon Leung : Mechanical Engineer

Responsibiilties: Ball Collection Algorithm/Mechanism

Austin Kirchner : Mechanical Engineer

Responsibiilties: Ball Collection Algorithm/Mechanism

Path Planning

To navigate from one point to the next, we implemented A* path planning algorithm. Click here to learn more in depth about A* Algorithm. First off, since there is no obstacle outside the course, we manuvered our robot such that it goes straight to point 1 and back to starting position without A* path plan. Thereafter, the robot runs A* to reach point 2, 3, 4, 5. For a given map with obstacles, A* function takes the starting position of the robot and a known end position (the coordinate of point 2, 3, 4, 5), and generates a shortest route to the destination. A* is called in two conditions: either the robot reaches a desired point or a new obstacle is detected. In both conditions, the starting point of the path is the current robot position, which is a Kalman filtered value of dead reckoning, gyro reading and motion captured data. An example of a path plan is shown as the arrows in the figure below.

Figure 1. - A* Path Planning Map Overview

Ball Collection

Mechanical Design

The top piece of the gripper is the same size as the default bumper piece that has always been attached to the car. Plastic walls were attached to the two sides along with a back wall to collect the balls into place. The entire gripper compartment is split into two sides, one for blue balls and one for orange balls. A plastic wall is mounted in the center of the compartment to separate the two compartments. A servo allows this wall to swivel back and forth in order to allow blue or orange balls in depending on which ball it sees. Another servo is mounted at the front of the gripper to open and close the door hinge. This allows the car to open its doors when it sees a ball and close once the ball is captured.

Figure 2. - Front Door Controlled by Servo
Figure 3. - Swivel Arm (Blue) that Acts as a Compartment Divider

Code and Strategy

A switch statement containing 3 cases was made to determine how the robot behaves. In the default case, which is Case 0, the robot is constantly running the Astar algorithm and avoiding walls at the same time. Inside Case 0, the robot is performing checks to see if it should move forward with capturing a blue or an orange ball. This employs the use of ColorVision algorithm to check the HSV values of the balls on the course. If the number of blue pixels meets a certain threshold value, the ball is not too close to the wall (at least 0.5 tiles away from the wall), and if the robot has enough clearance on its sides to turn, then the robot enters Case 1, which it retrieves the blue balls. The identical checks apply for Case 2 except it is for orange balls. In Case 1 and 2, the robot turns so that the centroid of the ball is aligned with the center of the robot’s camera. The robot moves forward and at a specified distance, the servo swivels to the respective ball compartment and the other servo opens the front door. The robot moves forward for a specified time just so that the robot is directly over the ball. After this period of time, the robot’s front door closes and the swivel door switches to ensure the ball is in the correct compartment. The robot defaults back to Case 0 so that it resumes Astar algorithm until the next ball is seen.

LabVIEW

Our Labview program begins by initializing communication with the robot and by drawing a grid on a new blank image. After this point, a brown boundary is placed onto the image in order to symbolize the outer edge of the track as well as two large circles that are below the grid and represent the chutes that the balls will be dropped in. After completing this initial drawing, the code begins to take in the data sent to LabVIEW from the robot. These values begin with the X and the Y coordinate of the robot where a black edged rectangle will be drawn on the image to continually display the position of the robot. The last 2 of the sent values are the flags for if there was an orange or a blue ball targeted on the course. Depending on which was seen, Labview draws either an orange or a blue circle to represent the golf ball as seen in figure 4. The remaining values in the array are used to draw any detected obstacles that are in the course as seen in figure 5.

Figure 4. - Visual Color Ball Implementation
Figure 5. - Visual Obstacle Implementation

Code

Download our Code and LabVIEW

Special Thanks to:

1) Daniel J. Block

2) Logan Matthew Courtney

For an amazing semester!