|
Explore TEAMS!
|
Student /
FidlerLab5WallFollowingInteractive Robotics Lab 5: Wall Following![]() PurposeThe purpose of wall following was to experiment with the various distance sensors and see how they work and how they can be used effectively used to follow a wall and drive around various obstacles :) ![]() Debugging My CodeTo debug my code, I used various tools such as the cricket display, LEDs, and beeps. I used the cricket display to show me my actual distance readings, the LEDs to show me what's going on in my code, and beeps to signal where I am in regards to my code. As part of the debugging process, I also wrote pseudo-code to get sensor readings for whichever sensor I wanted. Lessons Learned
Lab SummaryMy original wall following code that I demoed worked fairly well. For the most part, my robot was able to follow the wall. It was also able to maneuver successfully around some of the obstacles on the course but had trouble with sharp turns. Another problem that my robot had was that it would make jerky motions when turning to get closer to the wall. Some things that I would have tried to improve my code would have been to change the turns that I made when detecting an obstacle from proportional control, to set speeds. Also, I would have changed some of the values to make my turns smoother and less jerky. A final thing that I might have done to improve my original code would have been to add bump sensors just so that when my robot hit the wall, it would turn. After my initial demo, I edited my code and added some of the things mentioned above. I added bump sensors as well as changed my proportional control to a set speed when an obstacle was detected. In theory, this code should have enable my robot to make sharper turns to get around obstacles better and essentially remove the risk of the bot hitting a wall. When I tried to run this code, however, I had some problems. Instead of doing what I expected it to do, the robot flashed red and turned 180 degrees. This could have happened due to an error in my code that I oversaw or an error with the sensors. I later learned, (from experience with the egg hunt), that the distance sensors are very sensitive, and if placed at the incorrect angle, they can pick up faulty sensor readings. Overall though, my robot was partially successful and I understand the fundamental coding needed to follow a wall as well as how to correctly use the distance sensors. Original Wall Follow Code (demoed) ![]() |