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

AP 3.8rc5: flat turns with rudder under CRUISE do not seem sticky #3064

Closed
marcmerlin opened this issue Oct 22, 2015 · 16 comments · Fixed by #7195
Closed

AP 3.8rc5: flat turns with rudder under CRUISE do not seem sticky #3064

marcmerlin opened this issue Oct 22, 2015 · 16 comments · Fixed by #7195
Assignees
Labels

Comments

@marcmerlin
Copy link
Contributor

Cruise works fine.
Turning with ailerons gives a new heading, and cruise sticks to it.
If I turn with rudder, the turn is very slow, but that's normal because it's a 2.6m motor glider. Turn is flat as advertised.
However, as soon as I release the rudder input, the heading springs back away from where I was pointing.
I can't tell if it goes all the way back to before the rudder turn, or not, but it definitely goes back some.

I don't have a clean minimalistic dataflash log showing this, but before I go get one, can you confirm whether this is indeed not how things are supposed to work, and whether you'd like me to tweak some settings first?
You can get my plane settings here: http://marc.merlins.org/tmp/4.BIN

@OXINARF OXINARF added the Plane label Jun 4, 2017
@OXINARF
Copy link
Member

OXINARF commented Jun 4, 2017

Is this still relevant?

@marcmerlin
Copy link
Contributor Author

will check on my next set of flights.

@marcmerlin
Copy link
Contributor Author

marcmerlin commented Jun 6, 2017

@OXINARF
Ok, I checked on a sky eye (2m pusher), and rudder turns kind of worked, but as soon as I released the rudder, the plane would bounce back some amount of the turn that was just made.
On a BFG2600 (2.6m glider), it's the same thing, except worse, and strangely the rudder turn worked worse in one direction than the other

Let's have a look at https://youtu.be/n4iWlvrRA5E?t=7m10s look at how bad the turn is going on (never mind the up and down issues tracked in #3032)
Then at https://youtu.be/n4iWlvrRA5E?t=7m47s I turn the rudder the other way, the plane banks a lot
In mavexplorer, CRUISE starts at 14:27:45, it's the CRUISE 71s

See how

  1. roll isn't as flat at desired, especially on the 2nd rudder turn (the first one was flat-ish except at the start
  2. see how roll bounces both times when rudder is removed, and when that happens, the heading regresses from the one I stopped the turn at.

Graph also shows I gave no aileron input during the rudder turn:
fig2

http://marc.merlins.org/tmp/00000033_BFG_CRUISE_OSCILLATION.BIN

@marcmerlin
Copy link
Contributor Author

marcmerlin commented Jun 8, 2017

@OXINARF to be honest, this is not a super important feature for me, but do rudder turns work well for others with conventional aircraft? (not flying wings like @magicrub uses :) ). If it's not really tested/used much, it's ok if it doesn't work that well, or at all. I was quite surprised that one rudder turn direction caused that much roll though, while the other one mostly gave a flat-ish turn (blue line in the graph above)

@magicrub
Copy link
Contributor

magicrub commented Jun 8, 2017

@WickedShell doesn't use flying wing, I do. Maybe you got us mixed up! :) He mostly uses this funny plane that doesn't have ailerons which is quite the opposite to a flying wing.

@marcmerlin
Copy link
Contributor Author

Sorry @WickedShell lack of sleep and got you mixed up with @magicrub . I meant you Tom,sorry :) And yes, rudder only planes that rely on dihedral only are not real planes in my book ;)

@marcmerlin
Copy link
Contributor Author

So, I just tried this on my Bixler2 that had just been tuned, and it was worse, doing a rudder turn caused the aircraft to pitch sideways about as much as if I had done a regular aileron turn.
Then I went back to my BFG2600 after retuning it, and it didn't work well either, and not the same whether I tried to turn left or right (just like in the example I gave above already)

@marcmerlin marcmerlin changed the title AP 3.4: flat turns with rudder under CRUISE do not seem sticky AP 3.8rc5: flat turns with rudder under CRUISE do not seem sticky Jun 27, 2017
@WickedShell
Copy link
Contributor

Alright I tracked this down today, your first log is no longer available, and your second one is apparently corrupt (the mavproxy tools can't make heads or tails of it).

So whats happening is unless stick mixing is enabled then rudder_input is set to 0. https://github.com/ArduPilot/ardupilot/blob/master/ArduPlane/radio.cpp#L233 inside plane we only unlock the heading track if there is a roll command or rudder_input is non zero. https://github.com/ArduPilot/ardupilot/blob/master/ArduPlane/ArduPlane.cpp#L723

This is straightforward to always check the rudder input regardess of stick mixing in cruise which would resolve the bug your seeing here, but would be a slight behavior change. Based on the comment on the code though I think it was the intended behavior to honor rudder inputs as changing the heading lock.

@marcmerlin @magicrub @tridge is everyone fine with allowing rudder input to change the cruise lock direction regardless of stick mixing? I can say that for rudder only aircraft this change would have 0 impact on cruise. Tagged as a dev cal topic.

@magicrub
Copy link
Contributor

magicrub commented Nov 6, 2017

I don't use CRUISE mode, ever, but I would have assumed that the rudder would change your desired heading. Why would we not want that?

@iskess
Copy link

iskess commented Nov 6, 2017

I have an old request for similar behavior in auto mode. The option to use rudder to correct small track errors, to reduce conststant roll changes.
#3729

@WickedShell
Copy link
Contributor

@magicrub I think we do, I asked it as a question here first because it would be a behavior change from current use, but I think it's the correct one.

@marcmerlin
Copy link
Contributor Author

marcmerlin commented Nov 6, 2017

@WickedShell thanks for having a look and sorry, yeah, I deleted that log from 2015 in the original post
No idea why the 2nd one is corrupted.
As for your suggestion, I'm not knowledgeable of all the things involved in that changed, but on paper it sounds good.
(and thanks for having a look)

@magicrub
Copy link
Contributor

magicrub commented Nov 7, 2017

+1 for changing the behavior. What are your thoughts @tridge

@WickedShell
Copy link
Contributor

@magicrub conclusion from call is to definitely change it, I'll send in a PR tonight for it.

@magicrub
Copy link
Contributor

magicrub commented Nov 8, 2017

Implemented and merged, thank you @WickedShell !!

@marcmerlin
Copy link
Contributor Author

indeed, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Plane Backports
Awaiting triage
Development

Successfully merging a pull request may close this issue.

5 participants