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

FlightTask: Yawspeed slew rate for smooth motion #13464

Closed
wants to merge 2 commits into from
Closed

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Nov 13, 2019

Describe problem solved by this pull request
This is a split out from the monster pr #12072. At the same time it provides a comparable solution to #13430.

Describe your solution

  • I created a SlewRate class which implements a generic template slew rate with unit testing.
  • I created a PositionLock class to handle reusable position and yaw lock logic for stick flying. It implements the yaw handling using the SlewRate which this pr is about and breaks out other already duplicate or well reusable related functions. This is part of the effort to make the whole flight task library more rely on reusable libraries than on overly complex inheriting.
  • I adapted FlightTaskManualAltitude and FlightTaskManualPosition to call the reusable functions inside PositionLock.

Describe possible alternatives
A low pass filter like suggested in #13430.

Test data / coverage
SlewRate has unit testing, PositionLock I tested a lot in SITL and also multiple times on a real vehicle before it was 1:1 taken over from #12072. The calls based on current master are untested at the moment.

Most important change is it's using a slew rate on the yawspeed to not
try to stop yaw movement too abruptly and overshoot all the time.
@MaEtUgR MaEtUgR requested a review from bresch November 13, 2019 17:58
@MaEtUgR MaEtUgR self-assigned this Nov 13, 2019
@bresch
Copy link
Member

bresch commented Feb 3, 2020

The lowpass method showed good results and there is no obvious reasons why we should try something different now. Closing for now and we can still re-open if we change our mind.

@bresch bresch closed this Feb 3, 2020
@MaEtUgR MaEtUgR deleted the yaw-slew-rate branch July 26, 2020 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants