septentrio-gnss / septentrio_gnss_driver

ROS 1 & 2 driver for Septentrio GNSS & INS receivers
BSD 3-Clause "New" or "Revised" License
72 stars 37 forks source link

Corrections VIA Serial #70

Open Jad-Tawil opened 1 year ago

Jad-Tawil commented 1 year ago

Hello,

I intend on communicating with the Astrex SBi3 via Ethernet (TCP IP), but i would like to provide differential corrections via Serial (COM1-GPIO).

Reading the code, im not sure this is possible.

In the configureRx() function, the "device" parameter is parsed, and if proto=="tcp", the corrections are assumed to be provided over TCP.

The same "device" paramter is parsed in the initializeIO() when connecting to the device.

Is it possible to use tcp to connect to device, and serial to provide corrections (i am not using NTRIP, i have a radio on board that received corrections for a local base station).

thomasemter commented 1 year ago

Hello @Jad-Tawil ,

you are right, this combination has not been implemented yet. It absolutely makes sense to provide corrections in this way and we will provide this option in a future version.

To use your setup right away you may use a hardcoded workaround like this. Disclaimer: I have no hardware to test this, but I hope it will work out.

Jad-Tawil commented 1 year ago

Hello @thomasemter ,

In the hardcoded workaround, it seems like the serial port (settings_->rx_input_correctionsserial) is being used to receive differential corrections (settings->rtcm_version), AND is outputting +SBG +NMEA messages. (Am i correct?)

My desired behavior is to receive differential corrections on this serial port, but to output the SBG and NMEA on the TCP/IP Port (the ethernet connection), which i use for all communications between the host PC and the receiver.

I thought the following would be the hardcoded workaround. Let me know if i am correct:

Command Line commands: sdio, IPS1, none, +SBF+NMEA --- Here, the IPS1 server outputs SBF and NMEA sdio, COM1, RTCMv2, none --- Here, the COM1 port received RTCMv2 corrections, and outputs nothing.

C++ Code: `{

std::stringstream ss; ss << "sdio, IPS1, none, +SBF+NMEA \x0D"; send(ss.str());

} {

std::stringstream ss; ss << "sdio, " << settings_->rx_input_correctionsserial << "," << settings->rtcm_version << ",none \x0D"; send(ss.str());

}`

thomasemter commented 1 year ago

You are partly correct. SBF and NMEA output on the port for the corrections is indeed not necessary but as no streams are spawned, it makes no difference what is defined here. The actual output of SBF and NMEA is on the dynamically assigned rx_port and not on IPS1. So for your application you do not need IPS1 at all.

Jad-Tawil commented 1 year ago

Okay,

So because SBG and NMEA output is not needed on the port for the corrections, this is the only code i need:

std::stringstream ss; ss << "sdio, " << settings_->rx_input_corrections_serial << ", " << settings_->rtcm_version << ", none \x0D"; send(ss.str());

thomasemter commented 1 year ago

Yes, exactly.

tiesus commented 10 months ago

We are currently struggling with the same problem. We connect the receiver via serial an are able to publish the data on the ros topics. Is it possible to send corections via serial as well. If we confugure the ntrip in the receiver and connect the receiver via tcp-ip we are able to receive corrections. But instead of receiving the corrections from the ntrip client on the receiver , we want to send them via serial. Is that possible? Has the rosaic suite a build in ntrip client?

thomasemter commented 10 months ago

This functionality is implemented in the newest version of the driver.

ROSaic has no NTRIP client built in but the receiver itself has.

tiesus commented 10 months ago

Thank you for the fast response. So the receiver needs internet access to receive corrections from a ntrip client via https? I think it's not possible to share internet access to the receiver, if the connection to the machine which runs ROSaic node is via serial?

thomasemter commented 10 months ago

Yes, an NTRIP client can only receive data via https.

Serial and TCP connections need raw RTCM data. You may use a tool like (BKG Ntrip Client)[https://igs.bkg.bund.de/ntrip/bnc] to transfer NTRIP data as RTCM to a serial port of your PC.

tiesus commented 10 months ago

Ok thanks for clarifying. I also read the improvements suggestions: Equip ROSaic with an NTRIP client such that it can forward corrections to the receiver independently of Data Link. I think this is what we are looking for:)

tiesus commented 10 months ago

Just one last question: we need to foward the corrections in the driver directly, since we also receive data from the serial port, so this port is already in use. Can we just use the send method from the the communicator to forward the rctm data to the receiver?

thomasemter commented 10 months ago

The mosaic provides multiple serial ports, which could be used. If that is not possible, you can use a send method in the communicator but you might have to implement another one because this waits for a response and I doubt RTCM data is provoking a response.

tiesus commented 10 months ago

