Tuesday, 17 April 2012

Legolab - Alishan train track

Legolab 8
Date: 12-04-12 and 17-04-12
Duration: 9 hours
Group members attending: Tore, Troels & Kristian

Goal
Make a robot to complete the Alishan Train Track challenge.

Plan
1. Mount sensors on the car.
2. Come up with an idea and implement it.

Execution
1. We started with a single light sensor, hoping it was enough to follow the line. We later added a second light sensor, seen here:


2. The first idea was to use our PIDcar and a sound sensor. The plan is now to use two threads, one to drive straight and follow the line, and one to do the turns. The second thread would be activated by a clap. We took the code from last lab session and modified it to contain only two layers with the above mentioned properties. This however did not work that well, and we figured it would be cheating, so we scrapped the idea.
Next step, we have mounted two light sensors. The basic idea was to have the left sensor make the car follow the line and the right sensor detect when the 90 degree turn is reached and hardcode the turns. But hardcoding is hard, when the battery level of the NXT dictates how fast the wheels turn, and thus the time a turns takes varies. And even though the power level to both motors are the same, their speed is different.


Status
We went through a lot of ideas and constantly changed our minds. At one time we also used the ultrasonic sensor to detect when the plateau was reached and do a turn. And we had different ideas as to how the light sensors should be used.
We got the car to complete the first turn and almost the second turn once. But then something went wrong and our robot would get stuck in the top layer thread of the program, and just spin around from the beginning. We tried deleting everything on the NXT and upload the program again, it worked once and then the same error occured. We could not find any changes in the code that should cause this.
We have no more time and must accept that we can not complete the goal.

No comments:

Post a Comment