Where I can modify the code for an asymmetry quad-rotor

Firmware/software/electronics/mechanics
Post Reply
qingyinana
Beginner
Posts: 3
Joined: Fri May 31, 2019 7:22 pm

Where I can modify the code for an asymmetry quad-rotor

Post by qingyinana » Fri May 31, 2019 8:30 pm

Hi all,
:lol:
I designed a morphing quad-rotor. However, this morph leads to the relative rotation between four rotor and flight controller,which means the quad-rotor is no longer symmetrical any more. So in order to keep its flight stable, I think I need to modify the parameter of each rotor position, but I can not find where I can modify the code related to the geometry change.

It seems 'crazyflie-firmware-master/src/utils/src/lighthouse/lighthouse_geometry.c' file includes some information about the flight controller, but I can not find the information about the airframe.

I have tried to tune PID or modify power distribution, but they both did not work when morphed, would you like some thoughts on this issue -- I'm pretty pretty thankful.

It has been a long process of trial...any advice or comment are welcome!

Na



kimberly
Expert
Posts: 111
Joined: Fri Jul 06, 2018 11:13 am

Re: Where I can modify the code for an asymmetry quad-rotor

Post by kimberly » Wed Jun 05, 2019 12:56 pm

Hi Na,

THat sounds like an awesome platform :D. It seems like you were on the right path with changing the power distribution (power_distribution_stock.c), that could be the easiest solution. The next step could be to define your own motor mapping, but to be honest I don't have that much experience with that. Probably Tobias would be able to help you further but he's on a holiday this week, so I will mention this to him once he's back.

qingyinana
Beginner
Posts: 3
Joined: Fri May 31, 2019 7:22 pm

Re: Where I can modify the code for an asymmetry quad-rotor

Post by qingyinana » Thu Jun 06, 2019 7:07 pm

Hi Kimberly,

Thank you for your timely response, and I like this forum :lol: .

I will keep following this post and hope to get advice from your team.

Na

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

Re: Where I can modify the code for an asymmetry quad-rotor

Post by tobias » Mon Jun 10, 2019 3:00 pm

Kimberly is on the right track. You will have to create a function in power_distribution_stock.c (or a new file) that distributes the power according to your geometry.

qingyinana
Beginner
Posts: 3
Joined: Fri May 31, 2019 7:22 pm

Re: Where I can modify the code for an asymmetry quad-rotor

Post by qingyinana » Mon Jun 10, 2019 10:37 pm

Hi Tobias,

Thank you for your confirmation, which gave me a lot great confidence to continue this path.
Go on testing...

Na

Post Reply