Working Hover Mode - quick and dirty

Firmware/software/electronics/mechanics
omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Re: Working Hover Mode - quick and dirty

Post by omwdunkley »

I see!

I based my code off the default branch. I think the bug you are experiencing is this:
https://bitbucket.org/bitcraze/crazyfli ... t-callable
see
https://bitbucket.org/bitcraze/crazyfli ... error/diff

However the flie should throttle down when it disconnects, Ill work on fixing that.

Cheers
omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Re: Working Hover Mode - quick and dirty

Post by omwdunkley »

omwdunkley wrote: However the flie should throttle down when it disconnects, Ill work on fixing that.
Should be fixed now in the latest revision: https://bitbucket.org/omwdunkley/crazyf ... 3fd3575a7c

I only had one minute with a semi broken flie to test and it seemed to work, so be careful until you convince yourself ;)

-Oll
omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Updated GUI

Post by omwdunkley »

Yo :)

So the flie indeed does now safely disconnect;) Tested a few times, and a few times by accident.

Spent some time adapting the pc client to show more hover data, grab the latest revision here https://bitbucket.org/omwdunkley/crazyf ... t/overview

Changes:
  • Now shows above-sea-level (ASL) estimate from the barometer with the other actual values
  • Show ASL on the AI (attitude indicator or "HUD")
  • If in hover mode, shows the target altitude with other target values. Otherwise it is disabled
  • If in hover mode, shows the difference from actual to target graphically on the attitude indicator (HUD)
  • If in hover mode,the thrust % shows change in target altitude. Middle = no change, throttle up = target is being shifted up, etc
  • Added two splitters to be able to maximise the AI
  • Main tab resizes much better now, maximising the AI size
  • Other tweaks, such as the changing the zoom method on the plot, some logging frequencies, etc
Im probably updating the AI faster than I should, Ill optimise another day.

Some screenshots:

The new look while in hover mode:
Image
Notice: Throttle progressbar now displays change in target, ASL is displayed, Target ASL is displayed


While not in hover mode:
Image
Notice: Throttle shows the usual Target hidden, ASL displayed elsewhere

With AI maximised:
Image
Notice: Graphical representation of hover status: Left number is the target altitude, right number is the current offset. So in this situation, the flie is 1.26 meters above its goal

Hope this works with others, drop some feedback if you want something changed/added etc

-Oll
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Working Hover Mode - quick and dirty

Post by tobias »

Nice work! I will notify Marcus about this so he can start looking at integrating it into the main branch.
internguy
Beginner
Posts: 11
Joined: Fri Aug 16, 2013 1:20 am

Re: Working Hover Mode - quick and dirty

Post by internguy »

Hello!

I have been using your latest client and latest firmware. I really like the altitiude indicator showing how far we are away from target and on the mainflgith tab ASL showing NOT SET or set target altitiude. However, even thoguh i havent changed anything both of them suddenly stopped working

On main screen, even if i go to the hover mode it stay as NOT SET, and ai doesnt shwo how far we are away from the set target. i absolutely havent touched the source code.

I just downloaded 5 mins ago the client and firmware still the same
omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Re: Working Hover Mode - quick and dirty

Post by omwdunkley »

Hey,
I'm on holiday right now so i have no laptop etc here. I'll get back to you when I'm back! I'm not sure if i can reproduce the error though.

Sounds like the controller hover button mapping is not working.

Cheers!
absoloodle37
Member
Posts: 46
Joined: Sun Jun 09, 2013 3:04 am

Re: Working Hover Mode - quick and dirty

Post by absoloodle37 »

Great work owmdunkley! The only thing I can contribute is that I've seen people tape a small piece of cotton/foam to the baro chip on other controllers (arducopter). This blocks the chip from sensing momentary pressure deviations from wind, prop wash, etc. while still permitting an accurate static air pressure reading. Not sure where the baro/altitude chip is on the CF, but covering it with a permeable/pourous material may help stabilize the hover mode a bit.

Worth a try?
omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Re: Working Hover Mode - quick and dirty

Post by omwdunkley »

Hi - sorry for the late response!
internguy -Ive not been able to reproduce your problems..hows it going on your end?
absoloodle37 - Def worth a try! I mean adding a piece of foam doesnt take long ;) I didnt notice much improvement to be honest though. A little bit in the raw data, but not enough to actually improve hover mode. Maybe I need to shield it with denser foam or so. Anyone else been playing around with this?
dbenesj
Beginner
Posts: 2
Joined: Fri Oct 18, 2013 8:45 pm

Re: Working Hover Mode - quick and dirty

Post by dbenesj »

Hi omwdunkley,
I have been playing with your hover mode. Great, thanks!
Also tried covering the barometer with foam from the bottom of the Crazyflie box. I have used quite a lot of foam, but I don't see any improvement in hover mode with it.

For me, hover mode works quite fine, but my Crazyflie is going slowly lower and lower while hovering. I'm not yet sure what might be the problem, but I expect, that I may need to configure differently some variables regarding battery discharging or temperature...
Another problem with hover mode is, that sometimes Crazyflie drops very fast about 20cm while I'm not moving. I blame PID configuration for that, but not yet familiar enough with PID tuning. I will try to do some study about it and hope then it will be more clear to me.

By the way, if someone wants to try hover mode on Windows, there is PC client installation available: Windows PC client with hover
omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Re: Working Hover Mode - quick and dirty

Post by omwdunkley »

Hey dbensj,

Glad it works :) Thanks for the feedback.
It shouldnt go lower and lower thought, sounds like something is going wrong. The I part of the PID controller should compensate for that. This is really important as thrust needs to be increased as the battery drains. The I part is reset every time you turn it on/off or every time you plug it into USB. Usually it takes less than 3-4 seconds (worst case, eg depleted battery and initial I value) to adjust, so slowly going down and down is probably a result of the air pressure decreasing.
I found that in some weather conditions, the pressure was fluctuating so much that I couldnt use hover mode at all. People opening/ closing windows/doors also can cause spikes or pressure differences. It shouldnt randomly drop 20cm though. It might oscillate though depending on initial and continuous conditions.

Of course the PID values and all the other variables I exposed could do with a lot of tweaking :) Let us know what you find out!
Post Reply