Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   GPS with VEX (http://www.chiefdelphi.com/forums/showthread.php?t=59128)

dasmoenator 13-10-2007 16:37

GPS with VEX
 
As of now I have a pretty complex Vex bot with a variety of sensors. I'm interested in using a GPS receiver but I'm unsure if it'll work and how I'll be able to use it. I want to be able to use the GPS receiver to control the bot to move where I want it to go. The bot also uses ultrasonic sensors to avoid obstacles if that makes if a difference. I'd prefer to not have to buy a new microcontroller if the VEX controller can do the job. But if you're 100% it can't then I'd be interested in another Microcontroller. For programming I use EasyC and RobotC.

Any input would be greatly appreciated.

Thanks

Binome 13-10-2007 17:14

Re: GPS with VEX
 
GPS reccivers traditionally output NMEA 0183 sets of data over a serial port. I'm sure you could decode the data and read it using a vex controller. A good overview of the output of a recciver is Here

Robostang 548 13-10-2007 17:17

Re: GPS with VEX
 
I don't know if the Vex controler can support serial communication because I've never used vex before, but there is a a good gps reciver at http://www.parallax.com/detail.asp?product_id=28146 . I know my team was contemplating using this for our frc bot. If the vex controler does support serial communication then you just have to write some protocol code for the reciver and you shouldent have any problems.

dasmoenator 13-10-2007 17:20

Re: GPS with VEX
 
Yea I've been reading up on NMEA over the past few days. I was looking at this GPS reciever http://www.parallax.com/detail.asp?product_id=28146 but I was unsure if the VEX controller would be able to decode the input to be able to control the robot. I talked to a sales rep from Parallax and he was unsure as well.

bear24rw 13-10-2007 19:47

Re: GPS with VEX
 
People have used the CMUcam with a Vex controller over serial so you can defientely do it.

Gdeaver 13-10-2007 19:53

Re: GPS with VEX
 
The Vex controller has 2 serial ports available. The port 2 is unused and could be used to interface to the GPS unit. It is a 5 volt TTL serial port. The Parallax GPS is 5 volt TTL and would be compatible with the Vex port. I don't remember there being serial port support in easy C however WPLib does support serial if you want to use Easy-c. Note that this an older GPS unit and probably will not work well indoors.

dasmoenator 14-10-2007 09:47

Re: GPS with VEX
 
The Vex microcontroller only has 1 serial port that I can see. But the Parallax GPS reciever, from what I can see, works with the board ports and I'd be plugging it into the rx port I assume. I guess my main problem now would be how to code it since EasyC would most likely not work. Not exactly sure what WPLib is but I also do have Carnegie Mellon's RobotC. If you could elaborate more or maybe hit me up on AIM or something that would be great.

I also noticed another good GPS unit thats being used a lot called the eTrex made by Garmin. I'd most likely need a new microcontroller which isn't the biggest problem in the world though I'd like to stay with VEX because I already have all my sensors coded and hooked up the way I want them. But the GPS at this point is more important and I'd be willing to make a change if neccessary.

Gdeaver 14-10-2007 10:11

Re: GPS with VEX
 
I believe Easy-C pro does support serial. The functions are there but may not be exposed. I don't have Easy-C pro. Maybe some one could cjhme in or post a question in the easy-c pro sub forum.

artdutra04 14-10-2007 17:52

Re: GPS with VEX
 
WPILib is the framework written by Brad Miller at WPI (hence the name) from which EasyC is based on. You can program using WPIlib in either EasyC PRO (because it supports custom .c files and has a built-in text editor) or any other IDE of your choice. (MPLab, Eclipse, etc). Every time you use something like StartUltrasonic(); or SetPWM(); in EasyC, that's really a WPILib function.

There are currently 2 serial ports on the Vex controller - the RxTx port and the programming port. Using WPILib, you can interface with TTL devices (like the CMUcam) using the RxTx port and a TTL converter. As long as the device is 5v and outputs TTL, you should be able to write your own custom 'drivers' to read the signal on the Vex controller using WPILib.

basicxman 14-10-2007 19:40

Re: GPS with VEX
 
doesn't the parrallax gps have i2c, i think this would be compatible with Vex

whytheheckme 15-10-2007 16:08

Re: GPS with VEX
 
How accurate would GPS be? Would it be accurate enough to detect robot movement on the field?

This made me think (kinda unrelated), but what if you set up a local positioning system within the venue to track your robot on the field (I can already think of the rules that this violates), but maybe we could ask for an exception for a completely automated system, or better yet and IFI supported venue device that is universal and could be used by all teams to track their robots?

Thinking aloud,
Jacob

basicxman 15-10-2007 16:58

Re: GPS with VEX
 
gps is accurate enough that you could pinpoint the location of your robot in your room (i.e. what room its in)

Kingofl337 15-10-2007 17:05

Re: GPS with VEX
 
You would need easyC Pro to access the serial port to use GPS. I think GPS would be a really cool field positioning device for both FRC or FTC. I just don't know enough about how you could create your own field based GPS network. Would be cheaper to use ZigBee modules to pinpoint a location based on signal strength?

Quote:

doesn't the parallax gps have i2c, i think this would be compatible with Vex
Unfortunately IFI didn't bring out I2C in the VEX controller other then it is used by the two PICs
to communicate with each other.

SgtMillhouse648 15-10-2007 17:27

Re: GPS with VEX
 
Quote:

Originally Posted by basicxman (Post 646188)
gps is accurate enough that you could pinpoint the location of your robot in your room (i.e. what room its in)

maybe what room its in, most GPS units I know are accurate to only about 10-20 feet of so.

jgannon 15-10-2007 17:37

Re: GPS with VEX
 
It's worth noting that the quality of your GPS signal is substantially deteriorated if you don't actually have line-of-sight to the sky, so even with an exceptionally accurate GPS unit (some models have sub-meter resolution, though most likely not within the FIRST expense rules), it'd be pretty hard to ascertain your position inside an arena. However, making an outdoor robot with a GPS is pretty sweet.

whytheheckme 15-10-2007 19:14

Re: GPS with VEX
 
So.... what are the odds of IFI issuing some kind of field positioning system (weather its a beacon in the center of the field, or some kind of magic sensors under the carpet) and the devices to use in our bots?

I think that while the lights are a challenge, they simply aren't accurate enough. Imagine how much more complicated the game could be if you could reliably know where your robot is at all times.

Jacob

AdamHeard 15-10-2007 20:14

Re: GPS with VEX
 
Quote:

Originally Posted by whytheheckme (Post 646202)
So.... what are the odds of IFI issuing some kind of field positioning system (weather its a beacon in the center of the field, or some kind of magic sensors under the carpet) and the devices to use in our bots?

I think that while the lights are a challenge, they simply aren't accurate enough. Imagine how much more complicated the game could be if you could reliably know where your robot is at all times.

Jacob

In 2004 there were two infrared beacons that could be used.... From what I remember, most teams didn't because dead reckoning, line following & gyro and/or encoders all worked better. Anyone with more experience care to clarify?

How is the light not accurate enough though? Between this year and last year we had distance down to less than a foot of accuracy, and the angle wasn't too bad either (I don't remember exactly). I can't imagine any field based navigation being any more accurate.
EDIT: didn't realize you were talking about the entire field, not just an object...... In that case, I can't think of any current system that is realistic for FIRST that will work here....

