GPS Example Questions

Hey,
Sorry for all the confusion.

Glad that it worked out for you. We’ll update the code ASAP so that it works out of the box for everyone.

-Karan

Hey rschmidt, Karan,

This is really great. Thank you for updating the code, and thanks for working through this. This is really fantastic and I think I’ll try to write a blog post about it.

rshmidt, what are you planning to do? Can you share with us?

Thanks folks!!

Hello Karan, when can I expect the update, as I still have problems to have a working GPS Example ?

Karan,

I’m implementing a lot of your python code in Elixir. So i’m going through your examples and seeing if I can make it work in Elixir. I’ve implemented the basic examples with no problem in Elixir. Next step is to write my control code to make the robot autonomous using all the sensors as input. I actually probably won’t use the GPS much right now as most of what I’ll be doing will be inside.

@pollwerk: can you update the local GoPiGo git repository and try the out the code. We just updated the examples.

@rschmidt: thanks for trying out the code and do keep us posted on your project goes.

-Karan

First I tried software/python/examples/gps bot/gps.py but this was not updated and - even when I tried - not working.

Then I looked up github and found that the file in software/python/other scripts/gps.py was updated on 10th June 2015 (today).

This I tried and its working. (Unfortunately I did not test this program before).

@Karan, thank you very much, Klaus

Hello,

Does anyone have example code of actually programming way points for the GoPiGo to follow? I’m keen to get that working.

Thanks so much!

Hey,
There are a couple of people working on GPS with the GoPiGo but I am not sure if any of them are creating a bot to follow waypoints.

There are a lot of resources available on the internet on how to create one. This should help: http://stackoverflow.com/questions/6000371/reach-a-waypoint-using-gps-compass-accelerometer-algorithm and http://dasl.mem.drexel.edu/alumni/bGreen/www.pages.drexel.edu/_weg22/gpsMagpie/gpsFixedWing.html. You might also need a compass to follow the direction towards the way-point.

Do let us know if you are able to get the project to work and if you need any more help.

-Karan

Also, you’re basically going to need to calculate azimuth between two sets of coordinates, turn to that angle, and run until your distance is 0 between your current coordinates, and the coordinates you’re aiming for.

With that in mind, if you have a compass and a GPS, the two numbers you need to know are azimuth to destination and distance to destination. And you can calculate those, in python, from two sets of GPS coordinates, using this fancy article here:

I think!

Hey, so can you tell us more about your project and what you’re working on?

I got everything up and running and my GPS.PY keeps outputting “unable to read” every second or two. The cables are switched properly. (A picture of the crossed over cable under the instruction would probably help people or even a 20 second youtube of someone crossing over the cable with a small screwdriver.) Does anyone have any experience with that unable to read message? Any clues on what to do? My build is the one that I downloaded about 10 days ago.

I am not sure but suspect that you have the wrong code (see my entry from May 23, 2015 at 8:28 pm). There I switched to GrovePI (but you need the board) and came back when rschmidt and karan had corrected the code for the GoPiGo.
Don’t spend much time but this is a possible reason. Just read through the whole thread to see similarities.
Or the GPS is broken (less realistic).
Normally it works even inside a building (not for the first steps to exclude this error cause).

I can confirm that updated GPS.PY file is outputting GPS data that looks fairly accurate. I can see 8 satellites inside of my two story stucco house in San Diego CA. Does anyone have a program that helps the gopigo navigate to waypoints? I assume you need a compass to orient the gopigo before you send it towards the next point?

I think that there are a couple of people working on the waypoint navigation but we have heard from anyone who got it to work. It would require a compass to navigate and there is some discussion on this thread too. Do let us know if you get it to work with your GoPiGo.

-Karan

I am working on such a program right now. I Had some issues with the GPS I had, and have gotten a new one, along with a compass (need both). I’ll be working on some code and a tutorial a bit and share it here when I have something.

Onward! John

I was thinking you could theoretically do it without the compass. I too just ordered the compass and I’m waiting for it. If you knew your first GPS point and moved a certain distance you could capture you second GPS point and you also knew your destination point you would know which way to turn your gopigo without a compass because you now have a triangle. I guess it would be hard to figure out how to get the motors to turn you exactly 32 degrees or whatever needed to happen, but it could theoretically be done. It would obviously be 90% easier with compass data.

John,
I’m excited to see your blog post! Good work and Good luck!