Arduino Robot Waypointing

I have a question:

Does anyone know how to do really simple GPS waypointing?
I'm trying to build a robot, and I want to include GPS.

I already looked through the code for the ArduPilot, but it's really confusing and has very few and vague comments.

There's a really old forum post covering this, but the websites don't exist anymore. Post:http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1197693328

what scale? obstacles included?

I was recently jotting down some ideas for simple GPS navigation, and I planned to do it based on a "direction + deviation" system - sort of like, you tell the entity where to go, and how far it is, and based on its movement, it updates its current position relative to the waypoint until it gets there...

if there is some sort of obstacle, then the entity should know how to get around the object, while, at the same time, keeping in mind the direction it should continue to go in once the obstacle is overcome, this way the entity will always stay on its path, one way or the other...

perhaps its a bad explanation, its like 3 am here, so if you want a more accurate response, let me know (it should also get me thinking on how i will write up my own routing system which i have been planning to do)

I kind-of-sorta understand your explanation, but I get the gist of it. ;D

Can you elaborate, though?

BTW:

I had thought of something kind like your idea:
Program in the waypoint(s)
Boot-up and check location
Orient towards waypoint.
Begin travel.
Use some sort of ultrasonic or infra-red sensor to detect objects.
If an object is in the way, turn left or right (depending) and travel until the obstruction is no longer in the way.
Turn back towards the waypoint, and travel again.

Basically your outline is correct... ofcourse there is also the question of is this on a 2d plain or 3d space (are you doing this on land or is this an aerial type project)...

more specifically, I would utilize a gyro and perhaps some encoders on the wheels (although, i am not sure if that would be as easy as i think)... you give the robot an angle, say 45 degrees.... and as the robot orients itself towards the object, the 45 degrees should go down to 0 - aka, the robot is pointed directly towards the waypoint.... every time the robot needs to turn for whatever reason, this degree value (i call it degree of deviation) increases (or decreases) accordingly....

not to confuse you, so like i said, the outline u wrote up is generally correct....

The robot is land bases, btw.

I've been thinking about how to orient towards the heading using solely GPS data, and I can't figure it out.

what do you mean by solely gps data?

What size is the play ground you want to working with ?
Because of the accuracy of the GPS is only to the nearest meter or so.

I would go with my idea for that exact reason - premade gps is for larger scale activity, and im guessing u are not planning to make an autonomous car to drive on highways....

The area is my neighborhood, which has streets that are about 10 meters wide.

And by solely gps data, I mean operating just by using position info from the gps, and not using any external aides (Gyro, encoders, etc...)

Adding a electronic compass would help !!!
Because a GPS only knows which direction it is going by movement.

So all you need to do is, some maths with the GPS data to work out what direction the next waypoint is, and head there

yerp, plus maybe some sensors (Ultra sound perhaps) to detect any obstacles on your way there...

if you want an idea of what the math is, its really simple trig/geometry

more specifically, im thinking you would use arc-tan / pythagorean theorem, to get angles and distances....

Ok, will look into that.

I just found some info about waypoint math here: Attachment browser: Waypoint-Math.pdf by radiohound - RC Groups

Yea, that should get you started, let us know how this project goes :wink:

thanks I`ve added that as a bookmark just in case I need in later.