Effacer les filtres
Effacer les filtres

Communication between MATLAB and Crazyflie

34 vues (au cours des 30 derniers jours)
Shivam Bajpai
Shivam Bajpai le 17 Juil 2024
Réponse apportée : Mourya T le 18 Août 2024 à 0:42
I want to send commands from MATLAB/Simulink to Crazyflieb 2.0. How can I do it?

Réponses (2)

Anagha Mittal
Anagha Mittal le 19 Juil 2024
Hi,
For MATLAB and Simulink to communicae with Crazyflie, it is important that you have the UAV Toolbox installed which is required for MAVLink support.
To start understanding the simulation environment and way to configure your model, you may download the MATLAB File Exchange example "Crazyflie Quadcopter Simulation Using Simmechanics" from the following link:
This has an example MATLAB file by the name "Crazyflie_Param". You may set the parameters similarly.
Next, to communicate you may setup MAVLink Connection by using the "mavlinkio" function. Refer to the following documentation link for more details on MAVLink Support:
This will help you in setting up the environment.
Hope this helps!

Mourya T
Mourya T le 18 Août 2024 à 0:42
I am planning on using ros toolbox and crazyswarm, so then publishing directly on cmdFullStateMsg would work, where the trajectory planning or other pipeline can be implemented in matlab for testing.
cmdFullStateMsg = rosmessage("crazyflie_driver/FullState");
I found another thread related to sending rosmessage to crazyflie as below,
Hope this helps.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by