-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
VTOL land detector: disable freefall detection if FW and move to airspeed_validated #14031
Conversation
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
If if was just MC, FW, and Rover I'd think the land detector should be split into separate modules per vehicle type with the common code moved to a library. With VTOL considered that might be more of a pain than it's worth. Either way I'm assuming you don't want to do that here, so the simple immediate solution is to use the C param API and make sure you cleanly handle the failure case. |
If we want to do this properly now (with really the FW land detector running in FW mode for VTOL) then we should at the same time disable any landing detection during transition, see #12903 |
@dagar is it ok that the Hardware test pass, but there is a Hardfault? is it known? |
Good eye @BazookaJoe1900. No it's not known, but I also don't know the orb test that well. It could be as simple as the task stack size, or indicative of something more concerning. Care to debug? |
@sfuhrer I might be missing some context, but this particular PR could be fine with the discussed param change. I also don't see an issue if you'd like to merge #12903 for now. |
@dagar I will look at the bug of 'orb test', |
The hardware tests need a proper test runner to replace the current simple script that simply executes the commands. Then that test result needs to get back to Jenkins, which will then also fail the PR. Implementing TAP (the test anything protocol) might be the "right" way to do it, but a simple wrapper host side that connects to the console, runs the test command, checks result, return code, etc would also do the job. https://testanything.org/ Let's followup in a new issue if there's more to discuss. |
d823317
to
21c95ec
Compare
21c95ec
to
ee55dcf
Compare
…tor and disable in fixed-wing mode Extend the get_freefall_state() from MC land detector to have a VTOL-specific one that just enables free fall detection if in rotary wing or transition mode. This is done to prevent wrong free-fall detected warnings while doing low-G maneuvers (parabolic flights). Land detection is anyway disabled in FW flight for VTOL so no logic change. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
ee55dcf
to
4b5b98d
Compare
Guys I've changed this PR after the issues with the Stall-airspeed param: |
It seems that the multicopter free fall function is running in fixed-wing mode, which triggers freefall when making parabolic flight maneuvers (eg pitching strongly down), as then the vertical acceleration is low.
It is though not relevant for land detection, as this is currently switched off (landing = false) for the fixed-wing portion of the flight. The error message though still pops up, so this PR is mainly there to fix that.
To enable a proper land detection in the future for VTOL, I didn't just kill off the free fall detection for VTOL in FW flight, but added a VTOL-specific one that also takes into account airspeed, and thus disabling free fall detection if the airspeed is above the stall speed of the vehicle.