Project 2 - Create a Way-Point Traveling Robot
In addition to these features, the robot must also be able to do the following:
We decided to try and create a robot which could easily be altered for use in future projects. With that in mind, a small, front wheel, differential drive robot with a 6.25:1 gear reduction and rear castor wheel was constructed. While testing this robot, we noticed it sagged a bit in the middle due to the weight of the XBC, so two smaller tires were added underneath to help support it. A dry erase marker was also fitted down through the center of the robot so that it's path would be drawn on the white marker board.
The really tricky part is the translation of global coordinates to local coordinates. It's like telling someone that the grocery store is a mile north of your house when they are 2 miles east of you at the park. Nothing a few more equations can't fix.
In these equations, "theta" represents the angle the robot is turned with respect to the global reference point. The "X" and "Y' coordinates have a "2" after them to signify that they are the next coordinates and not the current coordinates.
Drawing shapes can be another point of confusion for some. For example, to create a circle of some given radius, each wheel must actually travel in a circle of radius plus or minus half the width of the robot. Our robot had a total width of 7.25 inches (from wheel to wheel), so to draw a circle with a radius of 10 inches, the inner wheel create a circle of radius 6.375" while the outer wheel's circle will have a radius of 13.625".
Overall, we were very happy with the project outcome. Our robot may have messed up a time or two during the demonstrations, but that is to be expected. It was out first mobile robot, and we learned a lot about how to plan what kind of decisions the robot should make - direction to rotate, speed of travel, etc. It was very interesting to see how differently every robot behaved when given the same type of commands. For example, when told to move from point A to point B, our robot would drive first in the "X" direction before rotating 90 degrees and driving in the "Y" direction. Other groups converted into polar coordinates instead of Cartesian, having their robots turn a calculated angle first, and then drive directly to point B. That way was more efficient travel but came so at a cost of more complicated programming and math.
The actual code used to control our robot was written in the "robot C" language used in the XBC. I'm not going to go over it here, because I didn't have much of anything to do with it! I built the robot and helped with the strategy, but didn't write any of the code. I do know that we used color blob tracking to find the colored objects and were actually able to determine their distance from the robot and overall coordinates using just the camera instead of using any distance sensors.
Comparing local and global coordinates and reference points can get confusing.
Our first mobile robot!
The sensors are in place.
The various circle radii.
A Quick Side Note
One "trick" I learned from working on this project was the use of a dry erase marker and white board to track the robot movements. This can be very beneficial in testing how straight your robot actually drives. It can also be a big help in testing any sort of dead reckoning abilities you be using. This is a lot easier than using a measuring tape and guessing the exact start and stop points!