ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

gpsd_client help please, can't see data on fix topic

asked 2011-11-25 16:51:15 -0500

mattmclellan gravatar image

updated 2011-11-26 06:08:43 -0500

Hi, I'm trying to follow the tutorial for gpsd_client, but it's not quite working. I'm running ROS Diamondback on Ubuntu 10.04, and just downloaded the latest gps_umd files.

Everything works fine early on in the tutorial. 'gpscat -s 19200 /dev/ttyUSB0' shows the output from the GPS unit (a garmin gps 18x-5Hz). 'gpsd -S 4000 /dev/ttyUSB0' runs and connects to the unit (Usually running with the -N -n -D 2 options to show logging, keep from running in background, etc). Reading the gpsd data with cgps or xgps show the correct lat/long for my area.

Running the gpsd_client doesn't throw any red flags (it prints a statement that it GPSd opened), but when I try to show the fix data (with rostopic echo /fix) it doesn't show anything. The only other step in the tutorial that doesn't work is when it has you send 'telnet localhost 4000' to see what gpsd is sending over port 4000. I don't see anything, but cgps works when I tell it to look for data on that port.

I found another question asking about something similar, but it sounded like his problem was due to using cturtle at the time.

The only thing that doesn't seem to work is that xgps doesn't show any satellites in thy sky view. It still shows the correct lat/long and elevation though.

Update: So I added a bunch of print statements to the client.cpp file and re-ran. It tells me that there's no fix, and that there's no satellites visible and none being used. But when I launch gpsmon, it tells me that there's anywhere between 6 and 10 satellites visible (on the right hand side of gpsmon). But it doesn't show me the azimuth, elevation, etc for any satellites.

Has anyone else had a similar issue? Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-11-27 08:46:03 -0500

mattmclellan gravatar image

Figured it out. Looking into the manual for the Garmin GPS I'm using, I noticed that the sentence for what satellites are visible wasn't sent be default. Setting the unit to send the GPGSV sentence fixed not seeing the satellites visible in gpsmon. Then enabling the GPGLL sentence fixed the fix data not being published.

edit flag offensive delete link more

answered 2012-12-28 09:53:18 -0500

autonomy gravatar image

updated 2012-12-28 09:53:50 -0500

This question helped me a lot, I spent more than an hour trying to figure out why I'm not getting anything on /fix. Can't post a comment to the accepted answer or upload pictures, but here's a more detailed explanation:

  1. Download Garmin's SNSRXCFG software from

  2. Run, connect to your GPS: Comm -> Setup and select the appropriate port/baud (19200 for 18x-5Hz)

  3. Once connected, go to Config -> NMEA Sentence Selections (F7), enable GPGLL, press OK

  4. Send config to your GPS (F9) or upload button
edit flag offensive delete link more


Hi, I am facing the same problems your were facing except that I enabled GPGLL and it is still not showing any data in the fix topic, do you know what NMEA sentences were enable and disable when it could work with you? I am working with the same gps Garmin 18x-5Hz at 19200 baud.

Regards, Thibault

Thibault-Salford gravatar image Thibault-Salford  ( 2013-05-02 04:20:37 -0500 )edit

I've got GPGGA GPGSA GPGSV GPRMC GPGLL And you've verified that the GPS is sending data using xgps or gpscat, correct?

autonomy gravatar image autonomy  ( 2013-05-02 04:55:39 -0500 )edit

Yes both are working fine, I can see position of satellites and all the gps sentences such as GPGSV GPGGA GPGLL GPRMC GPGSA...

Thibault-Salford gravatar image Thibault-Salford  ( 2013-05-02 05:33:36 -0500 )edit

I'm going to do this from memory, so forgive me if I'm wrong. roscd to the gpsd_client directory and take a look at client.cpp. Find the process_data() function. Is there a line stating "if (p == NULL) " and then returning? I've run into issues where a connection to gpsd won't be opened correctly .

autonomy gravatar image autonomy  ( 2013-05-03 04:44:06 -0500 )edit

Add a printout statement in there to see if your gpsd_client instance is simply returning because of a bad connection to gpsd. I had to modify gpsd_client to detect such problems and reopen the connection. I will look into pushing the code back to the developers.

autonomy gravatar image autonomy  ( 2013-05-03 04:46:26 -0500 )edit

Thanks a lot for you help, I found out that I didn't have good data from satellites (I am working in a huge building) and when I went out everything's became good, after some permission issues solved .

Thibault-Salford gravatar image Thibault-Salford  ( 2013-05-03 06:58:42 -0500 )edit

Question Tools


Asked: 2011-11-25 16:51:15 -0500

Seen: 2,642 times

Last updated: Dec 28 '12