0
$\begingroup$

Rosanswers logo

Hello everybody,

I'm currently developing a gps-based ROS application using ros-kinetic on Ubuntu 16.04. For the time being, I have no access whatsoever to a real gps device. Instead I'm using the toolkit included in the linux gpsd-clients package for simulating it with a given log file, like so:

gpsfake -c 0.1 -P 4000 gps_log.nmea

This command creates a gpsd server and feeds the contents of the log file as if they were produced by a real gps device. I can verify it's working by using this next command:

gpsmon localhost:4000

which connects to the gpsd server and shows proper positioning information.

However, when I launch the ROS gpsd_client node:

<node name="gpsd_client" pkg="gpsd_client" type="gpsd_client" args="_host:=localhost _port:=4000" respawn="true" />

I can make it work (produce messages on the /fix topic) with only 1 specific log file that I have found on the internet. I cannot see the difference between that working log file and the ones I create using tools like this one: https://nmeagen.org/. This tools generates RMC, GGA and GSA sentences, which I believe should be enough. Actually, one difference I see is that the working log has plenty of different sentences (GSV, VTG, and others), but I don't know if there are some mandatory ones or maybe I'm missing something silly. I can attach the nmea files if necessary.

I need this to work with generated log files. If you now anything I could try with this approach, any workaround, or any other way to achieve this I would really appreciate your help.

Thanks in advance.


Originally posted by mescarra on ROS Answers with karma: 20 on 2017-09-06

Post score: 0


Original comments

Comment by Humpelstilzchen on 2017-09-07:
Do you see a gps fix in e.g. cgps?

Comment by mescarra on 2017-09-07:
Yes, just like with gpsmon I get Lat,Lon,Speed and Heading, and it reads: Status: 3D FIX

Comment by mescarra on 2017-09-07:
Ok, I have just found the cause of it. By default, gpsd_client ignores gpsd feeds with a nan epx. When launching the node, a param called check_fix_by_variance can be set to false in order to generate navsatfix and gpsfix messages anyway. ^^

Comment by jayess on 2018-07-30:
@mescarra could you write up your solution as answer and accept it?

Comment by mescarra on 2018-07-31:
I don't have enough points to accept my own answer :s

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Ok, I have just found the cause of it. By default, gpsd_client ignores gpsd feeds with a nan epx. When launching the node, a param called check_fix_by_variance can be set to false in order to generate navsatfix and gpsfix messages anyway. ^^


Originally posted by mescarra with karma: 20 on 2018-07-31

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.