Nonparametric machine learning model written in CF2.1 firmware.

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
imranmomtaz
Member
Posts: 36
Joined: Tue Mar 17, 2020 7:01 pm

Nonparametric machine learning model written in CF2.1 firmware.

Post by imranmomtaz »

Hello,
Is there any nonparametric machine learning model written in CF2.1 firmware? I am specifically looking for a nonparametric machine learning model for regression operation. It can be decision tree, gaussian process regression anything. Thanks a lot in advance.
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Nonparametric machine learning model written in CF2.1 firmware.

Post by whoenig »

I am only aware of parametric ML models (e.g., Deep FeedForward Neural Networks: https://github.com/TaoChenOSU/quad_nn) with online inference (not learning). However, if you can find any pure C implementation of your desired nonparametric model, it should be possible to add to the firmware. Note that you are of course limited in terms of memory and computation. Ideally, your model would not require any dynamic memory allocations.
imranmomtaz
Member
Posts: 36
Joined: Tue Mar 17, 2020 7:01 pm

Re: Nonparametric machine learning model written in CF2.1 firmware.

Post by imranmomtaz »

Thank you for your reply. However, I am also looking for implementation in C. Is there anybody who know of any such implementation? Thanks.

On a different note, I think it possible to have a cpp file as extern which would implement a regression model. Is there any work which does this?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Nonparametric machine learning model written in CF2.1 firmware.

Post by arnaud »

About the cpp, if you can generate a lib without any dependencies, you can then link it with the crazyflie without problem (you would just have to add yourlib.a to the PROJ_OBJ list in your makefile). I have already done that with Rust for example. However I have also tried to compile CPP directly in the Crazyflie (ie. compile the Crazyflie with the CPP compiler) and this did not work at all. So the solution is to compile a static lib that exposes C functions and then link it to the Crazyflie firmware.
Post Reply