Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rotorcraft] improve in_flight detection heuristic #469

Merged
merged 4 commits into from
Sep 4, 2013

Conversation

flixr
Copy link
Member

@flixr flixr commented Jul 2, 2013

Simply checks if thrust, speed and acceleration are above a threshold.
Does not rely on RC thrust command anymore, but only on actual thrust command.

Attempt to improve issue #201 and replaces #468

While here fix the takeoff-landing-takeoff sequence in navigation...

Simply checks if thrust, speed and acceleration are above a threshold.
Does not rely on RC thrust command anymore, but only on actual thrust command.
Not tested on real vehicle at all so far...

Attempt to improve issue paparazzi#201 and replaces paparazzi#468
@flixr flixr mentioned this pull request Jul 16, 2013
@flixr
Copy link
Member Author

flixr commented Aug 7, 2013

Works ok for me here... anyone else tested this?
Anyone some more comments?

@flixr
Copy link
Member Author

flixr commented Aug 28, 2013

@dewagter unless you object I'll merge this...

flixr added a commit to flixr/paparazzi that referenced this pull request Aug 28, 2013
* in_flight_heuristic:
  [rotorcraft] improve in_flight detection heuristic
@podhrmic
Copy link
Member

Was it tested in flight? At least once? Just making sure, unfortunately I can't test it right now.

@flixr
Copy link
Member Author

flixr commented Aug 28, 2013

I did a short test flight with my quad and it was working ok... but it might not detect the change from in_flight to not in_flight as good if your velocity and acceleration estimates are bad.

@dewagter
Copy link
Member

Code looks nice. (I like the very low throttle but still high downward speed = airborne)

Still must check in-flight though. Should this solve the airborne kill mode in auto-land? I'm not a huge fan of airborne kill mode.

@flixr
Copy link
Member Author

flixr commented Aug 28, 2013

This is not intended as a replacement for the KILL_ON_GROUND_DETECT using DetectGroundEvent()
or airborne kill mode as you put it ;-)

@Drumettaz
Copy link
Contributor

I just tested that in flight:
in_flight_detection_landing
On landing, the motors were stopped by nav_detect_ground function.
As you can see, it took 3 seconds to change the status from "in_flight" to "on_ground".
It looks like the vertical speed measurement is quite delayed compared to real speed.
I was't aware of that, maybe this can be reproduced in sim?
For take-off everything looks OK:
in_flight_detection_takeoff

@flixr
Copy link
Member Author

flixr commented Aug 29, 2013

Should we leave these values at default? Or maybe set higher throttle threshold, so that it doesn't go into in_flight if your rc is not calibrated well and you already have a small throttle command at throttle stick down?
And maybe raise velocity thresholds as well to be a bit more robust to bad velocity estimates?

@flixr
Copy link
Member Author

flixr commented Aug 29, 2013

If you look at the vertical velocity estimate it seems to go back to zero (actually a bit further) and then up again.
Is this maybe exactly the instant where it touched the ground and basically got an upwards acceleration due to the bump? Due to the propagation of the accel measurements this would estimate and upwards velocity (negative z) and then be corrected again by the baro...

@dewagter
Copy link
Member

We also tested this... (the 2nd takeoff the motors did not spin so it did
not takeoff, that is normal).

-Christophe

On Thu, Aug 29, 2013 at 6:19 PM, Felix Ruess notifications@github.comwrote:

If you look at the vertical velocity estimate it seems to go back to zero
(actually a bit further) and then up again.
Is this maybe exactly the instant where it touched the ground and
basically got an upwards acceleration due to the bump? Due to the
propagation of the accel measurements this would estimate and upwards
velocity (negative z) and then be corrected again by the baro...


Reply to this email directly or view it on GitHubhttps://github.com//pull/469#issuecomment-23502309
.

@flixr
Copy link
Member Author

flixr commented Aug 30, 2013

With the last two commits the issue of not being able to properly takeoff again after a landing should be fixed as well (without going to halting point with kill in between, e.g using KILL_ON_GROUND_DETECT).

@flixr
Copy link
Member Author

flixr commented Sep 1, 2013

Does anyone want to do some further tests before we merge this to master?
Are the default values OK for you?

@flixr
Copy link
Member Author

flixr commented Sep 4, 2013

@dewagter can we merge this? I also increased the default MIN_THRUST threshold to 500 (~5%) as that should make it more robust to slightly miscalibrated RC...

flixr added a commit that referenced this pull request Sep 4, 2013
[rotorcraft] improve in_flight detection heuristic and fix takeoff-land-takeoff in nav
@flixr flixr merged commit 6fb8064 into paparazzi:master Sep 4, 2013
@flixr flixr deleted the in_flight_heuristic branch September 4, 2013 14:07
@dewagter
Copy link
Member

dewagter commented Sep 4, 2013

yes. now takeoff after a land works fine.

-Christophe

On Wed, Sep 4, 2013 at 3:30 PM, Felix Ruess notifications@github.comwrote:

@dewagter https://github.com/dewagter can we merge this? I also
increased the default MIN_THRUST threshold to 500 (~5%) as that should make
it more robust to slightly miscalibrated RC...


Reply to this email directly or view it on GitHubhttps://github.com//pull/469#issuecomment-23788840
.

@flixr flixr added this to the v5.2 milestone Mar 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants