2

I want to control Ardupilot drones (for example in Gazebo simulator) using C++ (NOT ROS). Dronekit is a great tool for python but I want something similar using C++.

MAVSDK is only compatible with PX4 but I need it for Ardupilot.

Is there C++ SDK for Mavlink - Ardupilot? thanks.

Roy Amoyal
  • 717
  • 4
  • 14

4 Answers4

0

You can generate C++ MAVLink bindings for ardupilot using the mavgen utility and the ardupilotmega.xml MAVLink dialect file. Usage is documented in MAVLink's library generation page

alielbashir
  • 315
  • 2
  • 9
0

Generate C++ MAVLink bindings is not considered an SDK. It will generate classes that you can use for your SDK to communicate via Mavlink. But still you need to write alot of code to connect and communicate the right messages to drone especially when uploading and downloading missions.

Sorry there is no a golden bullet here but this link will help you if you want to build one.

M.Hefny
  • 2,677
  • 1
  • 26
  • 30
0

You may use MavLinkCom by Microsoft: https://github.com/microsoft/AirSim/blob/master/docs/mavlinkcom.md

While the documentation says it is for PX4, you could definitely use just the default "common" dialect of MAVLink. Alternatively, you may regenerate the message classes by building MavLinkComGenerator and running it on ardupilotmega.xml .

kshahar
  • 10,423
  • 9
  • 49
  • 73
0

MAVSDK does have (some) Ardupilot support. Not everything will work, but users have had success flying missions.

There is a CI job running integration tests against an Ardupilot SITL.

It is admittedly not as mature as PX4 support, but PRs are welcome!

JonasVautherin
  • 7,297
  • 6
  • 49
  • 95