After building a robot that could follow a black line on a white surface, we added some functionality so that it could avoid an obstacle on the course. Here's the result. It's a little bit slow, but we managed to speed it up later, making it nearly twice as fast as it is here.
i knw d logic of avoidin obstacle,but how it can getback again d line ? will it avoid obstacle only of limited size(as shown) or of any size and can catch d line back?
cattytiger 3 years ago
Well, in theory you can make it avoid an obstacle of any reasonable size. In our case, because we had limited time to make it work, the robot is programmed to only that size obstacle. As for getting back on the line, we have it programmed to ignore the line sensors until it's done avoiding the box, and then as soon as the leftmost line sensor crosses the line, it goes back to following the line.
euphwes 3 years ago
How does it avoid obstacles?..How does it travel only in the black line?
ThiliRocks 3 years ago
It has a small sonar device at the front of it. When the sonar detects an object within a certain distance (which we can adjust). To stay on the line, we have 4 IR line sensors on the bottom. Basically, we test the input from the line sensors several times a second, and adjust the direction of the robot in an attempt to center the line underneath it.
euphwes 3 years ago