matlab .m file in Crazyflie 2.0 flash

Firmware/software/electronics/mechanics
Post Reply
Baosai
Beginner
Posts: 2
Joined: Mon Jun 08, 2020 8:49 am

matlab .m file in Crazyflie 2.0 flash

Post by Baosai »

Hello, for my Master thesis I want to implement a Model Predictive Control for position and trajectory control on the Crazyflie using the lighthouse positioning deck. The controller is designed in Matlab, preferably it should be a nonlinear MPC. Is there a known framework to have an .m file compiled and then flashed on the Crazyflie so that the code doesnt have to be transformed manually?

Thanks in advance for your help!

tobias
Bitcraze
Posts: 2013
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: matlab .m file in Crazyflie 2.0 flash

Post by tobias »

I read a paper somewhere were they explained how to transfer simulink to c-code and run it on the Crazyflie. Can't remember where though, darn... This thread talks about it briefly. With some internet searching you might find it. What will not work is to run .m files on the Crazyflie. It needs to be converted to C.

wydmynd
Member
Posts: 43
Joined: Thu Dec 06, 2018 9:25 am

Re: matlab .m file in Crazyflie 2.0 flash

Post by wydmynd »

its called matlab coder. It is an add-on that you have to buy.. I used it with other STM32 projects so technically it should be no problem with CF.

kristoffer
Bitcraze
Posts: 280
Joined: Tue Jun 30, 2015 7:47 am

Re: matlab .m file in Crazyflie 2.0 flash

Post by kristoffer »

Thanks for the info!

Post Reply