gpsd_client generating no data with artificial nmea file
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.
Do you see a gps fix in e.g. cgps?
Yes, just like with
gpsmon
I get Lat,Lon,Speed and Heading, and it reads: Status: 3D FIXOk, 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. ^^@mescarra could you write up your solution as answer and accept it?
I don't have enough points to accept my own answer :s