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

fw_pos_ctrl: subtract trim pitch setpoint before TECS everywhere #14907

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CarlOlsson
Copy link
Contributor

@sfuhrer @RomanBapst As discussed on Slack I don't understand why we would not subtract the trim pitch setpoint everywhere before pushing it into TECS. I noticed that the plane behaved differently when flying in position control mode compared to mission. I also added the change to places which I could not test, e.g. fw takeoff, so please review that more carefully.

Describe problem solved by this pull request
The limitation of the pitch setpoint was different in mission and position control

Describe your solution
Subract the trim pitch sp for position control mode in the same way as it is done for mission

Describe possible alternatives
A massive cleanup of the fw pos controller

Test data / coverage
I only tested position control so far

@dagar
Copy link
Member

dagar commented May 15, 2020

There was a question of interpretation of the various pitch limits in the fixedwing position controller (relative to the pitch setpoint offset or not). Let's settle this and make sure handled uniformly.

@dagar
Copy link
Member

dagar commented May 15, 2020

#9243

@sfuhrer
Copy link
Contributor

sfuhrer commented May 25, 2020

For me it would make sense to treat pitch in the absolute way everywhere outside of TECS, and then relatively inside TECS - and thus this PR makes total sense for me.
@dagar what's the big blocker for #9243 and #11845 , I haven't quite understood the implications for FW takeoff yet.

@stale
Copy link

stale bot commented Aug 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Aug 23, 2020
@CarlOlsson
Copy link
Contributor Author

still relevant @sfuhrer

@stale stale bot removed the stale label Aug 24, 2020
@CarlOlsson
Copy link
Contributor Author

Is there a reason this wasn't just merged?

@dagar
Copy link
Member

dagar commented Sep 14, 2020

Is there a reason this wasn't just merged?

I've lost context here, but I recall there was confusion about the pitch (and various parameters) being an inconsistent mix of relative to the vehicle body frame and other cases that are relative to the pitch offset.

I propose we all take a few minutes to review and schedule a short call to settle this. @CarlOlsson @sfuhrer @RomanBapst

We also need to make sure it's a clean/safe upgrade for existing users.

@dagar dagar requested review from dagar and sfuhrer September 14, 2020 15:10
@dagar dagar added this to the Release v1.12.0 milestone Sep 14, 2020
@dagar
Copy link
Member

dagar commented Sep 14, 2020

After brief discussion on slack the current consensus is to push the pitch offset into TECS itself so that the rest of the FW position controller can be kept simple and oblivious to the offset. All limits and configurable pitch settings are in the vehicle body frame. Does anyone have a different opinion?

@ryanjAA
Copy link
Contributor

ryanjAA commented Sep 14, 2020

Probably just some clear documentation but will test it once I’m clear on the effects the changes will have. Having a pitch down on takeoff rollout is annoying so that will be good to get rid of.

@Jaeyoung-Lim
Copy link
Member

@dagar Also makes sense to me and shouldn't have effect on offboard, since it uses the same setpoint types

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Dec 25, 2020
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.

5 participants