[Sensors] UBLOX under Linux - cpslabor-education/robotwiki GitHub Wiki

Ublox under Linux

Preliminaries

It's quite possible to use UBX GNSS receivers (e.g. Drotek F9P) under Linux. You shall need the following:

  • GPSD: https://gpsd.gitlab.io/gpsd/ - ATTENTION! you shall need 3.22 or newer to properly use RTCM messages provided by u-center NRIP caster.
  • Optionally an NTRIP caster (for RTK FIX), for example the one provided by u-center.

Nevertheless, GPSD provides a very friendly API to get started with C/C++ and Python applications - an excellent choice for ROS 2.

Prerequisites

Compile GPSD from source.

Ensure that the serial device port that the GPS receiver uses is in raw mode:

stty -F /dev/ttyACM0 raw

Starting GPSD

You can start GPSD as the following (the -N parameter starts as a foreground application, not as a daemon):

gpsd -n -N ntrip://user:pw@ntripserver:ntripport/mntpoint /dev/ttyACM0 -D 5