Sensors:Exercise7:Person Following
Setup
This exercise uses the CMU Cam2+, sonar sensor, and Gumstix to track a moving person. Make sure you have completed the previous exercises using the sonar sensor and the CMU Cam2+ which contain the necessary setup instructions for the sonar and camera sensor.
Person Following
The CMU Cam2+ and sonar act in conjunction in this exercise. The CMU Cam2+ will determine the direction which the person is heading, and the sonar will measure the distance to the person. The first step is to make a colored maker that can be attached to a person or which a person can hold. Use a color that is easily detected by the camera. If you are not sure of a good color then complete Exercise 6: Color Blob Tracking.
Using the information from the CMU Cam2+, write a program to follow the blob attached to a person. Tackle this problem in steps. First make sure the robot can reliably detect the colored paper. Next, write a program to rotate the robot so that it follows the colored paper, as in the previous exercise. Finally, use the sonar sensor to determine when to move forward or backward. Tie everything together and you should have a simple person follower.
![[LOGO]](/workbook/skins/workbook/create_small2.png)



