I have a question about getting a Mavlink data stream from the Emlid Edge inside of a script (by using DroneKit for Python, or a similar library if one exists). The goal is to stream telemetry from the Edge to a computer on the ground (ground station) which is running Ubuntu 16.04 .
Our setup is a hexacopter with the Edge on board, connected to a Ubiquiti Bullet M2 antenna which is set up to function as a router. The Edge is in client mode and uses the WiFi antenna that was included in the Edge kit to the router. The ground station is also connected to the same router.
Right now, I am able to connect to the Emlid Edge over WiFi by using a GCS like the provided QGroundControl, or MissionPlanner by specifying the IP of the Edge as shown in the router and the default port 14550. This shows all information about the drone.
What I have tried to do within Python - using DroneKit or simply PyMAVLink, is to use various connection strings and configuration options to connect to the Edge to acquire telemetry. From the documentation found on pages such as Mavlink Connection Strings and DroneKit connection strings, I could not find a specific string that would work for connecting a Linux computer to a vehicle over WiFi.
Each computer can see each other on the network, but I do not understand how to work with Mavlink data streams outside of a GCS.
I would appreciate any suggestions for how to create such a connection - perhaps I am missing a step before connecting, using an invalid connection scheme, or not using the correct connection string? Please let me know if you would like some additional information about our setup.
Have you tried to use connection examples using Edge’s IP address, not the localhost?
Hello @gleb.gira, thank you for the response!
Yes, I have been using various strings where the IP address is set to be that of the Edge, for example I tried “(udp|udpout):192.168.1.159:14550” as my connection string and when I do this, I do not receive any errors (like unable to open port) but I am unable to receive a heartbeat from the Edge when I use the connection.wait_heartbeat() or Dronekit’s analogue to that.
Does the Edge require me to do something prior to listening to it’s Mavlink datastream? The GCS is able to listen to it without any extra steps, so I doubt that is the case.
Sorry it took so long to get back to you.
Generally, we set up an IP of a GCS on a vehicle to establish a data transmission between our devices. On Edge, it works vice versa: GCS connects to Edge IP address. I believe that might be a reason for your difficulties with DroneKit installation and I recommend looking into that.
I’m afraid we’ve never tried running DroneKit on Edge. Although it should work, however, Edge is not designed for running custom scripts or software. That’s why I hardly can provide you with any certain recommendations on this question.
Hope there will be somebody from our users who has such an experience with Edge and DroneKit.
Thanks for the update @gleb.gira!
My initial post was not clear about this, but we never intended to run DroneKit on the Edge, instead we were trying to run it on our companion computer in order to grab telemetry directly into a script for processing. We were not able to come up with a connection string on the companion computer that would initiate a connection to the Edge. This should be the same IP as the one we are able to use to connect from our ground station computer, but unfortunately neither DroneKit nor just PyMAVLink is able to provide any information due to a lack of heartbeat on the link.
Let us know if you have any thoughts on this.
Any progress on getting the vehicle connected? I’m starting to get into a similar project but instead using the Navio2 but this should be quite similar. I found a short Youtube introduction on this, that is part of a series. Not sure if it will be of any help but here’s the link: https://www.youtube.com/watch?v=pcVe45DCV8A&list=PLgiealSjeVyx3t4N9GroE29SbVwhYrOtL&index=13
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.