whytheheckme 15-10-2007 20:20

Re: GPS with VEX
 
I was thinking about a radio transmission system that works like a local GPS, where something above the field is transmitting a signal, and devices on the robots can use the exact timing of that signal to determine exactly where it is (think thats how GPS works, but i could be completely wrong.) Something radio, wireless, free of looking for visual things (or infrared, basically free of line of sight stuff.) More of an actual location instead of an estimated calculated location. Think of the possibilities for a game and the autonomy of a game if you had this data reliably!

(I just realized that I'm talking about FRC here, and the thread is titled VEX. Sorry for the confusion.)

Jacob

dtengineering 15-10-2007 21:05

Re: GPS with VEX
 
Here's a couple ideas to kick around... rather than using a radio signal, why not an ultrasonic signal? Since sound travels more slowly, it is a bit easier to measure the timing differences accurately. If there were four transmitters (one in each corner of the field) and each fired a slightly different length of noise at a pre-defined interval, it may be possible for the robot to determine its position with a fair bit of precision... barring reflections and other nastiness.

Or take a couple of CMUcams (or perhaps something with a bit higher resolution) and point them up at the ceiling... use some of the fixed field lighting as "stars" for an "astonomical" positioning system. It would require a fair bit of effort to deal with blinking and moving lights and such, let alone lens flares and other real-world weirdness, but in the happy, happy world of pure theory... it might work.

But anyways, that is off the point of the thread... my Garmin Etrex Legend has an RS-232 port and should be able to "talk" to a VEX. Although I've only used it for downloading track logs and uploading maps, I believe it IS capable of doing a real-time GPS location feed. The downside is that it has an older chipset... I've found the new SirfStar III devices to have much faster acquisition times and better reception. Some of them even work indoors.

There are also neat tricks for improving GPS accuracy. One of the less expen sive ones... although not a particularly useful one for real-time robotics applications... is to leave your GPS sitting in one place for an hour or so and record all the positional readings (they will fluctuate a bit). Then you compare them to the readings of a nearby receiver at a known location. Since some of the errors in your signal are caused by random atmospheric fluctuations, and since a nearby receiver will have similar fluctuations, then the errors between the two sets of readings should be similar. Since the reference receiver is at a known location, it will be possible to determine a known error, and modify the results for the mobile GPS unit. I suppose this technique could be modified to offer real-time benefits, but I don't know if I'd want to do that on a VEX platform.

Jason

Gdeaver 15-10-2007 21:16

Re: GPS with VEX
 
There are six fixed position 900 mhz transmitters at the operator stations. There are ways to resolve your position from these sources, however it is not easy. In the past our team has used parts of the field as way points. This proved very easy to do in stack attack and raising the bar. First put lines on the field. They where easy to detect with the Banner sensors. We drove toward the line using dead reconing, stopped when the line was detected, timed turn and go on. It was good enough to nock the ball off in raising the bar. We now have a large inventory of available senors. Each year evaluate the field for waypoints objects.

Alan Anderson 15-10-2007 22:21

Re: GPS with VEX
 
Quote:

Originally Posted by dtengineering (Post 646214)
Or take a couple of CMUcams (or perhaps something with a bit higher resolution) and point them up at the ceiling... use some of the fixed field lighting as "stars" for an "astonomical" positioning system. It would require a fair bit of effort to deal with blinking and moving lights and such, let alone lens flares and other real-world weirdness, but in the happy, happy world of pure theory... it might work.

http://www.evolution.com/products/northstar/works.masn

http://www.memagazine.org/backissues.../measurng.html

Quote:

Originally Posted by Gdeaver (Post 646218)
There are six fixed position 900 mhz transmitters at the operator stations...

For the past couple of years, the transmitters are actually all on a common "tower" at one side of the field.

basicxman 16-10-2007 08:14

Re: GPS with VEX
 
Quote:

Originally Posted by Kingofl337 (Post 646190)

Unfortunately IFI didn't bring out I2C in the VEX controller other then it is used by the two PICs
to communicate with each other.

doesnt matter, you can use standard I/O pins and make subroutines for i2c, look at this topic in the VexForum (www.vexforum.com), i've already posted how, after FIRST i'll even make the subroutines

tseres 16-10-2007 11:08

Re: GPS with VEX
 
Quote:

Originally Posted by dtengineering (Post 646214)
There are also neat tricks for improving GPS accuracy. One of the less expen sive ones... although not a particularly useful one for real-time robotics applications... is to leave your GPS sitting in one place for an hour or so and record all the positional readings (they will fluctuate a bit). Then you compare them to the readings of a nearby receiver at a known location. Since some of the errors in your signal are caused by random atmospheric fluctuations, and since a nearby receiver will have similar fluctuations, then the errors between the two sets of readings should be similar. Since the reference receiver is at a known location, it will be possible to determine a known error, and modify the results for the mobile GPS unit. I suppose this technique could be modified to offer real-time benefits, but I don't know if I'd want to do that on a VEX platform.

Jason


WAAS (wide area augmentation system) does this for you on relatively new GPS receivers. it takes what the satellites are giving and compares it to a known location (WAAS station)

dasmoenator 16-10-2007 23:37

Re: GPS with VEX
 
Thanks for the great info guys. I'll definitely be looking into WPILib. From what I hear its what I need. My project is more of an outdoors thing so I'm not too worried about GPS signal having problems with walls. I'm still somewhat torn between the parallax GPS and the eTrex. I'll probably end up with the parallax as it was mainly made for this purpose and the fact that I will be able to integrate it into my bot quicker and easier is a major plus. I'll post back with some results after I try it all out.

tseres 17-10-2007 08:25

Re: GPS with VEX
 
ya, the parallax is cool, but i'd personally go with the etrex. i have a Garmin RINO and although it's a different model, Garmin GPS's will output the same signal. the pinout guide in in the gps manual. it outputs he same as the others. also, if you ever wanted to, you could temporarily take the gps off and do something like geocaching....

Peter Randall 24-10-2007 10:52

Re: GPS with VEX
 
We are trying to add a Parallax GPS to a standard FRC controller using Easy C. We can see that we have established a fix via the idiot light on the GPS, but we are having trouble writing and reading the TTL serial port. Can anyone provide words of wisdom on how to write text strings to the serial port e.g "!GPS05" and how to read the serial response.

Thanks

ay2b 24-10-2007 17:18

Re: GPS with VEX
 
Quote:

Originally Posted by Peter Randall (Post 647776)
We are trying to add a Parallax GPS to a standard FRC controller using Easy C. We can see that we have established a fix via the idiot light on the GPS, but we are having trouble writing and reading the TTL serial port. Can anyone provide words of wisdom on how to write text strings to the serial port e.g "!GPS05" and how to read the serial response.

There are several different serial port libraries out there, so look through the documentation/header files for the one you are using. Generally you can write to the TTL serial port using printf or fprintf. Some libraries present the 2nd port as "stderr". Others will have a global variable you change to set which port the stdout (i.e. normal printf) goes to.

Is the TTL serial port enabled? The header file for your serial library might have some #define statement you'll need to change.

What baud rate are you using? Again, hopefully you can set this via a #define in the header file. What baud rate does your GPS expect?

If you're up for it, you might try connecting your TTL serial port on the controller to the serial port on your computer, so you can more easily see whether or not anything is being sent out. In order to do this, however, you will need a "ttl converter chip" (I don't think that's quite the right name for it, but I'm drawing a blank on the proper name). You could potentially use the one provided for use with the CMUCam. This will require a little extra wiring on your part to make it work, but it could be done.

