Braitenberg's Vehicles
Chandni Sanariya
Blue Cohort
1/15/08
Introduction & Summary
The purpose of the lab was to get the Create to behave like a true Braitenberg Vehicle. We had to program it so that it would act photophilic(heading towards/ likes light) or photophobic(heading away from light/fears light). It would follow the light in whichever direction where the light was brighter. So if the the left photoresistor was greater it would drive more towards the left (and the opposite is true for the right). It would just drive in the opposite direction for the photophobic mode. For each mode, the create has to be able to find the brightest/darkest area of the room and stop there. For the create to behave like a Braitenberg Vehicle, it had to use some external sensors, which in this case was the photoresistors (a left and right one so values can be compared).
Debugging Tools
LEDs were mainly used as debugging tools. The power LED color showed whether it was photophobic (red) or photophilic (green). Then the cricket display was used to display the reading from the greatest reading of the two sensors. The LEDs also showed which sensor it was that showed the greatest reading. The play would be on if it were the left sensor and the advance would be on if it were the right sensor. Beeps were not used to avoid unneccesary noise (and headaches!).
Conclusion
My code for the Braitenberg vehicle was successful. It did find the light source. Since I just had my robot move in a general direction (moving nowhere in particular) until it found a reading in one sensor that was higher than the other sensor. If it did find one that was higher then it would turn in that direction. This kind of generated a way for the Create to move about the room until it found the brightest light source, since in my code a value for the Create to stop at(which would only come from the light source) was included. This is all for the photophilic mode. For the photophobic mode, it was trickier to get the Create to stop at the darkest spot of the room, since their were many factors that affected that. The sunlight shining through the room, the shadows of people or desks all affected it. So that was something difficult to work around. When I was playing my photophilic mode, I noticed that the shadow of the light bulb caused there to be different sensor values around the light bulb. So the sensor readings just one foot away might be the ideal spot to have the Create stop. However, if it had moved any much closer than that then it would continue driving until it was in a similar position as before. This is because, as said before, the readings get smaller however much closer you get to the light bulb because of its shadow. I didn't demo the photophobic, but hypothetically it should work.
Lessons Learned
- I learned that there are often numerous ways to do one task, so we have to try different things to find the simplest one.
- I learned how to use external sensors (especially photoresistors) effectively.
- I also learned that sensors may have differences in readings, so we have to account for them when we write our code.
Flowchart & Code
- Flowchart to be attached
- Code to be attached
Attach:ChandniLab5Pic2.jpg Δ