So, the best option is Python via Olympe for command and control + some bridge to your C++ libs, or you can try using arsdk natively in your app, but that’s a lot of work.
Jerome - if we were to go the arsdk route is there documentation anywhere on the protocol, etc.? Or is my best bet again to look at the Olympe source code?
Does a C/C++ SDK exist for Windows applications? If so I wonder if I could start with it and port that to Linux…
Documentation is the source code itself
As we do not support Windows officially, there is no app to my knowledge.
MAVSDK has a MAVLINK library for C++. but does the ANAFI drone support MAVLINK?
We support some MAVLink commands for live piloting and some MAVLink commands for automated mission piloting.
How can these be received by the drone? Can I just send them to <ANAFI_IP>:<ANAFI_MAVLINK_PORT>? Or do we have to send them via the GroundSDK?
Does the ANAFI publish any information out over Mavlink?
Is there any documentation for the live piloting commands? Can it receive live piloting commands and missions via UDP? Are these points possible via UDP over radio:
- Receiving telemetry from the drone via MAVLink.
- Sending live piloting commands via MAVlink.
- Sending missions via MAVLink.
- Video stream & capture via MAVLink.
Check this list :
We are updating our documentation
Jerome,
What port do I communicate with the ANAFI in for Mavlink? The standard 14560? Do I need to enable this somehow or is it always there?
Thanks!
This is very handy, thanks! What ports to the ANAFI run mavink on? I cannot seem to detect any outgoing MAVLINK packages on any ports when running Sphinx. Must it be enabled somehow?
Hi all,
Listening port on anafi firmware side is 14551.
For the mavlink protocol to be active, a wifi interface is needed on the pc running the simulator and this wifi interface needs to be active for the simulated drone firmware.
See How to connect to the simulated drone — Parrot-Sphinx 1.2.1 documentation for details.
Regards
So i need two wifi-interfaces to gain access to the MAVLINK traffic? I have done this previously with one wifi-interface and i do not see any MAVLINK messages. Is is possible to get access to the traffic on the stolen interface?
What about for a real ANAFI? Any special requirements to get things setup and running with Mavlink on it?
Nope, it’s a built-in feature.
Do you have a how-to or some tips on getting this to work? I.e running mavlink traffic on the host simulating the drone? Having two wifi-interfaces on a linux machine is not an easy task without some tinkering. @Jerome Do you know why the MAVLINK protocol does not run on the Vitrtual Ethernet interface of the simulated drone? This should definitely be a feature for the Sphinx simulator.
Finally got it working: Added an extra wifi-interface to the host computer, connected it to the AP created on the stolen interface and eureka, got a bunch of MAVLINK heartbeats from the drone!
So I am seeing the heartbeat broadcast from the drone, but none of the other messages at the link you provided…
When I subscribe to a message (a COMMAND_LONG with MAV_CMD_SET_MESSAGE_INTERVAL) I see the requested message at the desired rate for a few seconds, then it stops sending the message. In fact, I request just SYS_STATUS at 1 Hz and I see a whole lot more traffic on the network with tcpdump…
Any ideas why it stops sending messages? Do I need to continuously ask for them to be sent? Where am I going wrong?
Thanks!
It looks like the ANAFI requires the Mavlink component it is communicating with to be issuing a regular heartbeat. Now that I have that in place I am getting the data I need.
A few more related flight control questions on Mavlink:
-
What command sequence is required to get the drone to takeoff? I have found that it does not seem to respond to an ARM followed by a MAV_CMD_NAV_TAKEOFF and I believe it is because it does not ARM. Do I need to be in a certain mode for ARM to take effect? All I got from the docs is “drone must be armed to react” however I am trying to arm it…
-
How can I switch modes? The SET_MODE command does not seem to have any effect. I have tried switching to an autonomous mode so I can send MAV_CMD_DO_REPOSITION but can’t seem to get it in any mode other than POSCTL - this is also from the SkyController; nothing seems to get it to leave POSCTL mode.
-
Any other guidance on the nuances of Mavlink control of the ANAFI?
@vegovs, have you learned anything in your tests with the simulator? I haven’t had any luck getting the simulator running at all since I don’t have access to a Ubuntu 18.04 box and VM is out of the question, so I’d love to hear your thoughts!
Thanks all!
I suggest you download and use QGroundControl , it works with Anafi and that will let you see the command sequences.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.