MATLAB wrapper for MAVSDK


I would like to be able to communicate with my drone from MATLAB through MAVSDK.
Are there any plans to develop a MATLAB wrapper for MAVSDK?

If not, my idea was to build an interface to the MAVSDK C++ API using the approach described here:

Any suggestions?

Hi @simopanzer,

Could you elaborate more on what is your requirement to access MAVSDK from MATLAB? For ex - Do you want to control the drone by executing MATLAB commands? Do you want to deploy your ‘MATLAB/Simulink’ code which can access MAVSDK to companion/offboard computers?

@asheshad essentially I would like to have a MATLAB interface which gives me access to the MAVSDK API.
In particular, for my purposes I need to send setpoint commands to the vehicle (which can be done by means of the Offboard class) and receive measurements and estimates from it (Telemetry class).

I tried to follow the approach I mentioned in my previous post (using the MATLAB clibgen package) to wrap a C++ library into a MATLAB interface; basically it is a semi-automatic procedure which, given the headers and the binary code of the library, generates an interface definition file which can then be called from MATLAB.
However, apparently in this case it is not so straightforward to apply this procedure to the MAVSDK C++ core library, since clibgen is not able to handle certain C++ constructs; so probably it takes some effort to manually prepare the interface definition file.

By the way, I found out that since the R2019a release, MATLAB offers support for MAVLINK communication within the Robotics system toolbox:

Hi @simopanzer when you say you want to communicate MATLAB with your drone, do you mean an actual running instance of MATLAB? If that is the case, a good starting point would be:

This one exposes how to read and write a parameter, but you could modify it to read any MAVLink message.

@malife yes exactly, I would like to send commands from an instance of MATLAB running e.g. from my laptop.

Gonna try the examples described in the MATLAB Robotics system toolbox doc.

Hey @simopanzer , I got your post highlighted while searching for something similar.
I have not started with the UAV Toolbox documentation as of now but would love you hear out your experience with it?
Basically even I am looking for a MAVSDK-CPP or MAVSDK-Python alternative like MAVSDK-MATLAB
Lemme know!