Crazyflie2.0 Hovering code

Firmware/software/electronics/mechanics
Post Reply
lion7102
Beginner
Posts: 4
Joined: Tue Jan 10, 2017 9:14 am

Crazyflie2.0 Hovering code

Post by lion7102 »

https://wiki.bitcraze.io/projects:crazy ... itude_hold
this site describes about hover mode in Crazyflie2.0
So, I want to know where code about hover mode is.
I expect to help by anyone :lol:
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie2.0 Hovering code

Post by arnaud »

What part are you interested in, the client side or the crazyflie side? There is a quite long chain of code involved in altitude hold from the gamepad handling down to the position controller in the Crazyflie.
lion7102
Beginner
Posts: 4
Joined: Tue Jan 10, 2017 9:14 am

Re: Crazyflie2.0 Hovering code

Post by lion7102 »

Thanks for the answer. I uploaded the px4 firmware to Crazy Fly.
And I succeeded in putting the motion capturing data in the local position pose.
So, I tried to find the hovering mode in qgc, but I could not find hovering mode even if I tried all flight modes. :cry:
I'll be waiting for your help.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie2.0 Hovering code

Post by arnaud »

The PX4 firmware port was contributed and I have no idea how it is implemented so I am not going to be able to help.

The altitude hold described in our wiki is implemented in the Bitcraze crazyflie-firmware (the stock one) and the stock Crazyflie-client. Maybe someone passing-by will know about PX4, otherwise I suggest you try asking the PX4 project or the person responsible for the port.

By the way, out of curiosity, what is the reason that made you use the PX4 firmware instead of the stock one?
lion7102
Beginner
Posts: 4
Joined: Tue Jan 10, 2017 9:14 am

Re: Crazyflie2.0 Hovering code

Post by lion7102 »

Thank you so much :D . I use px4 because px4 is widely used.
So, Crazyflie is going to expand to start.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie2.0 Hovering code

Post by arnaud »

Depending on what you are trying to do you might want to have a look at the Bitcraze firmware as well. As far as I understand the PX4 firmware has much more advanced functionality but the Bitcraze firmware is simpler and so might be easier to expand for specific needs.
Good luck with your project!
nanobot9000
Beginner
Posts: 26
Joined: Mon Apr 11, 2016 4:33 pm

Re: Crazyflie2.0 Hovering code

Post by nanobot9000 »

Just to piggyback on this question is it possible to create a version of the firmware where the altitude hold is always enabled? Setting a value to TRUE in the commander.c? This is not my area at all, and I know you said it is in multiple places, but it would be nice to have a version where it is enabled or at the very least not momentary - toggling it on and off with the controller rather than having to hold the button down to keep it engaged.

Thanks! :)
Post Reply