MAVSDK-Python icon indicating copy to clipboard operation
MAVSDK-Python copied to clipboard

RTK client msg FROM ntrip server

Open g1tm4n123 opened this issue 3 years ago • 10 comments

can you show me an example, the use of mavsdk RTK plugin?

i connected to the vehicle on serial port and i have an ntrip server await PXvhc.connect(system_address="serial:///dev/ttyUSB0:...") ntrip caster xxx.xxx.xxx.xx ntrip port 2101 ntrip mountpoint blox ntrip username user ntrip password pwd

Vehicle: Pixhawk RTK rover: F9P

_setup_stub(self, channel) channel? send_rtcm_data(self, rtcm_data) from ntrim to rtcm_data?

g1tm4n123 avatar Jun 22 '22 16:06 g1tm4n123

@CY-1992 @Katawann @AlexisTM: Would one of you be willing to contribute an example? :blush:

JonasVautherin avatar Jun 22 '22 17:06 JonasVautherin

Hi @g1tm4n123,

I used the RTK plugin with MAVSDK-C++, but you should be able to make it work the same way with Python. If you can get the RTCM data, you need to send the information with send_rtcm_data back to your FCU. You also have to send your GPGGA data back to the Ntrip server you are connected to every X seconds

The Ntrip client from MAVProxy here could be helpful to make sure you did not forget anything

Also there was a bug in the RTK plugin here but which has been fixed since. Not sure if MAVSDK-Python already have this fix. If not, it means you need to truncated the data by yourself before to send it with the MAVSDK plugin. A good example can be found in the MAVProxy code here

Let me know if it works !

Katawann avatar Jun 22 '22 17:06 Katawann

Thanks, but I can't run MAVProxy and MAVSDK together when MAVDSK running: MAVProxy says: NO LINK when MAVPROXY running: MAVSDK says: not connect

I want to use only MAVSDK (Python)

PX Vehicle => Linux USB port F9P RTK rover => PX Vehicle TELEM2 port ntrip running: UBLOX server

According to these simple example, I was able to solve many tasks. Can you show something like this in these ntrip MAVSDK topics? PLS

g1tm4n123 avatar Jun 22 '22 19:06 g1tm4n123

Oh, maybe MAVSDK-Python does not have the rtk plugin yet, does it? That would come with the next MAVSDK-Python release

JonasVautherin avatar Jun 22 '22 20:06 JonasVautherin

Indeed, which means @g1tm4n123 you need to wait for the next release or do the job with MAVSDK C++

Katawann avatar Jun 22 '22 20:06 Katawann

See https://github.com/mavlink/MAVSDK-Python/pull/485

JonasVautherin avatar Jun 22 '22 20:06 JonasVautherin

I don't have a setup to test it 😞

AlexisTM avatar Jun 23 '22 06:06 AlexisTM

@JonasVautherin v1.4.2 doesn't include the RTK fix yet. I will make another backported release.

julianoes avatar Jun 23 '22 11:06 julianoes

https://github.com/mavlink/MAVSDK/releases/tag/v1.4.3

julianoes avatar Jun 23 '22 12:06 julianoes

I updated #485, as soon as it's merged I can make a MAVSDK-Python release :+1:

JonasVautherin avatar Jun 23 '22 15:06 JonasVautherin

The MAVSDK-Python Rtk plugin should now work.

This is the fix on the C++ side.

You need mavsdk_server version v1.4.16 and MAVSDK-Python v1.4.8.

Example how to use the Rtk Plugin in Python: rtk.py.

julianoes avatar Jun 06 '23 20:06 julianoes