-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
FlightTasks: add Descend task to land without GPS #13143
Conversation
I tried this with and without GPS with |
@julianoes I think this is due to NAV_FORCE_VT parameter. Not sure about the exact implementation though. If NAV_FORCE_VT is true then the vehicle will / should always land (and takeoff) in MC mode. Meaning that if you deactivate it it should stay in FW for landing |
How is this different from the Failsafe flight task? |
I also don't really see the advantage over the failsafe flight task. Also, no GPS doesn't mean no position/velocity estimate, the drone can still have an optical flow sensor and brake horizontal speed. |
The failsafe task will actually stay at the same position because we have a valid z-position, however, we should descend. |
@MaEtUgR please review. |
@Tony3dr I would appreciate if you could test this pull request carefully on the cheapest multicopter 😄: Test instructions
Nevermind please wait with this test. |
bool ret = FlightTask::activate(last_setpoint); | ||
_position_setpoint = {NAN, NAN, NAN}; | ||
_velocity_setpoint = {NAN, NAN, NAN}; | ||
_thrust_setpoint = matrix::Vector3f(0.0f, 0.0f, -_param_mpc_thr_hover.get() * 0.6f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself: This conflicts with #12072 and will only show up as a compile error.
@@ -620,6 +615,7 @@ Navigator::run() | |||
case vehicle_status_s::NAVIGATION_STATE_ACRO: | |||
case vehicle_status_s::NAVIGATION_STATE_ALTCTL: | |||
case vehicle_status_s::NAVIGATION_STATE_POSCTL: | |||
case vehicle_status_s::NAVIGATION_STATE_DESCEND: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would anyways run into default.
@Tony3dr sorry, don't test just yet. We need to change something first. |
Sounds good let us know when it's ready. |
b1b1e83
to
e67b5db
Compare
@julianoes I pushed on your pr, I hope that's ok.
I tested before and after the descend introduction and it does the right thing in the case you described (default configuration |
@MaEtUgR I've tested these cases:
For 4. the output is:
|
I wonder why it would use so much more flash...
Can you check again? |
@MaEtUgR I checked 4. again and you're right. It's now correct. And I agree with your reasoning of switching to descend for this case.
|
So now the only thing is to figure out how this fits into fmu-v2. |
@Tony3dr ok I think you can go ahead and test this now: Test instructions
|
Tested on Pixhawk 4 v5 f-450 NAV_RCL_ACT = land mode 1 log switch off RC with GPS: no issues 2 log switch off RC without GPS: no issues drift with wind 30 meters |
I've updated the branch - let's see if it passes now. |
This adds a flight task to catch the case where we want to do an emergency descent without GPS but only a baro. Previously, this would lead to the navigator land class being called without position estimates which then made the flight tasks fail and react with a flight task failsafe. This however meant that landed was never detected and a couple of confusing error messages. This applies if NAV_RCL_ACT is set to 3 "land".
bb2a0ea
to
935897a
Compare
@MaEtUgR it looks like ground_contact triggers but always after throttle is set to 0, somehow. And I can't reproduce it in SITL. |
@bresch and I found that the land detector determined:
This happens because the z controller only reacts slowly to the new setpoint so the z velocity down is much less than the z velocity setpoint here: It looks to us that we should check the land detector for this edge cases in a future pull request. The issue is general and not specific to this change. Therefore we can merge this PR already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge that and address the land detector in a separate PR.
This adds a flight task to catch the case where we want to do an emergency descent without GPS but only a baro.
Previously, this would lead to the navigator land class being called without position estimates which then made the flight tasks fail and react with a flight task failsafe. This however meant that landed was never detected and a couple of confusing error messages.
This applies if NAV_RCL_ACT is set to 3 "land".
Fixes #11468.
Tested in SITL with
iris
,plane
, andstandard_vtol
.