-
Notifications
You must be signed in to change notification settings - Fork 17k
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
Plane: update tailsitter speedscaling logic #12869
Conversation
Flys the borco OK, I do think it might be better to do it in one go like this branch, I think the logic is eser to follow. |
@IamPete1 Thanks for testing. I decided to try this because it incorporates only the changes which @losawing has flight tested. |
I think its better to do in one go, that is to say once this goes in I will straight away open the interpolation PR that will rearrange all this again, better to only re-arrange it once. At the least I think this should have the selection bitmask param in. I think also that the 'old' throttle only scaling should always be used for the tilt motors. It makes no scene on to vary them with airspeed. Maybe I will re-base my branch so we can compare. I think that that branch is where we would both like tailsitters to end up eventually? Just need to test it with the other methods, I'm happy with how it work for the 'old' throttle method and the new interpolation stuff. |
This is the comparison, its probably a bigger change from this to that than from how it is now to this. https://github.com/kd0aij/ardupilot/compare/pr-gsc-base...IamPete1:gainscailing_rebase?expand=1 Although I guess there are 3 commit from pid and motors stuff that could probably be dropped to a new PR. edit: this is that (there were only two commits of none tailsitter stuff): https://github.com/kd0aij/ardupilot/compare/pr-gsc-base...IamPete1:gainscailing_rebase_tailsitter_only?expand=1 edit2: this would be the PR i think it would also add Qasist support for tailsitters https://github.com/ArduPilot/ardupilot/compare/master...IamPete1:gainscailing_rebase_tailsitter_only?expand=1 |
Note that commit 1294919 changes the copter tailsitter quad (plus and X) layouts to match the motor rotation directions documented for copters here: http://ardupilot.org/copter/docs/connect-escs-and-motors.html#connect-escs-and-motors and adds 2 new frame types for the previous no-yaw-torque layouts: MOTOR_FRAME_TYPE_NYT_PLUS and MOTOR_FRAME_TYPE_NYT_X |
// acro_roll_rate param applies to yaw in copter frame | ||
target_roll = plane.channel_rudder->norm_input() * acro_roll_rate * 100.0f; | ||
target_yaw = -plane.channel_roll->norm_input() * acro_yaw_rate * 100.0f; | ||
target_roll = plane.channel_rudder->norm_input() * acro_yaw_rate * 100.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change the mapping for yaw/roll here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rephrasing the comment: multicopter frame yaw is tailsitter body-frame roll and multicopter frame roll is tailsitter body-frame yaw
But this PR is swapping the acro_yaw_rate and acro_roll_rate which was necessary to make them refer to the right body-frame axes in QACRO mode.
86cbde4
to
47f4312
Compare
new flight test reports with copter tailsitter by @losawing: |
I think we need to extend the FRAME_TYPE parameter description.. this is not a blocker though. |
add tailsitter gain scaling option mask and logging tailsitter qassist bugfix; thanks, @IamPete apply roll limit in tailsitter bodyframe roll control add define for future exclusion of tailsitter gainscaling debug code/logging tailsitter bodyframe roll and qacro input scaling bugfixes: respect Q_TAILSIT_RLL_MX and roll/yaw scale parameters in bodyframe roll modes fix unintended swap of Q_ACRO_RLL/YAW_RATE params in QACRO mode don't scale motor tilt Co-authored-by: IamPete1 <33176108+IamPete1@users.noreply.github.com>
…nput methods increase allowed yaw error in tailsitter bodyframe roll modes add combined bodyframe roll method delete old versions of body-frame roll input methods invert mc_controls
Updated the metadata for parameters Q_TAILSIT_INPUT and Q_FRAME_TYPE and squashed into last commit |
… body-frame roll input handling fix metadata for tailsitter param GSCMSK rework roll/yaw scaling for body-frame roll options add constraints on body-frame roll and yaw inputs move speed_scaler logging into QTUN message
update parameter metadata for Q_TAILSIT_INPUT and Q_FRAME_TYPE
add tailsitter gain scaling option mask and logging
apply roll limit in tailsitter bodyframe roll control
add define for future exclusion of tailsitter gainscaling debug code/logging
tailsitter bodyframe roll and qacro input scaling bugfixes:
respect Q_TAILSIT_RLL_MX and roll/yaw scale parameters in bodyframe roll modes
fix unintended swap of Q_ACRO_RLL/YAW_RATE params in QACRO mode
This is a subset of flight test code (#12869)
It contains the speed scaling method which has been flight tested by @losawing on both dual-motor tailsitter (frame class 10) and quad (frame class 1 with Q_TAILSIT_MOTMX=0xF) "copter" tailsitter vehicles. It omits the gain interpolation method and other non-tailsitter related changes in order to simplify this PR and limit it to flight tested code.
log of SITL test of rebased PR with both (legacy) BOOST (THSCMX=2) and ATT_THR (GSCMIN=.2) scaling methods enabled (note that scale factor ranges from 0.2 to 2.0 depending on throttle and attitude) "unknown" flight mode is QACRO:
![image](https://user-images.githubusercontent.com/2300221/69486730-fbca7500-0e0b-11ea-935e-6d8b1ff8b524.png)