Fundamentals of a GPS guided vehicle

That is a very cool vehicle

That is a very cool vehicle you have. I see you live in Florida too, where at? 

Eustis…by MT. Dora (about

Eustis…by MT. Dora (about an hour north of Orlando)

Quick question…

I’m noticing a discrepancy between what the Config tool writes to the eeprom and what the AVG program reads. The lat and log are slightly off, although when read back into the Config tool it reads correct. Have you noticed that on your setup? I’m using hardware serial (I can’t get nss to work despite using the old servo lib). Not sure if that makes a difference or not.

The error between the two readings is only a few feet, But my robot is way off the waypoints.

I’m using a LS20031 gps @ 9600 baud if that helps.

 Thanks,

 Dave

 

 

I havent doubled checked to

I havent doubled checked to see what is actually being read by the arduino, never needed to because i have been pretty accurate. I am not sure if your setup would change things. I will have to test mine and see if it is correctly writing those GPS points.

Finally working…

My problem with accuracy was due to the radius being set to 10 (meters?). I set it to 1 and it’s much better. It occasionally overshoots and has to correct, but it’s within 2-3 meters. I still don’t know why the waypoints read off the eeprom are slightly off, but I’m pretty happy. Check it out.

http://www.youtube.com/watch?v=OXAnZ_rxcM0

Thanks,

Dave

1 Like

Yes sounds like i need to

Yes sounds like i need to get your GPS’s accuracy. Looking good there, came close to that fence. Cant wait to see what you add.

I wish i had found this a couple of months ago!

I could write this now. I went down pretty much the same path (pun intended) except I have a little more granularity in turning. I have functions for turnLeft and bearLeft for example. One thing I have found is that you can get really good relative accuracy with 2 of the same GPS units and even pretty cheap ones. My favorite now is the Pharos GPS-500 that came with Streets 2008. You can get them (currently) from a seller through Amazon for under $20 delivered in the US and you can find Streets software on eBay with the unit for less than that quite often. You have to crack open the plastic case and there are TTL leads right there. I will post a picture below of the GPS-360, which has the same pinout, wired up to an FTDI. With a little Googling, that will give you the pinout I am too lazy to document.

Anyway, with the GPS-500 under an open sky, I can get an exact hit, sort of. It will immediately get within 6’ and then when sitting still it will get just enough “chatter” to mill about and will hit the exact spot I want it to.

My main purpose for this (which I can’t get too specific about due to an NDA) is a USV and affected by wind, waves and current. One thing you have to do due to those conditions is switch to getting the course from the GPS instead of the bearing from the compass. I had to use a tilt compensated compass also.

I also have a wireless link in mine so I can keep updating it. The target may move, or I may override and drop into “traditional RC” mode.

I hope to get this working on a land based toy in the next few days to work on another wrinkle. I have a remote control for it that is also an Arduino. It has a GPS and compass in addition to a joystick. That means I can tell which way I am pointing the RC box and how far away it is. Any lights coming on?

I am also working on obstacle avoidance and rerouting. That is painful. 

Hopefully one day soon the guys I am working with will get the product I mostly work on to market and I can show it off. In the mean time, I can reveal non proprietary technology. I will post my AGV toy in a few days (I hope). I only have to create the turning and driving functions for the vehicle I am getting (an ESC/Servo type, just like my main project, so it is mostly tweaking PWM values) and the brown truck is supposed to drop the toy off tomorrow.

Here is the promised picture of a GPS-360. If you get a GPS-360 or GPS-500, you crack open the plastic case and solder on the pins or just solder wires. Look up the FTDI pinout and you can tell what is what. It will spit NMEA at 4800 baud. You will like the 500 better for small robots. Both are great in motion but the 360 bounces in a wider (still small) area when still.

a tweak needed for high accuracy with some RC units

If you are going for an exact hit from very nearby, you will never get there going forward and always trying to close the gap if it is within the circle of your turning radius. This only matters if your turning radius is high, but there are a few vehicles, mostly larger faster high end RC vehicles, that don’t turn that tight. There are two ways out of this problem. One is to use reverse, if supported, and cut your wheels the opposite way to swing the nose toward the target. The radius is very small and since you are pointing out and not in, you can point at all coordinates. The other is a less efficient twist on the same logic - pointing out. When the target is nearby, go the wrong way (left when the logic in the code would normally say right). You will go more than 180 degrees around, but during the last 180 degrees, your nose will sweep across pointing at all coordinates within the circle of your turning radius had you gone the “right” way.

I hope to get a video this weekend. My truck chassis is operational (controlled by Arduino) and I just have to get a compass and GPS running in it (same ones I have working in other units; shouldn’t be too bad) and port (copy mostly) some of my nav code.

EDIT - oh yeah - my BECs (I have 2 on different ESCs) are registering over 6v; too little to power a regular VR (an LDO would work) but enough to make me nervous about going straight to 5v VCC. A diode drops the voltage a little and calms my nerves…

I’m confused

When connecting the esc to the arduino, where the instructions for using that board? is it different then conneting it to an arduino? I am still a beginer at robotics, but once I get more advanced I plan on creating an agv because I have a fast rc car that has a esc. 

thanks

-Mark

You just have to connect the

You just have to connect the ESC signal pin to a PWM pin, which in this case there are only 2 left ( pin 9 and 10). Also make sure to connect your grounds. 

some questions

I didn’t understand a few thigs:

  • how i select waypoints?
  • the codes that you had published fully work?

Problem solved

Problem solved

assembly

hello I’m thinking of using your code for my project but do not know where to connect theGPS, the compass, and others will be that you could post a schematic?
And even now, this very good
If this helps I’m using a sabertooh or works that a servo

would this work…

If I could design a small enough board, would the GPS be accurate enough to scale down this sort of thing to this sort of scale?

Is it possible to set GPS “no go areas” to, for example, keep it off grass, or the road?

Also, What collision sensors have you got on it? I can’t see any sonar, or IR sensors.

 

Although I would like to try making an AGV, I’m unlikely to get around to it any time soon (too many projects!), but I thought I’d ask the question anyway.

Thanks

Good

I’ve been searching for guides on how to make an arduino powered autonomous bot (with gps & compass) all day. This is by far the best - thank you! 

Note for visitors: the code is dated - change all mentions of “NewSoftSerial” to “SoftwareSerial” - change all “nss” to “ss” 

The fundamentals of a GPS guided vehicle is really good. Because nowadays Garmin Express is really popular for this thing. And it’s really good to see that you are explaining so much properly. The technology really helped us for traveling anywhere, anytime, anyplace.

Hi! Thx for this topic.
Can you say me, how can I read or open .pde file ?
I know .ino from IDE arduino.