altitude hold/hover

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
ycolmenares
Beginner
Posts: 10
Joined: Tue May 15, 2018 7:39 am

altitude hold/hover

Post by ycolmenares » Wed May 16, 2018 2:36 pm

Hello all,

Has someone written a code for altitude hold/hover? that I can use it on my crazyflie1.0.

Thanks in advance

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

Re: altitude hold/hover

Post by tobias » Fri May 18, 2018 6:56 am

I think altitude hold should work out of the box on 10dof variant (pressure sensor might need foam isolation). Hover does not work though.

ycolmenares
Beginner
Posts: 10
Joined: Tue May 15, 2018 7:39 am

Re: altitude hold/hover

Post by ycolmenares » Tue May 22, 2018 12:47 pm

Thanks for your reply!
Currently I'm working on a new proyect, but every time I try to flash the firmware I get the following error,

14:15:07 **** Build of configuration Default for project crazyflie-firmware ****
make cload
../crazyflie-clients-python/bin/cfloader flash cflie.bin stm32-fw
Restart the CrazyFlie you want to bootload in the next 10 seconds ...
Cannot connect the bootloader!
make: *** [cload] Error 255

14:15:25 Build Finished (took 18s.387ms)

I don't know what it means, and I don't know what to do. I'm using the Crazyflie 1.0 and Bitcraze VM 0.5
Thanks in advance

arnaud
Bitcraze
Posts: 1738
Joined: Tue Feb 06, 2007 12:36 pm

Re: altitude hold/hover

Post by arnaud » Wed May 30, 2018 9:21 am

For the bootloader to connect you need to reboot your Crazyflie 1 just after clicking on the cold boot button, are you doing that?

FabricioValerio
Beginner
Posts: 11
Joined: Wed Aug 22, 2018 4:15 pm

Re: altitude hold/hover

Post by FabricioValerio » Wed Aug 22, 2018 10:52 pm

Which firmware's version (crazyflie 1.0) have altitude hold mode working properly?

arnaud
Bitcraze
Posts: 1738
Joined: Tue Feb 06, 2007 12:36 pm

Re: altitude hold/hover

Post by arnaud » Thu Aug 23, 2018 6:53 am

Altitude hold should work with the latest version of the firmware for Crazyflie 1.0 which was 2017.06.

FabricioValerio
Beginner
Posts: 11
Joined: Wed Aug 22, 2018 4:15 pm

Re: altitude hold/hover

Post by FabricioValerio » Fri Aug 24, 2018 1:28 pm

Thanks. I'll check it out.

FabricioValerio
Beginner
Posts: 11
Joined: Wed Aug 22, 2018 4:15 pm

Re: altitude hold/hover

Post by FabricioValerio » Mon Aug 27, 2018 12:16 am

I tested the altitude hold mode (firmware 2017.06) with my crazyflie 1.0 but it didn't work 100%. I am able to choose a setpoint using the throttle but the drone sometimes falls or ascends losing the target altitude. I am using the foam to protect the sensor but this problem is still happening. What else can I do to achieve a good altitude control using crazyflie 1.0?

Thanks in advance.

arnaud
Bitcraze
Posts: 1738
Joined: Tue Feb 06, 2007 12:36 pm

Re: altitude hold/hover

Post by arnaud » Mon Aug 27, 2018 12:08 pm

First thing to check: do you have a Crazyflie 1.0 10DOF, if not there is no pressure sensor and altitude hold will use only the accelerometer which means that it is going to drift after a while.

If you have the pressure sensor, altitude hold is dependent of the ambiant pressure change. You can test if the ambiant pressure is changing a log in your environment by loggin the pressure reading using the Crazyflie client, for example big pressure change can normally be seen by opening and closing the room door/windows. If the ambiant pressure fluctuate a log there is not much that can be done to get a more stable hold.

If the pressure is more stable than what you are observing, there might be hope to improve things with better firmware implementation. This is something that requires looking into and tweaking the Crazyflie source code.

FabricioValerio
Beginner
Posts: 11
Joined: Wed Aug 22, 2018 4:15 pm

Re: altitude hold/hovera

Post by FabricioValerio » Mon Aug 27, 2018 7:33 pm

Thanks for the reply, arnaud.
My crazyflie 1.0 is 10 DOF and the room where I tested was closed. Could you give me a tip, which files(codes) do I have to change in order to improve the altitude hold mode? I use the crazyflie VM too and I can change the codes.

Thanks in advance.

Post Reply