Starting up:
Participants: Johan & Jakob
Date: 9/9-2010
Duration: 2 Hours
Goal: Attach the UltraSonic sensor to the Failbot 9797, then test the UltraSonic sensor with regard to the exercise problems.
Bodily Enhancement
The sensor rig was assembled with care and without problems much larger than not being able to easily locate the required blocks. The Failbot was provided with the program SonicSensorTest.java and placed at different distances.
We noticed a peculiar behaviour with regards to the measurements reported by the UltraSonic Sensor.
First of all, even though both object and rig remained stationary the measurements did not remain a stable value.
This might be attributed to the fact that the sensor reports the distance in centimeters and the distance might be close to the threshold between the values being reported.
Snappy Response
For the current exercise the sample rate for the UltraSonic sensor is increased to test whether the fact that a 300 ms minimum delay between samplings has been removed from the current release of LeJos.
We lowered the sample interval gradually, but did not notice any dramatic increase in the performance of the sensor.
Softcore Issues
The sensor performed very differently depending on which material we tried to bounce the ultrasonic signal off.
Clothes and other materials with sound absorbing properties gave the sensor very hard times.
Also the angle between the sensor and the objects surface ( e.g the surface of a wall ) exerted heavy influence on the results as the echoes did not return to the sensor. The sensors error also seemed very high 5-10 centimeters, which leads to the sensor being very demanding to use.
Tractor Beam ... Eh. Tracker Beam
The Failbot was gifted with the program Tracker.java and tried when running to keep a certain distance to any object in front. When no object was detected it sped full speed forward. This had the unintended effect of having it run into objects being introduced so close in front of it that the sensor reports the maximum distance.
Conclusions
The days conclusions are mostly centered around the unreliability of the ultrasonic sensor.
So far we have seen no pattern in the error of the sensor, and this could be examined further.
This blog is spawned from the Course "Embeded Systems - Embodied Agents, Digital Control in a Physical World" at the computer science institute at Aarhus University. The experiences made, and lab reports, will be made available through this blog.
Friday, 10 September 2010
Thursday, 2 September 2010
Report from labsession 1
Starting up
Participants:
Johan & Jacob
2 hours, 2nd september 2010
task: http://legolab.daimi.au.dk/DigitalControl.dir/NXT/Lesson1.dir/Lesson.html
Without any huge problems "The Failbot 9797" was built.
LeJOS was downloaded, and after having downloaded the stand-alone NXT driver from lego.com, nxjflashg, handled the firmware flashing expertly.
The first basic intelligence
Our robot started with no means of interacting with or interpreting the world, so we set out to empower it.
We downloaded the java code posted on the exercise sheet, compiled it and transferred it via bluetooth to the failbot.
The first test run on the black line was a succes. The failbot climbed steadily up the ramp, following the line nicely.
Now with our senses enable we generated the following table of light reflected by surfaces with and without the floodlight turned on:
This table clearly shows that a decent threshold value can be obtained from the average of the black and white values. It also shows that the reflected light is almost necessary to get enough variation between light and dark areas allowing us to consistently determine which type of surface we are sampling from.
Reaction times:
Having established a bunch of values and a base robot actually capable of doing something we went forward meddling with the sample frequency to determine what effect it has.
Starting with a sample interval of ~10 ms ( determined by Thread.sleep(10)),
The Failbot climbed up along the black line, without ever being close to crossing it.
Lowering the interval to 5 and 1 ms, respectively did not yield any visible alteration in the performance of The Failbot. Perhaps multiple runs should be timed to see whether the sample frequency has a negative effect when lowered.
Increasing the sample interval to 50 ms led to bigger arcs in the movement of The Failbot when following the line. The Failbot did still perform nicely with regards to stay near the line.
At 100 ms sample intervals The Failbot starts to fail. It crosses the black line without detecting it quite often, if put close to the line and quite parallel to it, it stays with the line for quite a long time though.
For a sample interval of 500 and 1000 miliseconds the robot mostly spins around, and sometimes change direction momentarily when crossing the black line coincidentally with a sample happening, this is not happening that often though.
Cluttered Minds
Now we toyed a bit with the memory part of the brain. Specifically we passed string literals to the LCD.drawString() method, and compared how much clutter this introduced to the memory to the amount of clutter when using predeclared constant strings. When the constant strings were used the amount of free memory did not change while the program was running, quite contrary to this, when string literals were used, the memory available dwindled away at quite a fast rate. This proceeded until the garbage collector ran and freed a bunch of memory, that then again started dwindling away.
This could lead to problems when working with a robot requiring real-time performance.
On such a small computer as the NXT the act of running the garbage collector might have a notable effect on the performance of the unit.
Conclusions
Perhaps more diverse results would come from testing the robot with varying sample times on both the straight line and the more winding road. As this might lead to different conditions emphasizing the strengths and weaknesses of the different sample frequencies.
Also a further experiment would be to time the runs for different sample times, and also motor speeds to find the optimum sample time to solve a given problem.
Participants:
Johan & Jacob
2 hours, 2nd september 2010
task: http://legolab.daimi.au.dk/DigitalControl.dir/NXT/Lesson1.dir/Lesson.html
Without any huge problems "The Failbot 9797" was built.
LeJOS was downloaded, and after having downloaded the stand-alone NXT driver from lego.com, nxjflashg, handled the firmware flashing expertly.
The first basic intelligence
Our robot started with no means of interacting with or interpreting the world, so we set out to empower it.
We downloaded the java code posted on the exercise sheet, compiled it and transferred it via bluetooth to the failbot.
The first test run on the black line was a succes. The failbot climbed steadily up the ramp, following the line nicely.
Now with our senses enable we generated the following table of light reflected by surfaces with and without the floodlight turned on:
| Place: | Floodlight on: | Floodlight off |
| Wooden table | 53 | 23 |
| Bordeux chair | 37 | 20 |
| Grey laminate floor | 46 | 16 |
| Whiteboard | 54 | 29 |
| Black cabinet | 32 | 15 |
| Blue laminate floor | 38 | 28 |
| Blue carpet | 34 | 27 |
| Green end zone | 35 | 26 |
This table clearly shows that a decent threshold value can be obtained from the average of the black and white values. It also shows that the reflected light is almost necessary to get enough variation between light and dark areas allowing us to consistently determine which type of surface we are sampling from.
Reaction times:
Having established a bunch of values and a base robot actually capable of doing something we went forward meddling with the sample frequency to determine what effect it has.
Starting with a sample interval of ~10 ms ( determined by Thread.sleep(10)),
The Failbot climbed up along the black line, without ever being close to crossing it.
Lowering the interval to 5 and 1 ms, respectively did not yield any visible alteration in the performance of The Failbot. Perhaps multiple runs should be timed to see whether the sample frequency has a negative effect when lowered.
Increasing the sample interval to 50 ms led to bigger arcs in the movement of The Failbot when following the line. The Failbot did still perform nicely with regards to stay near the line.
At 100 ms sample intervals The Failbot starts to fail. It crosses the black line without detecting it quite often, if put close to the line and quite parallel to it, it stays with the line for quite a long time though.
For a sample interval of 500 and 1000 miliseconds the robot mostly spins around, and sometimes change direction momentarily when crossing the black line coincidentally with a sample happening, this is not happening that often though.
Cluttered Minds
Now we toyed a bit with the memory part of the brain. Specifically we passed string literals to the LCD.drawString() method, and compared how much clutter this introduced to the memory to the amount of clutter when using predeclared constant strings. When the constant strings were used the amount of free memory did not change while the program was running, quite contrary to this, when string literals were used, the memory available dwindled away at quite a fast rate. This proceeded until the garbage collector ran and freed a bunch of memory, that then again started dwindling away.
This could lead to problems when working with a robot requiring real-time performance.
On such a small computer as the NXT the act of running the garbage collector might have a notable effect on the performance of the unit.
Conclusions
Perhaps more diverse results would come from testing the robot with varying sample times on both the straight line and the more winding road. As this might lead to different conditions emphasizing the strengths and weaknesses of the different sample frequencies.
Also a further experiment would be to time the runs for different sample times, and also motor speeds to find the optimum sample time to solve a given problem.
Welcome
Welcome to the blog of the failbot.
Here the experiences, successes and failures of our victim in the Embeded Systems course at the computer science department of Aarhus Universtity, will be shared.
What will our innocent LEGO Mindstorms NXT be put through? Only time will tell.
Follow its adventures here!
Here the experiences, successes and failures of our victim in the Embeded Systems course at the computer science department of Aarhus Universtity, will be shared.
What will our innocent LEGO Mindstorms NXT be put through? Only time will tell.
Follow its adventures here!
Subscribe to:
Posts (Atom)