Follow a line and Object Avoidance! I need help :|


#1

Hello there!
Recently, I got a work from the school where I am studying which basically is Follow a black line and avoid objects. The fastest robot wins.
Easy, put on ultrasonic sensors on, detect black and white, detect the object, etc…
Now, make it faster. 255 speed.
Time to go to the object! Well, I programmed it to if it sees a object, turn right, continue 2 seconds, turn left, 2 seconds and then turn left and go forward until it finds a line.
Only in that manouver, I lose 10 seconds aprx. and thats alot of time.

I saw some videos online which when the sensors find an object, it turns left-right 45-90 degrees and then makes a circular path around the object until it finds a line again.
This method seems to be alot better.

Now, what I am afraid of is in case the line has a roundabout, the robot doesn’t leave in the supposed line and actually comes back. How can I fix it?

If there are other better/faster methods, I would appreciate it if told in this topic.

Kimba :slight_smile:


#2

What kind of robot?

A mbot, Codey Rockey or others?


#3

Its a mBot. Those that have a smile in the front XD.


#4

Is the route known ??

222


#5

The route is not known although I know in the middle of the route, it will have a wall 30x30 cm.

I only need to know if there is any method better than going around the wall (forward in a circle until line detected) and how can I improve the robot when turning.

Thanks!


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.