[Hover Mode] Testing and setting Parameters

Firmware/software/electronics/mechanics
rmirwin2
Member
Posts: 51
Joined: Mon May 13, 2013 6:06 pm

Re: [Hover Mode] Testing and setting Parameters

Post by rmirwin2 »

Make sure you're cloning only the last hover-related branches in Phillip's repositories:

/phiamo/crazyflie-firmware ("hover_mode_pid", that last commit is d58116d)

and

/phiamo/crazyflie-pc-client ("hover-mode", last commit is d58116d).

IF you clone to the latest commits by Philip, you won't get the relevant hover mode code!

Hope that helps!

Rich
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
Smitty79
Beginner
Posts: 6
Joined: Thu May 30, 2013 9:58 pm

Re: [Hover Mode] Testing and setting Parameters

Post by Smitty79 »

Okay so I figured out how to pull the "hover" firmware and client from the repository.

I have the same problem as some others with it going to full throttle once hover mode is activated. Any ideas????

Also is there a way to have the crazyflie not in debug mode once connected as I was hoping to use it with my headless raspberry pi setup?

Thanks
10DOF Crazyflie, Wireless Xbox360 Controller
Raspberry Pi Base Station with ADAFRUIT INDUSTRIES RGB NEGATIVE 16X2 LCD + KEYPAD KIT
rmirwin2
Member
Posts: 51
Joined: Mon May 13, 2013 6:06 pm

Re: [Hover Mode] Testing and setting Parameters

Post by rmirwin2 »

Hello Smitty,

Not sure why some of us are reporting the "to the ceiling" behavior when Hover is enabled. I have also seen this before but aren't getting it at the moment. Does this happen the same way each time hover is enabled?

I wonder what you would observe if you turn the Crazyflie, to calibrate it, at the same exact altitude as when you press Hover that first time. Does it immediately go to maximum thrust?

You could disable debug mode by changing the default. Editing crazyflie-firmware/modules/src/stabilizer.c by changing "noThrust" to "normalThrust", recompiling, and flashing.

Rich
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
Göran
Beginner
Posts: 3
Joined: Wed Feb 13, 2013 8:35 am

Re: [Hover Mode] Testing and setting Parameters

Post by Göran »

Just my toughts on hovering close to ground. From practicing flying a single rotor, the concept of ground-effect when hoover close to ground is know to create a additional lift.

http://www.rchelicopterfun.com/ground-effect.html
omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Re: [Hover Mode] Testing and setting Parameters

Post by omwdunkley »

Hey guys!

Ive been playing around with my own hover experiments - so far just using the barometer. Later Id like to include vertical acceleration too :)

What sort of results are you getting? How big/frequent are the oscillations? As far as Im concerned tuning PID controllers is black magic ;)

I can achieve a hover +-30cm with a 3-4 second sinus like oscillation cycle, however this strongly depends on the initial situation. I am trying to work out how to make it more aggressive at the beginning . Eg if I initiate hover with a small vertical speed it will eventually converge, but if I initiate hover while having a large vertical speed *** hits the fan (or in this case the fan hits everything ;) ). But one step at a time ;)

Just as a small tip: Dont even bother trying to use barometer readings in bad weather. Had a small storm going on here yesterday and my barometer was reading +- 3 meters vs the +-0.3 meters I usually get. :shock:
DesTinY
Member
Posts: 97
Joined: Sat Feb 09, 2013 5:18 pm
Location: Bünde, Germany

Re: [Hover Mode] Testing and setting Parameters

Post by DesTinY »

omwdunkley wrote:Just as a small tip: Dont even bother trying to use barometer readings in bad weather. Had a small storm going on here yesterday and my barometer was reading +- 3 meters vs the +-0.3 meters I usually get. :shock:
:lol: Thats so funny! The next step is that the CF says: "Don't fly! A storm is coming! :twisted: ...and turn off your TV! 8-) " :lol:
juvinski
Beginner
Posts: 3
Joined: Fri May 31, 2013 8:34 pm

Re: [Hover Mode] Testing and setting Parameters

Post by juvinski »

Hi guys,

sorry for the delay - I was a little bit busy.
I done several tests with the hover firmware and this is my observations.

The question is - in all me tests - is the behavior of the thrust.
This is a little example:
Before activate the Hover:
thrust: 52292
thrust: 52292
thrust: 52292
thrust: 52292
thrust: 52292
thrust: 52292
thrust: 51957
thrust: 50619
thrust: 49281
After Hover Enabled:
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
INFO:cfclient.ui.tabs.FlightTab:Hover Mode enabled: True
INFO:cfclient.ui.tabs.FlightTab:Hover Mode enabled: True
thrust: 45183
thrust: 45073
thrust: 44570
thrust: 44344
thrust: 43774

What happened:
The CF was going down until be 10 cm of the ground.

The "Ceiling" behavior

I activate the Hover and the CF starts to going up:
thrust: 42670
thrust: 41717
thrust: 42925
thrust: 43709
thrust: 44297
thrust: 44074
thrust: 43769
thrust: 44497
thrust: 44176
thrust: 44234
thrust: 44269
thrust: 44229
thrust: 44019
thrust: 43884
thrust: 43939

I Disable the Hover mode, the CF starts to fall and I manually compensate the thrust:
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [2]
INFO:cfclient.ui.tabs.FlightTab:Hover Mode enabled: False
INFO:cfclient.ui.tabs.FlightTab:Hover Mode enabled: False
thrust: 0
thrust: 0
thrust: 19841
thrust: 38910
thrust: 42925
thrust: 41587
thrust: 34227
thrust: 33558
thrust: 34227
thrust: 40583
thrust: 43594
thrust: 43594
thrust: 43259
thrust: 43928
thrust: 44263

CF was around 1 meter flying.

My suspect:
I really don know how explain, but what I'm looking is the behavior of the CF - the values of the thrust - with or without the Hover mode enabled, I can't see a big difference in the values, but I see a lot of difference in the behavior of the CF.
Any clue what I can test or analyse this behavior ?

thanks a lot
jonathanbyrn
Beginner
Posts: 1
Joined: Thu Jul 11, 2013 1:34 pm

Re: [Hover Mode] Testing and setting Parameters

Post by jonathanbyrn »

I have got the hover mode working but it doesn't seem to do much correcting. I tried to debug it by printing the pressure difference (like it currently prints the thrust) but nothing came up. I can see code for logging the pressure in stabilizer.c and the pc-client and the callback is in there:
self._pressure_data_signal.connect(self._pressure_data_received)

but pressure_data_received never seems to be called. Is there something else that must be updated before I can read the pressure data?
benbenbenben
Beginner
Posts: 2
Joined: Mon Jul 01, 2013 10:29 pm

Re: [Hover Mode] Testing and setting Parameters

Post by benbenbenben »

Everytime hover mode is activated, the motors lock their thrust. Unless the motors are spinning at the exact rate to render the CF "weightless", the CF will either slowly drift up or slowly drift down. Is there a way to link hover mode with the altimeter so that the CF will stay at a constant height?

-Ben
mrb0y
Beginner
Posts: 25
Joined: Thu Mar 07, 2013 1:18 am

Re: [Hover Mode] Testing and setting Parameters

Post by mrb0y »

I just discovered that MEMS baropressure sensors are sensitive to direct light such as overhead lighting or direct sun light. It's possible that the inconsistencies in results are related to light and the baro pressure sensor. I haven't played with the hover code or mode my self but thought I would share this information with the hover mode developers.
Post Reply