Society of Robots - Robot Forum
Software => Software => Topic started by: muntean.n.a on April 26, 2010, 04:44:28 PM
-
I am having some trouble controlling a robot between two white lines. The distance between the lines is 50 cm. I was thinking of avoiding the white line with 6 sensors but I think this method is rather slow.
There is the method when to set 2 of the sensors to follow the lines and the other 4 to avoid it and so the car maybe will take softer turns, but this method is not that clear in my head.
I use an ATMega16 uC.
Please give me some ideas or an software diagram to follow because I am confused. ???
I appreciate your help.
-
I (in my limited experience) would suggest two routes. First, you could use sensors that constantly STAY over the one or two of the white lines. Then basically you would use a line following robot algorithm. Your sensor would be mounted a few inches off of the side of the bot, so the bot doesn't go over the line like a line follower would, it would simply stay to the side of the line.
Or you could use a couple sensors on each front corner of the bot. Every time the sensors detected a line, the bot would turn in the opposite direction a little bit. That way it would technically be "inside the lines".
I hope this helps.
-
I have implemented your second idea but it is a little bit slow. The main problem is that the distance between the lines differ when there appears a angle 90deg corner( there are also arc 90deg corners).
-
What happens when it reaches a sharp 90° corner?
-
There are cases when both sensors reach the line at the same time ... so the robot has no idea what to do. And the robot travels in zig-zag, this also taking a lot of time. I need a method that uses all 6 sensors and will have different curve measurement.
Thank you for your time !
-
This contest sort of looks like a maze. Except the track is more like a road, but still you have a lane where the robot has to be at all times. In a maze, the robots will follow one wall, left or right, depending on which one leads to the exit faster. In more advanced mazes, such thing is not possible, so they use a combination of methods.
So, I am saying that you could follow the left or right line and use a PID control to keep the robot's movement smooth. This way the robot will not be confused when both sensors are over the line. In each corner of the robot, install 3 sensors for line following, a bit out from the robot, so only if all sensors are past the line the robot actually starts crossing the line. This way you can decide at the contest which line you're going to follow. Those 3 sensors can be installed at an angle, so they kind of look like an arrow ( / \ ), use the outer sensor to follow the line and the top sensor to detect sharp corners.