[SOLVED] Real Thrust[N] or Accel[m/s^2] vs input Thrust[16Bit]

Firmware/software/electronics/mechanics
Post Reply
kato
Beginner
Posts: 13
Joined: Tue Dec 14, 2021 4:10 am

[SOLVED] Real Thrust[N] or Accel[m/s^2] vs input Thrust[16Bit]

Post by kato »

Hi!! Thank you for your continued business always. 
I want to use cmdVel command in Crazyswarm and input is Thrust(16bit) and roll, pitch(degree), yaw_rate[rad/s].
My question is that ""Is there exit some map to real thrust[N] from input Thrust[16bits] or Is there exit some map to real acceleration[m/s^2] from input Thrust[16bit] ???""

Now I posted another question viewtopic.php?t=5189. So, I'm sorry for posting multiple questions in this forum.

Thank you for giving me your valuable time.
Thanks.
Last edited by kato on Fri Jan 07, 2022 1:10 pm, edited 1 time in total.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Real Thrust[N] or Accel[m/s^2] vs input Thrust[16Bit]

Post by kimberly »

Hi again :D

Here is some documentation about thrust measurements based on input: https://www.bitcraze.io/documentation/r ... to-thrust/

Also here is a blogpost on more newer thrust stand, but we haven't updated the last page of that as well with newer measurements yet.

is this a bit what you are looking for?
kato
Beginner
Posts: 13
Joined: Tue Dec 14, 2021 4:10 am

Re: Real Thrust[N] or Accel[m/s^2] vs input Thrust[16Bit]

Post by kato »

Thanks!!.
That's very helpful.

Now, I have a new question about the map.
The inverse function of this map(thrust[g] = 0.409e-3*pwm[8bit]^2 + 140.5e-3*pwm[8bit] - 0.099) which is described on web site is used in some code?
I think there is above function in some code because I think that the thrust calculated in some controller (e.g Mellinger) unit [g] or [Kg].

I found the map(volt[V] from thrust[g]) in https://github.com/bitcraze/crazyflie-f ... #L152-L173.
I think these lines calculate this flow.
line 168, calculate thrust(g) from "ithrust"(16bit)
line 169, calculate volt(V) form thrust(g).
line 170, calculate pwm(%) from volt(V) and supply-volt(V).

What is "ithrust" used in line 168? I think it is calculated from the above inverse function(pwm[8bit] form thrust[g]) (and convert pwm[8git] to thrust[16bit]).

I used this question as a reference.
viewtopic.php?p=22957#p22957
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Real Thrust[N] or Accel[m/s^2] vs input Thrust[16Bit]

Post by kimberly »

hi!

Sorry for the late reply! As you noticed perhaps, we were a bit understaffed during the holidays.

ithrust is calculated here in the power distribution based on the output of the controllers: https://github.com/bitcraze/crazyflie-f ... c#L84-L131.

It's a bit unit less as it indicates more of an percentage or ratio somewhat... but have you seen the explanation above the motorsCompensateBatteryVoltage() that you gave in the last post? That also explains the fit that was done for this compensation function.

Anyway, if you have more question, best to start a new thread for those. It's still a bit empty at the office but people will start coming back starting next week!
kato
Beginner
Posts: 13
Joined: Tue Dec 14, 2021 4:10 am

Re: Real Thrust[N] or Accel[m/s^2] vs input Thrust[16Bit]

Post by kato »

Thank you for answering my huge questions.

Eventually, I figured out thrust calculation part of mellinger controller!!.
Thank you for your continuous support. :D :D
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: [SOLVED] Real Thrust[N] or Accel[m/s^2] vs input Thrust[16Bit]

Post by kimberly »

awesome and your welcome!

Good luck and you know where to find us if you have any additional problems :D
Post Reply