We just tested this combination. Sending corrections from the driver works without a problem. We just added a send method without the response and are able to send rtcm data. USB is used, not serial. I think a build in ntrip client would be much better, but currently we don't have enough time.

thomasemter commented 10 months ago

Great :-)

Out of interest, why don't you use ethernet via USB with the mosaic anymore (cf. issue #99)? USB provides two serial connections, i.e., it should be possible to send RTCM from BKG Ntrip Client via the second serial connection.

Lack of time is also the reason the NTRIP client has not yet been implemented. I think this is quite some effort .

tiesus commented 10 months ago

The reason, why we don't use the built in ntrip client is, that we were faced with network problems unsing the module on the jetson Orin nano and tx2 boards. I think the main reason for this, is that the Thesyscon Usb Driver is not installed on arm. For example on the Orin, if we plug in the septentrio heading board, we cannot connect to wifi anymore, unless we connect with a different device to the same wifi. The Tx2 always creates a new wired connection which makes it difficult to configure the connection. On x86 linux we don't have any problems. So the main reason is, that we need this for Jetson nano boards. We also faced a strange error that we once have to kill the docker container on the jetson boards, because otherwise the gps is not recognized from the driver after a system start.

thomasemter commented 10 months ago

Thank you for the clarification.

I have not yet used any Septentrio receiver on Jetson, only on x86 as well and on a Raspberry Pi. So it might not be related to arm but merely to Jetson or Jetpack with its older Kernel.

wvergouwenavular commented 5 months ago

Hi @thomasemter and @tiesus, I am struggling with the same problem. I want to send ntrip corrections over serial/usb to the Mosaic Go module with an external NTRIP client in ROS, while also receiving the GNSS measurements of the Mosaic Go module over serial. Is this possible on the same serial connection between the Mosaic Go and Jetson?

Or are there other options? For instance, use USB instead of a serial connection? Or will I run into network issues just like @thiesus was having (I am running a Jetson Xavier NX )

tiesus commented 5 months ago

Hi, this should work with the following setup. We only use usb not serial port.

What we do is the following: We connect via tcp(usb emulated) like you find it in this line: https://github.com/septentrio-gnss/septentrio_gnss_driver/blob/d09c6761d3c24b89bee742f38716521df3f50bab/config/gnss.yaml#L5

To get ntrip-corrections to Mosaic module we use a ntrip client node. This ntrip client is publishing corrections via the rtcm message type implemented here: https://github.com/tilk/rtcm_msgs. To the rosaic node we added a callback which receives the data on this topic and sends it to the to the device. For all communication we use the usb connection. What you have to change on the code is the following:

  1. On communication_core.cpp add a send method for rtcm like this: ` void CommunicationCore::sendRtcm(const std::string& cmd) { manager_.get()->send(cmd); }

`

  1. On rosaic_node add a subscriber to the and callback for the rtcm data and send it to the device via the above send method.
wvergouwenavular commented 5 months ago

Thanks @thiesus! I have a NTRIP client which can output RTCM messages directly over serial, but I guess this is not an option since the septentrio node cannot process this?

The tcp(usb emulated) connection just works out of the box? What about also forwarding internet to the Mosaic Go over the same connection to the ntrip client of the module itself? Or will I run into problems with networking just like you described?

tiesus commented 5 months ago

As said you can also take this corrections and send them over usb to the device. You can also forward internet to the mosaic Go, we just don't do it since we had problems with the configuration on some jetson boards which are probably based on the custom kernels. But you can try it. We go for the other option since we lower the configuration overhead and define the functionality in software.

wvergouwenavular commented 5 months ago

Thanks, I'll give it a try and keep you updated!

wvergouwenavular commented 5 months ago

Hi @tiesus,

I connected the module with USB to the jetson, forwarding internet did not seem to work. The ntrip client I am using is able to send RTCM messages directly to a tty port, so I did not change the rosaic node with a callback like you said. After chosing one of the 2 ports provided by the septentrio module, I can see this in the septentrio interface:

image

But the menu on the top right does not show corrections coming in: image

How do I know if the module is correctly interpreting the correction messages and everything is working? Any idea? (:

thomasemter commented 5 months ago

Hi @wvergouwenavular,

you have no PVT yet, so there is nothing to correct. Can you please try again with view to the sky?

wvergouwenavular commented 5 months ago

Hi @thomasemter ,

Thanks for the feedback. I connected a single (simple) GNSS antenna to the receiver and placed it outside:

image

How do I now see if the messages are interpreted correctly? (I see the base measurements quality, is this an indication?) And is there any information about the accuracy of the solution?

thomasemter commented 5 months ago

Hi @wvergouwenavular,

great :-).

You can see the uncertainties as the second values in the Position field. These are still too high for RTK but it usually takes a while to lock in.