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_Motors: add support for tricopter tailsitter in AP_MotorsMatrix #15447

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kd0aij
Copy link
Contributor

@kd0aij kd0aij commented Sep 27, 2020

No description provided.

@kd0aij kd0aij marked this pull request as draft September 27, 2020 18:08
@IamPete1
Copy link
Member

I think the issue here is reusing MOTOR_FRAME_TRI this prevents us doing a traditional tricopter tailsitter in the future, I think its better to add a new frame class for this, then we can have both.

@kd0aij
Copy link
Contributor Author

kd0aij commented Sep 27, 2020

Doesn't AP_TAILSIT_MOTMX serve to differentiate between the two? It's only supposed to be non-zero for "copter" tailsitters.
But AP_MotorsMatrix::output_armed_stabilizing() has a bunch of logic assuming that torque-based yaw is being used, and that's not appropriate for the tricopter frame. So maybe I just need to revert the removal of AP_MotorsMatrixTS?

As far as I know, the only person affected by this breakage is me, and that only for some RF8 sitl models, so I think we're free to rework this in whatever way is best.

@IamPete1
Copy link
Member

A tricopter frame type with a zero AP_TAILSIT_MOTMX is just a tricopter quad-plane, not a tailsitter. The mask stuff should just work for for forward flight with tricopters, that's how tiltrottors also work (with the tilt motor mask param instead).

I think its better to use MotorsMatix, you have zero yaw torque, the only thing I can think should be the yaw head room stuff, we could just change the param if one of the no yaw frame class is selected.

@@ -491,7 +491,15 @@ void AP_MotorsMatrix::setup_motors(motor_frame_class frame_class, motor_frame_ty

switch (frame_class) {

case MOTOR_FRAME_QUAD:
case MOTOR_FRAME_TRI:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, combine indentation with other CASE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what you mean

@muramura
Copy link
Contributor

I think TRICOPTER is the subclass of choice here.
Do you want to remove this subclass?

https://github.com/ArduPilot/ardupilot/blob/180a72b52359838b236738ebf1860c92f7df8c44/libraries/AP_Motors/AP_MotorsTri.cpp

@kd0aij
Copy link
Contributor Author

kd0aij commented Sep 27, 2020

@muramura AP_Motors_Tri assumes you have a yaw servo for tilting the rear motor, and a tri-motor "copter tailsitter" doesn't have one, so MotorsMatrix is a better fit. The copter tailsitter code uses control surfaces to achieve yaw control and the Motors subclass only controls roll and pitch.

@muramura
Copy link
Contributor

@kd0aij san. I understand. Thanks for your comment.

@IamPete1
Copy link
Member

IamPete1 commented Feb 8, 2021

we can now do this via scripting, #15708

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.

None yet

3 participants