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

Piksi /gps/fix message differentiation

asked 2016-10-20 08:32:04 -0500

Tyrone Nowell gravatar image

I am using a SwiftNav Piksi with ROS Kinetic distro. Even though it is technically not supported, it seems to be working fine.

I am having a problem trying to extract the gps coordinates from the Piksi via the /gps/fix topic (sensor_msgs/NavSatFix message type). I need the coordinates in decimal degrees (WGS 84). The values I get from this topic are both the uncorrected GPS coordinates as well as the RTK corrected ones. However, both are published to the same topic and, as far as I can tell, the only way to discern the difference is to look at the altitude (RTK is correct, uncorrected is approximately double).

Since the 'rover' Piksi will not necessarily initialise near the base it will be difficult to determine which one is correct. Also, the messages are published sequentially (@20Hz instead of the Piksi's standard output rate of 10Hz), so once a correct message has been determined, I could just drop every second one.

Is there a better way to separate this data other than the altitude? Could this have something to do with running it on Kinetic?

edit retag flag offensive close merge delete


Hi, which package are you using in ROS to interact with piksi?

Femer gravatar image Femer  ( 2016-10-21 02:14:02 -0500 )edit

I'm using the swiftnav_piksi wrapper:

Tyrone Nowell gravatar image Tyrone Nowell  ( 2016-10-21 03:22:16 -0500 )edit

it looks like he doesn't give you any information about the type of fix of RTK. If you need something easier to access data from the piksi device you may have a look at my repo piksi_rtk_gps It's a python package still under development, so maybe

Femer gravatar image Femer  ( 2016-10-21 08:23:56 -0500 )edit

there's still a lot of things to do, but it works for me. Topics you can be interested in: /piksi/navsatfix_rtk_fix (published only if you have an RTK fix) /piksi/navsatfix_rtk_float (published only if you have RTK in float mode) /piksi/navsatfix_spp (single positioning point, no RTK used at all)

Femer gravatar image Femer  ( 2016-10-21 08:26:46 -0500 )edit

That sounds like exactly what I'm looking for.Thanks!

Tyrone Nowell gravatar image Tyrone Nowell  ( 2016-10-24 06:13:42 -0500 )edit

I'm glad I could help you in this other way ;)

Femer gravatar image Femer  ( 2016-10-25 12:12:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-01 05:07:16 -0500

Tyrone Nowell gravatar image

In case anyone else is experiencing this problem, I'll post my fix here.

For some reason, the piksi driver has been set to publish all message to the /gps/fix topic with a status of 0. This can be fixed in the piksi_driver.cpp file by changing the following line (~206),

llh_msg->status.status = 0;


llh_msg->status.status = llh.flags;

The published messages should then have status 0 for SPP, status 1 for RTK and status 2 for float.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-10-20 08:32:04 -0500

Seen: 747 times

Last updated: Feb 01 '17