PDA

View Full Version : using a ping sonar to map rooms..



stamp_demon
05-17-2005, 03:17 PM
Hello, I was wondering if nayone had any experience with using a sonar rangefinder to map rooms. I'd love to see some code examples to study... thank you all very much _Duane

Paul Baker
05-17-2005, 11:29 PM
Are you looking for a polar plot of distances to the nearest objects from the present position of the bot or a 2D object location map?

stamp_demon
05-18-2005, 08:20 AM
I was hoping to be able to obtain a polar plot from the bots location to other objects in the room.

Paul Baker
05-19-2005, 12:20 AM
Ok that should be alot easier to do, you would keep an array of variables, you would take the distance measurment, fill in the variable corresponding to that angle, rotate, repeat until the polar plot is filled in.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

stamp_demon
05-19-2005, 10:19 AM
okay I think I can figure that out... I'll play around with it and post my code... thnax Duane