-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTK MAvsdk - Implementation #543
Comments
This is not a MAVSDK related issue, but more about your RTK connection. I assume you use PX4? Is the GPS device connected via UAVCAN or UART? You can check whether the PX4 receives enough RTK RTCM messages by typing in the mavlink shell in QGC:
gps_inject_data is the uORB topic containing the RTCM messages being passthroughed from QGC to the GPS module. |
Yes, I am using Px4, We connected GPS to UAVCAN port in Cube Orange. These things are showing in MAVLINK Console.
|
Are you sure this has nothing to do with your (old?) MAVSDK version?
There was a fix at some point: mavlink/MAVSDK#1808 |
Hello , I have updated MAVSDK to latest one using pip3 install --user --upgrade mavsdk then pip3 show mavsdk Name: mavsdk QGCS:(MAVLINK CONSOLE):
Also, I happened to see the issue no. #491 Kindly direct me how to move on from here. Additionally, One thing i observed was when i connected my drone and QGC using mavlink-router, and tested my telemetry.py code to read GPS_fix. It is continuosly reading as RTK_FLOAT. That means a source should continuously publish RTCM data, Is that correct? |
Ok, so the version is good. What's the PX4 version? There have been some changes there as well unfortunately, so I'm wondering if this is working correctly with v1.13.2. With main (going to be v1.14) you need to set https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_PUB_RTCM. |
Px4 version is v1.13.2, Enabled UAVCAN_PUB_RTCM Without opening QGCS , can i able to use RTCM data in MAVSDK Python? I have included below line in my code.
and tested but same FIX_3D only showing in terminal. Edit 2: I have created a code by including rtk import by referring from another issue #419 . Please cross check if this is correct . I didn't modify the rtcm_data in the code.
|
I think you're missing the baudrate there. And then you need to of course actually get that Rtcm data from somewhere. |
Included the above said suggestion , also rtcm_data obtained in listener gps_inject_data after converting to bytearray using the below small python code
Output:
Now Modified the code and it looks like:
Output: Same 3D-FIX. Any example of MAVSDK-Python? |
Sorry to step in again, but just like I tried to convey with my first comment: There are a dozen of possibilities why RTK can go wrong. E.g. from my experience you need the RTCM msg ids 1005, 1077, 1087, 1210 at least (so four different types of messages) from a live(!!) source to actually get into RTK float/fixed. Sending the same RTCM message over and over again won't do you any good. According to https://github.com/semuconsulting/pyrtcm/blob/main/pyrtcm/rtcmreader.py you can read the msg id quite easily: Skip the first 3 bytes and then read the next 12 bits. So I'd expect something like 0x3ED in your message. So maybe let's talk about your setup first? Where does your RTCM data come from? From an own base station? From an NTRIP source? |
@dayjaby RTCM data is coming from Own base station. I have not used NTRIP source. I will try the rtcmreader.py and verify the RTCM msg id. |
@dayjaby I have tried reading msg id from pyrtcm, the result is
I think ,the message id is 1005 Direct me from here, please. |
Just 1005 won't be enough. Is it always the same msg id that you receive? Did you configure your ublox device that you use as base station to also send the other message IDs like 1077? You can do it with the software from ublox itself or use something like pyubx2 to configure it dynamically, e.g. by sending the following messages:
See https://github.com/semuconsulting/pyubx2#serializing how to send such a message |
@dayjaby Sorry for late response, I have tested the following code based on your input.
|
You are doing msg.serialize and serialOut.write as well? Do you receive more messages now? 1005, 1077 etc? |
@dayjaby
But when I tried to SET individually that error was not popping
I don't think I am receiving 1077 and other msg id. I am receiving only 1005. Please suggest me the testing sequence. |
I did a work around, I connected 2 telemetry to my drone, Had 2 individual laptop, One running QGCS with RTK base connected and another one having MAVSDK-Python running. This time, my MAVSDK-Python code able to read RTK-FIX/FLOAT continuously. I tested my Offboard code too, it was moving with precise accuracy. |
@dayjaby , any inputs for this?
|
You are trying to serialize a tuple. You have to serialize each element of the tuple:
|
@dayjaby , I did individually also. This is the output
|
@dayjaby , Please , check this.
|
Well, next step would be to perform a survey in. Have you done that?
To receive some feedback during survey in:
|
No, I haven't done survey-in. I will do once and update you. |
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. |
Hi,
We tested Here3+ RTK in our drone by following the below link from Px4 official website.
RTK Link
In QGCS:
We could able to establish the connection with RTK , The GPS Lock was changed from 3D LOCK to 3D RTK GPSLock(Float)
Problem statement:
I want to test my MAVSDK -Python code by using RTK . For this I closed the QGCS and tested the drone using the below code.
`
I could able to read the GPS Info as RTK_FLOAT but within some time it changed to FIX_DGPS and slowly changed to FIX_3D


Next, I stopped the code and opened the QGCS , the RTK status was active. Upon testing the code again , same problem persist, ie, initially it shows RTK_FLOAT and changing to FIX_DGPS and to FIX_3D
Where I am missing, is there any workaround to use RTK data in MAVSDk-Python or should i use two telemetry.
Ubuntu:18.04 LTS
Name: mavsdk
Version: 0.22.0-4-g92ed890
Summary: Python wrapper for MAVSDK
Home-page: https://github.com/mavlink/MAVSDK-Python
Author:
Author-email:
License: UNKNOWN
Location: /home/murali/MAVSDK-Python
Requires: aiogrpc, grpcio, importlib_resources, protobuf
Required-by:
The text was updated successfully, but these errors were encountered: