Society of Robots - Robot Forum

Software => Software => Topic started by: toocool on November 18, 2008, 12:47:17 PM

Title: wavefront algorithm with sonar sensors?
Post by: toocool on November 18, 2008, 12:47:17 PM
hi.i am a beginner to robotics.i want to make an obstacle avoiding robot.i went through the wavefront tutorial available in this site.now as i want to use sonar range finders in my robot..is it possible to use the same wavefront algorithm by feeding it data from sonar range finders?
Title: Re: wavefront algorithm with sonar sensors?
Post by: pomprocker on November 18, 2008, 03:52:24 PM
you would do yourself a favor and make things easier by adding shaft encoders and maybe a compass
Title: Re: wavefront algorithm with sonar sensors?
Post by: SciTech02 on November 20, 2008, 03:13:48 PM
Technically, yes: any sensor data can be used to construct a map.  However, if you want an accurate map, you need accurate sensors.  If you read Admin's tutorials on sonar and IR sensors, you'll notice that the sonar works better as a "bump" sensor, because its detection area is a large bubble, whereas the Sharp IR sensor is more of a line.  Using IR sensors, you can get a more accurate map reading.  However, this is all theoretical, I've seen SLAM algorithms (algorithms that create a map and figure out where they are at the same time) that use only two sonar sensors. 

If your trying something simpler, such as using a pre-created map of a room, house etc, you don't have to update the map very much, if at all.  You could implement what is called 3-point turning (I think that's what it's called): if an obstacle is detected, the robot would go around it and return to its original path like the obstacle never existed.  So, you could create a general map and send the robot to a location on that map.  If an obstacle is detected that the map didn't show as a blocked cell, just go around it and continue on its original path, don't worry about updating the map.  This type of obstacle avoidance can be done with a single sonar sensor on a servo, so it's the easiest way.

I agree with pomprocker on getting encoders, they are a must-have for path finding and mapping projects.