-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Add Functionality to Broadcast to Interface without Explicit Vehicle Connection #1252
Comments
Would you mind sharing which MAVLink messages are being sent for RTK? I think it may make sense to add them in MAVSDK (instead of having to use the passthrough).
I would need more details about what you mean by "broadcast", because I find it generally ambiguous. Do you mean that you expect MAVSDK to send the message once over the air and have it reach all your vehicles, or do you want a helper such that you don't have to write a for loop to send the message once per discovered system? |
This is the functionality in QGC. It is sending GPS_RTCM_DATA. I think the broadcast of RTCM data in QGC is similar to how the heartbeat message is sent. A helper that could be called that you pass the RTCM data and the interfaces you want it broadcast over would be helpful. Maybe this doesn't align with mavsdk and I should just implement it using the c mavlink headers like QGC does. |
MAVSDK does not allow to broadcast messages right now. So right now it would just do the same loop as you do 👍. I am not sure if broadcasting is in the scope of MAVSDK right now, because many things are not expecting to be broadcasted, right? Like all the commands, or basically any targeted message. Or is that incorrect? |
I'm digging through QGC and it looks like it is also looking for vehicle heartbeats then sending targeted messages to them. So I'm not sure it is possible to broadcast to the entire network without knowing what the vehicle IP's are. |
I was able to implement this functionality using the mavlink C library. I still think the ability to broadcast using mavsdk would be very useful to a lot of people in the future. You can leave this open or close it if you like. Broadcasting over serial is easy. Here is the UDP broadcast code:
|
I understand that broadcasting some messages may make sense (typically a GNSS base station wants to do just that). But at the MAVSDK level, the user does something like I don't think it is trivial, but of course we are open to PRs if somebody figures out an nice API doing that in MAVSDK 😊. |
Maybe this is a hint that the MavlinkPassthrough plugin should not be a plugin but a direct API of the Mavsdk class. We could then add some sort of flag to signal the broadcast option. |
I am working on recreating the QGC RTK Base station functionality in a C++ application on a raspberry pi. I have the PX4 GPS driver running and now I am trying to figure out how to get mavsdk to broadcast the RTK corrections to all vehicles on two different interfaces. One serial and the other is UDP.
It does not appear that mavsdk can do a broadcast to all connected vehicles. My approach is to discover all connected vehicles on the serial and UDP connections, then iterate through all of them doing a mavlink passthrough message to send the RTK corrections to each vehicle independently.
The text was updated successfully, but these errors were encountered: