This Wednesday was a work day for our group. We have to figure out how to program our robots to follow a black line, like in last class’s experiment, except there are going to be breaks in between the lines.
The problem was how do we get our robot (Buddy) to follow a black line with white breaks in between? Last Monday we conquered following the black line by using a light sensor, the issue now is when our robot senses the white break between the lines; it does not know where to go. The robot essentially goes different directions trying to find the black line to follow, but it always steers so far off that it goes opposite direction of where the line actually is.
We first tried to reconstruct the program to make our robot power faster so that maybe, it will just drive over the white line. That ended up being a fail, because with 100 power it still detects the white area and becomes lost. We then tried to reprogram it to just coast over the white gaps and re-detect the black line so it can follow the line again. This was a little bit more complicated because you had to know: How many seconds should it coast for? How many seconds does it take for the robot to reach each gap? Where are the curves on the track compared to the gaps? This takes a lot of time to get the precise number for every area. We also faced how far should the sensor sweep across the black line to redetect after coasting.
Solution: We are going to try the coasting method. During class we tested Buddy around the black line track and recorded how many seconds it took to reach each gap. We then measured the gap and they are all 1” long so it should only coast for a second or two. Within the NXT program, there are options and areas we can include on when and where to coast, and for how long. Each of our motors are going to coast for a certain amount of seconds then swing the sensor about 8 degrees to find the black line.
Half of us came up with a back-up plan, just in case the coasting experience is not consistent. Using a touch corrector is a little easier. With a touch corrector, when the robot reaches the white gaps we touch a button, which is connected to the robot to veer left or right when it gets off course to find the black line. The written program for the touch corrector is much more simple, because we can leave our program alone for following the black line, and just include another to veer right or left for a few seconds.

No comments:
Post a Comment