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

Add Mount option to retract on landing #26787

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

No description provided.

@amilcarlucas
Copy link
Contributor

@bitmask metadata documentation is missing

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Apr 12, 2024

#if HAL_MOUNT_ENABLED
{
const bool is_landing = flightmode->is_landing();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. An alternative implementation (which I suspect you also thought of) was to pass the is_landing() state into the mount and let it decide if the state has changed. It's no big deal but done that way we might move a bit more code into AP_Mount if we choose to implement this for Plane as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I certainly did consider that. But then I thought that other libraries might also want to know when we've just transitioned into landing. Kind if figured we'd see which way things went.

It also briefly crossed my mind to use Notify events but quickly discarded that concept.

@peterbarker
Copy link
Contributor Author

@bitmask metadata documentation is missing

Fixed, thanks!

@nexton-winjeel
Copy link
Contributor

How urgently do you want this capability in? We've got a similar feature that is vehicle-agnostic that:

  • uses the AHRS to get height above ground (falling back to height above home)
  • will auto-deploy when altitude goes above parameterised DEPLOY_ALT
  • will auto-retract when altitude falls below parameterised RETRACT_ALT

Haven't pushed a PR for it yet because we never flight tested it enough (but we do have SITL tests).

@peterbarker
Copy link
Contributor Author

How urgently do you want this capability in? We've got a similar feature that is vehicle-agnostic that:

Well, given this isn't merged, can't be that much.

ATM we're using modifications to MAVProxy to accomplish our goals, but it would be nice to do this in AP.

* uses the AHRS to get height above ground (falling back to height above home)

* will auto-deploy when altitude goes above parameterised `DEPLOY_ALT`

* will auto-retract when altitude falls below parameterised `RETRACT_ALT`

Haven't pushed a PR for it yet because we never flight tested it enough (but we do have SITL tests).

Definitely interested in seeing those patches.

@rmackay9
Copy link
Contributor

rmackay9 commented Nov 9, 2024

This looks mergeable to me as-is. Maybe first person to raise the PR wins and we merge this?

@peterbarker
Copy link
Contributor Author

How urgently do you want this capability in? We've got a similar feature that is vehicle-agnostic that:

* uses the AHRS to get height above ground (falling back to height above home)

* will auto-deploy when altitude goes above parameterised `DEPLOY_ALT`

* will auto-retract when altitude falls below parameterised `RETRACT_ALT`

Haven't pushed a PR for it yet because we never flight tested it enough (but we do have SITL tests).

See also #12042 - which might be closed when we see your PR :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants