[SOLVED] Change default thrust level for altitude hold

Post here to get support
Post Reply
Phasitron477
Beginner
Posts: 8
Joined: Tue May 02, 2017 8:29 pm

[SOLVED] Change default thrust level for altitude hold

Post by Phasitron477 »

Hello everyone,

I saw a post on this forum left a while ago that says it's possible to change the default altitude hold thrust value on the crazyflie client. I looked all over the configuration folder, but I didn't see anywhere where it looked like the value could be changed or scaled. Where do I have to go to edit this? Or is it part of the crazyflie firmware? I would like to change this value to something higher when I have a payload attached, otherwise it just comes down and bounces on the ground.

Thanks for the help!
Luke
Last edited by Phasitron477 on Tue May 23, 2017 9:59 pm, edited 4 times in total.
derf
Expert
Posts: 163
Joined: Fri May 31, 2013 12:17 am
Location: Germany

Re: Change default thrust level for altitude hold

Post by derf »

Hi Luke,

You can find the INITIAL_TARGET_HEIGHT here:
https://github.com/bitcraze/crazyflie-c ... t__.py#L67

It would be nice to have a control to change the target height in the UI, maybe you want to create a feature request or even a pull request for it?

Regards,

Fred
Phasitron477
Beginner
Posts: 8
Joined: Tue May 02, 2017 8:29 pm

Re: Change default thrust level for altitude hold

Post by Phasitron477 »

I think that just changes the initial height when the crazyflie is using the z-ranger deck for height control; I want to change the default thrust from 50% when using the altitude control. Or do I have to recompile the client after making the change? How would I go about creating a feature or pull request?

I apologize in advance if any of these questions sound silly, I don't have much experience developing/programming and the experience I do have is mostly self-taught.

Thanks!
Luke
derf
Expert
Posts: 163
Joined: Fri May 31, 2013 12:17 am
Location: Germany

Re: Change default thrust level for altitude hold

Post by derf »

Hi,

You are absolutely right, I confused altitude hold with height hold. :oops:

The thrust value works differently in altitude hold.
When you activate the hover mode, the default value is always 32767.
If you increase thrust the Crazyflie should climb up, if you decrease thrust it should go lower.
So, if the default value is higher than 32767 it will always climb up.

AFAIK it should hover independently of the payload.
@Arnaud: Is my assumption correct?

Regards,

Fred
Phasitron477
Beginner
Posts: 8
Joined: Tue May 02, 2017 8:29 pm

Re: Change default thrust level for altitude hold

Post by Phasitron477 »

Okay, so after playing around a bit more I think I found out what the problem is. In the client where it displays the estimated altitude it always reads "not set", even after flying the quadcopter to a target altitude and pressing the altitude hold button on the gamepad. As a result, the thrust stays at 50%. Could this be a bug with the client maybe?

Thanks!
Luke

*EDIT* I reinstalled the 2016.4 release of the client and altitude control worked. It seems that for some reason the new version (2017.4) does not.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Change default thrust level for altitude hold

Post by tobias »

I've noticed similar behavior in 2017.04. I'm crating a github ticket for it.
Phasitron477
Beginner
Posts: 8
Joined: Tue May 02, 2017 8:29 pm

Re: Change default thrust level for altitude hold

Post by Phasitron477 »

Okay, I'll mark this thread as solved.

Luke
Post Reply