As before, your robot will be placed on a flat surface, which you can assume to be empty, except for trash in the form of two-liter soda bottles. Your robot must find and remove all of the trash. You cannot assume anything about the starting location of the robot relative to the trash. However, you can assume that the closest objects will be the soda bottles.
A second, but not secondary, goal for you is to write a program that is as elegant as it is correct. Use the feedback you received on Lab 8 to guide you as you rethink your design and implementation.
The gripper does not need to be very strong -- the heaviest item it will be expected to grip is an empty soda bottle. However, it must be quite large. You will likely find it necessary to rebuild parts of your robot to fit this new mechanism onto it.
Remember that sonar will continue to be a vital component of this lab. Keep the sonar device on your robot, but be sure to mount it a reasonable distance away from the gripper. You don't want the gripper to get in the way of the sonar's "chirp."
As the robot moves toward the detected trash, it should check how far the trash appears to be. When the trash is fairly close (I found 0.5 foot to be a good distance), the robot should move just a little more and close the gripper around it. This will be a good test of how well your robot aims for the detected item.
Once the robot has gripped the item, it should move it forward a bit (the distance is up to you) and should then release it. At this point, it should wait long enough for someone to move the trash out of the way so that it can begin another search for trash.
If your trash-finding program did a good job of hitting trash head-on, then the extensions you need to write for this lab will be minimal. Therefore, you should spend a significant amount of time making your program as elegant as possible. Use the comments on Lab 8 as a guide. Please feel free to ask for clarification of my comments or for additional advice.
Is your robot able to aim at the trash well enough that the gripper can get around each item? Is it able to hold on to a bottle reasonably well?
You should turn in your program. Turn it in both electronically and on paper. Don't forget to put your name on everything submitted. It is particularly helpful if you put your name (or initials) in the name of the file you submit electronically.
This lab must be completed by Thursday, December 4 at 3:00 PM. (Note that this is the last lab period of the semester.)