In lesson 7 we have to study some examples vehicles proposed by Valentino Braitenberg in the early 1980's. Braitenburg proposed several reactive vehicles that have seemingly complex behaviours although they only consist of very simple internal structures.
Our primary interest in this lesson will be 2 vehicles, which react to light. Specificly, one will seemingly appreciate any lightsource, and try to drive closer to it, while the other will "fear" the light and drive away from it.
Theese behaviours will be accomplished by having two lightsensors at the front of our bot, that are "directly coupled" to the two motors, such that when the lightsensor experiences an increased amount of light, it will generate more power for its corresponding motor.
The trick is, that in order to get the "attraction" effect, we will crosswire the sensor and motor, such that when the right sensor senses light, it will increase the power to the left motor, hence making it go right. To Achieve the opposite effect, we will just switch the sensor/motor connection. This is a very simple matter, even though one has to remember that the input from the sensors actually has to go through our program which wil interpret the value, normalize and adapt it before the power to the motor will be set. Hence it is kind of a simulation of Braitenburg's intended vehicles.
Based on code based on the simple examples in the article from lesson 7, we build our Borg as explained. But even though it is a simple system it was not quite such an easy matter to get it to work.
One of the major problems was that the sensors reacts very poorly on light from the environment and hence it was hard to get it to do anything at all. Another problem we encountered was with the multithreading capabilities of the java framework for lego. It was not easy to actually get both sensors and motors to react in a concurrent fashion.
Theese problems resulted in the fact that we had to actually point a lightsource at one of the light sensors to get it to do anything. A lightsource on the top of the vehicle simple did not do anything for the sensors.
All this goes to show, that even though you are actually building something fundementally very simple, there are still lots of technical issues that inhibits the expected behaviour. We believe that if we had used the never NXT sensors instead of the old sensor versions we could have obtained some better results, but unfortunately theese where not available.
tirsdag den 6. november 2007
Abonner på:
Kommentarer til indlægget (Atom)
Ingen kommentarer:
Send en kommentar