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

Move Heli Quad from Heli Build to MultiRotor Build? #23752

Open
MattKear opened this issue May 11, 2023 · 0 comments
Open

Move Heli Quad from Heli Build to MultiRotor Build? #23752

MattKear opened this issue May 11, 2023 · 0 comments
Assignees
Labels

Comments

@MattKear
Copy link
Contributor

Starting this conversation as an Issue, in an attempt to capture the history behind the decision.

Currently been working on AP_MotorsHeli rework (see here: #23691). During this work the question has come up: Do we keep Heli-quad in the heli build or do we move it to the multirotor build.

It is an area of the code that has become stale/not commonly used. For example, the most prominent use case that we are aware of is a large heli-quad style aircraft (central drive with collective for thrust torque control), but this is running the multi-rotor code not the heli code.

The multi-rotor code has far better motor mixing and output saturation handling than heli-quad currently does. Given that the physics of most heli-quads will fly very similarly to fixed pitch multi-rotor’s it seems appropriate to actually bring heli-quad style setups into the multi-rotor builds. It should mostly mean a change to the wiki to help users to setup. For example using MOT_PWM_MIN _MAX range may not be appropriate any more as users will want access to SERVO*_MIN _MAX on each corner to set the correct blade angles.

Basically we have two ways of setting up a heli-quad in ArduPilot and neither have the full suite of options available to them. We basically have two options:

1) Bring Heli-Quad under the multi-rotor build:
To make this fully featured, this would require:

  • Exposing the rotor speed control (governer) to the multi-rotor build.
  • Updating the wiki with new guidance on how to setup

Advantages of doing this:

  • Heli-quad takes advantage of all of the control saturation and motor mixing of the multi-rotor build.
  • Reduction of code base with the multi-rotor code getting far more use, it is easier to maintain that one code path without it going stale.

Disadvantages of doing this:

  • This is essentially a breaking change for current users of heli-quad with the heli-build. There is a reasonable chance that all of the attitude/rate gains are still valid, so we may be able to handle this case with conversion (if it is needed at all!). Some experimenting required here.

2) Keep Heli-Quad under the heli build:
To make this fully featured, this would require:

  • Bringing across all of the motor-mixer and saturation handling from multi-rotor to heli

Advantages of doing this:

  • The swashplate setup method remains the same.
  • It will definately not be a breaking change.

Disadvantages of doing this:

  • Have not implimented yet but I am concerned that either we have a lot of code duplication to bring across the motor mixing etc to heli-quad or it may make the motors code somewhat convoluted as we may need to start peppering if build == heli throughout (not sure, just a feeling)
  • Harder to maintain, due to its rare useage.

Personal opinion: I would like to bring heli-quad into the multi-rotor build. Suffer any breaking changes now and ultimately get an easier to maintain block of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants