Group 6– GPS Robot Positioning System
Program an overhead camera to recognize a moving robot and map its coordinates. The coordinates will be fed to VB and then to the robot so that the robot will always have its exact position.
Currently, there is no way to track a robot’s precise position for a long period of time. The current method used, rate gyro integration, is accurate for a small amount of time (< 30 seconds) before “gyro drift” makes the position inaccurate. We propose to use an overhead camera to identify an LED placed on top of the robot. The camera will then be able to position track the robot and send those values back to visual basic. This position tracking will be much more accurate over long periods of time than rate gyro integration. Besides this we want to identify three ‘beacon lights’ to identify a field of operation for the robot. The robot can calculate the midpoint of the triangle formed by these three lights and go there.
· Camera work
o Mount an overhead camera w/ DSP board on the ceiling
o Calibrate the camera so that a pixel location can be translated into floor coordinates
o Program the camera to pick out 3 stationary “reference lights” and distinguish them from the moving light of the robot
· VB work
o Program VB to receive and the reference light and robot positions
o Program the robot to receive coordinate updates from VB
o Program the robot to receive directional commands from VB
· Robot work
o Program the robot to go to the center of the reference lights when commanded to do so
o Program the robot to update its rate gyro heading with the heading determined from the current and previous position updates
o Program the robot to recognize the position lights through IR sensors and to avoid them
The Camera: Programming the camera proved to be the most difficult task of this project. While Dan Block had already written the software to track multiple objects, this software did not provide a way to distinguish a moving object (the robot) from several stationary objects (the reference lights). This task was accomplished by constantly comparing a specific combination of the three lights to the same specific combination of the four lights (3 lights plus robot), and thus filtering out the robot light. Other adjustments had to be made to fit the program to the old board version. Originally, the camera was designed to be moved to different orientations by a servo. This would have allowed the camera to track the movements of the robot throughout the entire course. However, this would have required much more complex vision calibration algorithms. It was decided that implementing these algorithms would be too time consuming for this project and would prevent us from accomplishing other tasks in this project. After testing it shows that updating the direction through the camera is a lot slower then the angle calculated by the rate gyro. On a short court like ours, the error by the rate gyro is not big enough to make updating by the vision interesting.
The Visual Basic: The visual basic programming was straightforward, though tedious. It has to send and receive both on comm1 and comm2 to talk to the robot on the wireless and to the overhead camera-DSP through the serial port. The visual basic receives data from the overhead camera and plots the three reference lights and the robot position. The VB program is also used to send the position of the robot and the three lights to the robot. It does this by including reference characters before each data string so that the robot knows what coordinates that it is receiving. We built a function in visual basic to send the robot to a point that the user clicks on on the map in VB. This allows the robot to quickly go where one wants it. Below is a screen shot of our visual basic.
The Robot: The only adjustment being made here was the addition of an LED on top of the robot to make it recognizable for the camera. The robot receives its current coordinates and its desired coordinates from VB. From these coordinates it calculates a desired heading to drive. The robot stops when its position from VB is the same as its desired position. The robot also has a built in function to calculate the midpoint of the triangle of reference lights. The robot is programmed to go to this position when all of the switches are up. The robot is also programmed to avoid the reference lights. If one of the IR sensors sees an object, the robot will turn 90 degrees, drive straight for 1 tile, and then calculate its new heading to the desired coordinates.
Pictures and video from the presentation!
The videos were all a bit dark unfortunately enough!!!!
The code for the overhead camera
The code for the robot
The VB files for the interface