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

mc_pos_control: fix takeoff ramp gets amended by feed-forward #14821

Merged
merged 1 commit into from
May 4, 2020

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented May 4, 2020

Describe problem solved by this pull request
I found an issue with the takeoff ramp when real world testing #14749 on the Holybro QAV250. But I found the issue is independent of that pr.

The thrust doesn't ramp nicely anymore like it was designed but depending on stick input can go up and down unexpectedly during the ramp up. This can lead to early land detection if the thrust goes up high enough and then back down because the ramp is not yet high enough.

The problem is: Because the takeoff ramp is a vertical velocity limit ramp for the nice user experience but the acceleration feed-forward can add on top of the output and depending on trajectory generation result in unwanted thrust changes during the ramp.

Describe your solution
I suppress the vertical acceleration feed-forward during the ramp.

Test data / coverage
It's reproducable in SITL with the correct configuration:
MPC_TKO_RAMP_T 5, MPC_JERK_MAX 20

  1. Switch to position mode
  2. Arm
  3. Fully rise the throttle stick

Before: https://review.px4.io/plot_app?log=ba57f51e-abaf-4990-ad34-64b3cef56d11
image
After: https://review.px4.io/plot_app?log=532b6cdd-5101-4007-82b6-529b1491e85b
image

…keoff ramp

Because the takeoff ramp is a vertical velocity limit ramp for the
nice user experience but the acceleration feed-forward can
add on top of the output and depending on trajectory generation
result in unwanted thrust changes during the ramp.
@MaEtUgR MaEtUgR added the bug label May 4, 2020
@MaEtUgR MaEtUgR requested a review from bresch May 4, 2020 11:24
@MaEtUgR MaEtUgR self-assigned this May 4, 2020
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.

Ok, that's a good minimum fix but we'll have a glitch if the acceleration FF isn't 0 at the end of the takeoff

@MaEtUgR
Copy link
Member Author

MaEtUgR commented May 4, 2020

glitch if the acceleration FF isn't 0 at the end of the takeoff

I'm totally aware of that but it's IMHO far less of an issue than a glitch at the beginning of the ramp. This is thought of as a hotfix. Thanks for reviewing!

@MaEtUgR MaEtUgR merged commit 8e2c52a into master May 4, 2020
@MaEtUgR MaEtUgR deleted the pr-fix-takeoff-ramp-acceleration-feedforward branch May 4, 2020 14:10
MaEtUgR added a commit that referenced this pull request Mar 31, 2021
MaEtUgR added a commit that referenced this pull request Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants