Closed IanBurwell closed 1 year ago
Hi @IanBurwell,
I'm not in a position to provide support or guidance on the particular ntrip client or ublox_gps libraries you refer to, but RTCM is a binary protocol and any compliant NTRIP client (including RTK-compatible GNSS devices such as the F9* series) would expect RTCM data in binary format, not string format.
To use gnssserver as an NTRIP caster, you need to be using binary output format (--format 2
), which is the default anyway, so you can simply omit the --format
argument.
FYI the pygnssutils library also provides an ntrip client - gnssntripclient - which does accept binary input. You may like to take a look at this.
I may be misunderstanding your objectives here, but you appear to be using an unnecessarily complicated toolchain if you're simply trying to upload RTCM data from an F9P base station to another ublox GNSS device. You don't need the ntrip-client or ublox-gps libraries - you could simply send the binary RTCM output from gnssserver directly to the receiver - see for example https://github.com/semuconsulting/pygnssutils/blob/main/examples/rtk_example.py.
HTH
Ah, my misunderstanding came from not knowing that NTRIP was solely binary and that the library I am using must either not be in compliance or something else entirely. I thus understand why --format
caused an issue. It could be nice to catch that user error but I understand what went wrong and am happy to close this issue. The reason I have a complex chain is due to the rover GPS driver hogging the port and only accepting RTCM via ROS messages (so the chain is just a clunky way of converting RTCM-->ROS).
Thanks, -Ian
The user error is there for a reason, but I've updated the README to make things clearer.
I had a quick look at the documentation for ntrip_client and I'm pretty sure it's designed to accept binary RTCM input from an NTRIP caster. I can see no reason why it shouldn't work with gnssserver running in NTRIP mode with the default binary output format - have you actually tried it in this configuration?
NB: as explained in the README, you need to ensure your F9P base device is operating in Base Station Mode (either FIXED or SURVEY_IN) - gnssserver itself doesn't set this up automatically (as different users will have different configuration requirements), but code examples are available e.g. https://github.com/semuconsulting/PyGPSClient/blob/master/examples/f9p_basestation.py
ROS is open source so if I can find the time, I may look into supporting a ROS output format directly in pygnssutils in a future release.
Are you happy to close this issue now?
My confusion with strings was due to a string decoding error without stack trace and a gross assumption. I will look further into it to get to the root of my problem.
Describe the bug
I am trying to use the
gnssserver
as an NTRIP caster so that I can get RTCM corrections into ROS (using ntrip_client). In doing so, I realized that I needed the output format to be a string of sorts and thus am using--format 16
(or--format 1
). However, this causes an error (below) as the string seems to not be encoded.pygnssutils version:
1.0.9
gnssserver
output:If using
--format 1
the error becomesTypeError: a bytes-like object is required, not 'RTCMMessage'
ntrip_ros
output (if helpful):To Reproduce
Steps to reproduce the behaviour:
ntrip_client
as a clientExpected Behaviour
Either a graceful failure or no error.
Desktop (please complete the following information):
GNSS/GPS Device (please complete the following information as best you can):
Additional context
My one goal is to provide the ublox_gps ROS driver with RTCM messages from a local base station and the best way I've found is via an NTRIP caster (such as
gnssserver
) and the ntrip_client package. I would use pyGPSclient but it sends binary data only (to my knowledge) which ntrip_client won't accept. Thus any advice along with discussing the mentioned bug would be warmly welcome.