Recent Changes - Search:

TEAMS Academy Wiki

Explore TEAMS!
for visiting sophomores & juniors

Robotics

EnvBioTech

Bat Design

Assistive Tech


Students


Instructors

TEAMS Forum

TEAMS Calendar

TEAMS Web Site

Wiki Info

edit Student.SideBar

FidlerLab5WallFollowing

Interactive Robotics Lab 5: Wall Following

Purpose

The 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 :)

My Wall Following Flowchart

Debugging My Code

To 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

  • I learned how to convert sensor readings displayed on the cricket display into actual distance readings
  • I learned how to set variables and call them in my function
  • I learned how to use both the 4-30 and 10-80 cm range distance sensors effectively
  • I learned how to rename my ports by using #define. By renaming my ports, I saved time having to type out cr8->adc_etc. Instead, I just changed the name of my ports to something short and relevant to my code

Lab Summary

My 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)

Edited Wall Follow Code


Back to My Page

Edit - History - Print - Recent Changes - Search
Page last modified on January 22, 2008, at 06:56 PM