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 horizontal and yaw nudging for multicopter final descent #18363

Merged
merged 3 commits into from
Oct 5, 2021
Merged

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Oct 5, 2021

Describe problem solved by this pull request
Feature request to have horizontal input via sticks in the final landing approach of land mode and RTL without switching out of the autonomous mode (which is default now through RC override).

Describe your solution

  • Use the stick mapping class from FlightTaskManualAcceleration in FlightTaskAutoMapper to adjust the setpoints based on stick input during the final landing approach
  • Work around issues/corner cases:
    • velocity smoothing overwriting the setpoints but not being happy (flyaway, oscillations) when they are not overwritten by the mapper again
    • snapping back to the original land position despite input
    • not reaching the exact land position without input e.g. exactly home in RTL
    • snapping back to the previous amended land position when using auto modes but switching out of land and back in (instance stays, the position needs to be reset)
    • position not being locked when RC is lost/assist disabled while moving, this would lead to no setpoints and combined with the velocity smoothing to a constant tilt flyaway

Describe possible alternatives
I'm not particularly proud of the necessary workarounds. There's room for improvement from this initial step.
Known limitations:

  • Currently rc override is enabled by default and if the stick is moved during land the mode is switched. To use this pr you need COM_RC_OVERRIDE = 0
  • Currently RC assist during land is disabled by default. To test this pr you need MPC_LAND_RC_HELP = 1
  • The output coming from the stick mapping class goes through the velocity smoothing and hence you lose the responsive acceleration feed-forward response on the sticks and it's rather sluggish.
  • The workarounds listed above gave me some headache and I'd like to further reduce inheritance among the flight tasks to allow for more flexibility in assembling the setpoints without workarounds.

Test data / coverage
I ported this feature. It's used in production on specific vehicles.

Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

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

The logic makes sense to me

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

I've tested this new nudging on a medium-sized VTOL quite a bit recently, and for me it always did the trick. Yes it's a different stick feeling than in Position mode, but the sluggishness was not a bit deal for me, you can still easily nudge the vehicle to a precise landing spot (and that's in the end the only thing you're concerned about when the vehicle is descending for land).

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

Successfully merging this pull request may close these issues.

4 participants