I know these answers are vague, but hopefully they help a little. Keep us all up to date on your progress.

Peter Randall 25-10-2007 08:07

Re: GPS with VEX
 
We are using Easy C which uses the WPI library. Since it can run the CMU camera on the TTL serial port, it clearly has the functions we require, unfortunately, I can't figure from the WPI documentation what the syntax should be for reading and writing to the serial port. The Parallax runs at 4800 baud, which we set (I think) via a command in our Init function
The issue is that the Prallax need us to send it a command string "!GPS0x05" and then read the reply which is the latitude in decimal format. I am trying to read it into a Long variable, but when I print the value, all I get is -1. We can see from the GPS that it has acquired a fix. I am befuddled

PGR

Kingofl337 27-10-2007 02:04

Re: GPS with VEX
 
E-mail Brad Miller he can help you out. YGPM

dasmoenator 28-10-2007 23:56

Re: GPS with VEX
 
Quote:

Originally Posted by Peter Randall (Post 647913)
We are using Easy C which uses the WPI library. Since it can run the CMU camera on the TTL serial port, it clearly has the functions we require, unfortunately, I can't figure from the WPI documentation what the syntax should be for reading and writing to the serial port. The Parallax runs at 4800 baud, which we set (I think) via a command in our Init function
The issue is that the Prallax need us to send it a command string "!GPS0x05" and then read the reply which is the latitude in decimal format. I am trying to read it into a Long variable, but when I print the value, all I get is -1. We can see from the GPS that it has acquired a fix. I am befuddled

PGR

Please post back or let me know if you find a way to get it to work. I'm very interested in getting something like this off the ground and working.


All times are GMT -5. The time now is 03:44.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi