søndag den 14. oktober 2007
Update on the balancing Borg
Using normal batteries instead of the rechargeable battery seemed to produce better results when using Brian´s design and code. The Borg managed to stay upright for at least 15 seconds which is a lot better then our previous time of around 5 seconds. It seems when it starts to loose balance by a large number of degrees it will try compensate with two much power and then it usually ends up either resting on the light sensor or falling forward on its face. This just goes to show that when writing code for a balancing Borg is a very precise matter and takes a lot of time in tweaking the values to get the balance correct. But now no more work will be done on the balancing Borg. The Borg looks forwards to new adventures after the autumn break.
torsdag den 11. oktober 2007
The Borg can balance
Today we had to make the Borg balance on two wheels like a segway. We used Brian Bagnall´s example as inspiration, but since our robot was constructed differently, we needed to modify the code so that it could balance as well. Since the Borg was taller it meant that we had to speed up more when it was losing balance. We tried our design on different surfaces, like paper, carpet, table etc, and we found that it couldn't quite balance it right, so we tried to change the speed values a bit, but we still couldn't quite make it work. Our design looked like this:

We couldn't get the values quite right, so we tried to change the design to that of Brian Bagnall. His design can be found in chapter 11 of a book called "Maximum Lego NXT: Building Robots with Java Brains".
After we changed the design we found that in order to make it balance, we had to tilt it backwards a little bit. The reason for this is because the we are using the rechargeable battery while Brian was using normal batteries. The rechargeable battery extends out one lego row more then when using normal batteries. This meant that the sensor had to be placed further out then in Brian´s design. It might also be that the rechargeable battery is heavier then normal batteries. We did not check that out.
After intensive tweaking we ended up with a borg that still could not hold its balance completely - although it could wobble for 5 seconds or so before going crazy. In the end it drove off the table and ended up comitting horrible suicide in this manner. It shattered into pieces and we decided to call it a day.

We couldn't get the values quite right, so we tried to change the design to that of Brian Bagnall. His design can be found in chapter 11 of a book called "Maximum Lego NXT: Building Robots with Java Brains".
After we changed the design we found that in order to make it balance, we had to tilt it backwards a little bit. The reason for this is because the we are using the rechargeable battery while Brian was using normal batteries. The rechargeable battery extends out one lego row more then when using normal batteries. This meant that the sensor had to be placed further out then in Brian´s design. It might also be that the rechargeable battery is heavier then normal batteries. We did not check that out.
After intensive tweaking we ended up with a borg that still could not hold its balance completely - although it could wobble for 5 seconds or so before going crazy. In the end it drove off the table and ended up comitting horrible suicide in this manner. It shattered into pieces and we decided to call it a day.
søndag den 7. oktober 2007
The big Robot Race
On the 4th of October there was a big robot race. The idea was that the borg should follow a black line and then stop in the green goal zone. We used the same construction from the day before when we were working on it. We arrived at the university at 9 clock and we started immediately tweaking the software of the borg. The problem was not that it did not run too fast, more that it went too fast in the curves so that it missed the black line. So we were trying to come up with a balance of speed in both straight lanes and in curves.
The best time we got was 39.45 seconds and we could not repeat that run after that since we tried to improve the software and then the borg started to behave funny. Sometimes it refused to turn at all or missed very easy turns. So that ended up being our best time in the track.
Unfortunately there is no video to document this run since we were not expecting our best run at that point. But the borg will return next week to perform more stunts.
The best time we got was 39.45 seconds and we could not repeat that run after that since we tried to improve the software and then the borg started to behave funny. Sometimes it refused to turn at all or missed very easy turns. So that ended up being our best time in the track.
Unfortunately there is no video to document this run since we were not expecting our best run at that point. But the borg will return next week to perform more stunts.
onsdag den 3. oktober 2007
First successful run of racetrack
Today we started working on the program of the borg. The Lego design of the borg was finished. The only thing we adjusted was the distance between the two RCX light sensors. We are not using the new NXT light sensor anymore since we only have one of them. Also the light values between the RCX sensor and the NXT are not the same and we thought that the RCX sensor gave better distinction between green and black then the NXT sensor. Therefore we decided to stick with two RCX sensors.
Our main idea is that the sensors should be placed in such a way that the black line is between the two sensors. So if both sensors read white values then it should drive straight ahead. If either sensor reads black values then the borg turns into that direction until it reads a white value. This is not a very complex design but it should work well in practice.
To begin with we just used the standard move methods from the Locomotion class. The borg finished the track in around 1.30 minutes. Then we tried our own version of the move methods. There we tweaked the values and we ended up with completing the track in just over 42 seconds. So that was a vast improvement compared to the original locomotion class. Our biggest problem was that the borg could overshoot the turns if it ran too fast. That is why we had to tweak the values for the move methods. We have also noticed a little peculiarity in the behavior of the borg. It does these sudden speed increases for no apparent reason and they only last for a very short time. This is not something we have included in our program so we cannot explain why this is happening. This can have a drastic effect on our borg, especially if it happens in turns. That means the borg will overshoot the turn and miss the black line.
Tomorrow is the final day to prepare the borg for the race. We can probably tweak the values a bit more to get a better time. But only time will tell :)
Our main idea is that the sensors should be placed in such a way that the black line is between the two sensors. So if both sensors read white values then it should drive straight ahead. If either sensor reads black values then the borg turns into that direction until it reads a white value. This is not a very complex design but it should work well in practice.
To begin with we just used the standard move methods from the Locomotion class. The borg finished the track in around 1.30 minutes. Then we tried our own version of the move methods. There we tweaked the values and we ended up with completing the track in just over 42 seconds. So that was a vast improvement compared to the original locomotion class. Our biggest problem was that the borg could overshoot the turns if it ran too fast. That is why we had to tweak the values for the move methods. We have also noticed a little peculiarity in the behavior of the borg. It does these sudden speed increases for no apparent reason and they only last for a very short time. This is not something we have included in our program so we cannot explain why this is happening. This can have a drastic effect on our borg, especially if it happens in turns. That means the borg will overshoot the turn and miss the black line.
Tomorrow is the final day to prepare the borg for the race. We can probably tweak the values a bit more to get a better time. But only time will tell :)
mandag den 1. oktober 2007
Extra Sensors
Today we made some changes to the borg. We added two RCX light sensors to it so that they are placed a little bit in front of the borg. We are hoping that this will enable us to detect changes in the track earlier and that way we do not have to take as sudden turns.
Abonner på:
Opslag (Atom)