Custom ANAFI Controller

Hey there, looking to see if it’s feasible to control a Parrot Drone (most likely ANAFI) through a custom controller/ computer. My current control hardware that I’d like to incorporate ANAFI with runs Ubuntu 16.04 and a primary application in C++ / Qt.

After snooping around on this site for a while, it seems to me that the GroundSDK might not be what I need since that assumes your target controller runs Android or iOS. It also seems that the Olympe tool might not be exactly what I need either since it is written for Python and integrating that with my current control application wouldn’t be straightforward. Please correct me if I’m wrong on those assumptions.

Should I stick to just using the DroneCodeSDK to send raw MAVLink messages to ANAFI, or try to incorporate some of these devtools into my project?

Thank you for the advice and help,
Mitchell

Hey there @mburgund,

If it inspires you in some way, I also need to control the drone in an automated way by means of a system. I am using ROS, as it allows me to run seamlessly both C++ and Python code, and there are tons of available plugins for other components. What I am currently doing is to interface Olympe in a ROS node, though it is not the most straightforward way to do it.

Hope it is of some help to you!

espetro

I’ve decided to stick to the DroneCode SDK, it might not be as easy as the GroundSDK or Olympe, but I’ll get exact control with the whole suite of MAVLink messages, and in C++ to boot.

Unfortunately for this project it’s not that feasible to get ROS integration for the amount of time I have, but maybe in the future I’ll take a shot at it.

Thanks for the help

Hey @mburgund I am curious about how to do it with the DroneCode SDK, are you reading any tutorial or guide? Could you share it?

Thanks in advance!

I’m using the documentation on the Dronecode SDK site here: https://sdk.dronecode.org/en/
Seems like a good fit so far, builds in C++, has plenty of diverse functions for drone features so you don’t have to interact with raw MAVLink messages, and they provide most functions with a synchronous and an asynchronous option which is pretty handy. Plus there’s a couple of premade example apps that you can build and are good references.

However, I haven’t been able to test anything I’ve written yet due to lack of controller hardware. So if you want to give it a go, you’ll probably get farther than I can, so let me know how it goes :laughing:

1 Like

The link doesn’t seem to work…!?

That’s bizarre… It was working as recent as a few hours ago. I’ve been working with it all day and now when I refresh it, it’s disappeared.

For some reason it looks to me that the developers behind it are changing the name from DronecodeSDK to MAVSDK on github, maybe all the links to the documentation are temporarily broken while they migrate it. https://github.com/mavlink/MAVSDK

I was thinking kind of the same “moving/migrating” data :wink:

Thankx for the answer ! I’ll test it tomorrow.

Did your anafi answered your mavlink messages ? if yes what were those messages ? :wink:

('cause mavsdk seems to be for pix4!?)

Haven’t quite been able to test it with hardware yet, but I might be able to post some good results tomorrow :crossed_fingers:

As of right now the documentation is back https://sdk.dronecode.org/en/

yes thx bis !

Confirming the pix4 “thing” : " The SDK has been designed to manage aircraft that use the PX4 autopilot…other autopilots may well work, but, they are not explicitly supported and are untested."

How’ is your hardware in the loop test doing today ? :wink: :stuck_out_tongue:

I’m currently trying to build olympe on a Pi for my anafi custom controller … not done.

I’m also curious. Where have you find any information regarding a MAVLink protocol support for Anafi ? … because it isn’t there (yet). :no_mouth:

I’m beginning to believe this is all a big misunderstanding. I was under the impression from speaking with a sales representative that Parrot ANAFI ran on PX4 autopilot and MAVLink messaging. Since that seems to be the case, it looks like I have two options: 1) rewrite my application with GroundSDK, which seems to be for Android or iOS, not plain old Linux C++; or 2) get a different drone that does run PX4 and MAVLink, but with limited funding and time remaining.

This seems to be a pretty big misunderstanding indeed. I am really sorry to hear that.

Parrot ANAFI does not run on PX4 autopilot. The Anafi is compatible with Pix4D Capture, a mobile APP from Pix4D. I definitely see a source of confusion coming from there… Anyway, I really hope you will be able to reach a satisfactory outcome.

Just to clarify a few things, the SDK for Anafi is composed of:

  • Ground SDK Mobile that is targeting iOS (swift) and Android (java).
  • Olympe targeting Linux (Python)

They both rely on libarsdk and libarsdkctrl that are written in C. So you can always implement your C++ application on top of these C libraries.

Alternatively, if you want to write your application in C++ for Linux, you can wrap your application with PyBind11 (or any other python binding generator you’d feel comfortable with) and call it from a Python process that is running Olympe.

Regards

Nicolas