Can i
nofearsot
Posts: 25
Can I build a 2d map with the Ir sensors of my robot?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
Comments
Is it easy: no
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
This is just the top 1% of the iceberg, there are many more issues lying underneath such as sensor error, servo drift, traveling in directions other than the 4 cardinal directions, keeping exact track of servo/wheel rotation, etc. This is an advanced topic than nearly every forum member contemplates, but I have not seen anyone actually implement this. A fellow student in college used this mapping technique to navigate thier HC11 based bot through a maze, but the maze imposed sufficient constraint of the variables involved to significantly reduce the complexity, a bot moving freely in any direction does not have these constraints (unless you through programming your bot choose to artificially constraint it's movement)
And one final point, you will need to add external memory to contain the map data.
Post Edited (Paul Baker) : 6/7/2005 3:14:03 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
East/West····· North/South
7.07 m········· -7.07 m·········· first leg
-2.12 m········ -2.12 m·········· second leg
-4.00 m········ 0 m················ third leg, now add them up
0.95 m········· -9.19 m·········· is the distance from the charging station, to get back we travel the opposite direction:
-0.95 m······· 9.19 m············ recomposing this into vector format we get: sqrt((-0.95)2·+ (9.19)2) at atan(-0.95/9.19) or 9.24 meters @ 354°, assuming there was no drift nor error in measurement, traveling that vector will get you back to the recharging station. Since you cannot assume that (especially when you consider you'll be accumulating hours worth of errors in real life) you'll probably use the vector to get you near the recharging station·and some other system (such as an IR beacon) to do the final distance.
While I showed calculating all the data at once, you would actually·update the vector each time your bot changed direction so you would only maintain a single vector.
Post Edited (Paul Baker) : 6/7/2005 4:23:02 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
·· There aren't usually any ready-made programs that work with everything.· You will most likely have to do a little research and learn how to integrate code from various sources to accomplish your goals.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.geocities.com/cdrombot
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