gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use gpsd and ublox-ros driver at the same time


From: James Browning
Subject: Re: Use gpsd and ublox-ros driver at the same time
Date: Fri, 16 Sep 2022 08:41:29 -0700

On Sep 16, 2022, 03:37, Marco Camurri <marco.camurri@outlook.com> wrote:

Dear all,

I have a robotic application where I need to sync my u-blox ZED-F9P receiver with other sensors (cameras, lidars, etc.) on a host computer.

At present, I'm using PPT to sync the devices to the computer's clock. The computer is not synced with anything else.

Now I want the computer clock to be synced with the GNSS receiver and leave the other devices to be synced to the computer's clock via PTP.

The main idea would be that gpsd provides updates to chrony, which in turn provides updates to linuxptp4l.

Following the instructions I could find here for another receiver, it should be possible to connect the PPS and NMEA wires to the serial port of the computer, then set up gpsd to use them, then configure chrony to be updated by gpsd, and finally configure PTP to use chrony as source.

The communication between these three programs would be via shared memory, if I understand correctly.

The problem is that I also need to access the raw date from the receiver and publish them over ROS, using this driver: https://github.com/HKUST-Aerial-Robotics/ublox_driver

Because there can't be two programs accessing the same serial port, I can't run gpsd and the ublox driver at the same time, so I'm looking for a minimally invasive solution (i.e. with smallest code development possible) to let the ROS driver process the data from the receiver while it is being used by gpsd.

I know from the FAQ that gpsd does not provide a way to extract raw data directly, but I saw a low level API is provided.

Is that at least possible to use such API to interface with gpsd to extract the binary blob which the ublox ROS driver would normally get from serial directly? If so, I could modify the driver to get the data from gpsd instead of the serial port.

Is there a better strategy than the one I've described?

Thanks in advance,

Marco Camurri

"gpspipe -do /path/to/pipe" should work not too horribly I think. It copies the raw ublox data to a pipe of your choice along with some embedded JSON blobs detailing gpsd version, device (dis)connects, and such.

Unless you intend to serve all time from the droid control unit, I'd have PTP in client mode on it and have chrony managing the clock.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]