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

VTOL: add parameter to set the PWM_OUTPUT_DEVICE_PATH #14732

Merged
merged 1 commit into from
Apr 22, 2020
Merged

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Apr 22, 2020

This PR enables the use of the FMU (AUX) output for the multicopter motors on standard VTOL and tiltrotors.

The device path is needed to apply PWM limits on the motors that are not
used for FW flight (switch them off). With this parameter the device path can be set
to either IO or FMU, depending on whether the motors are on the IO or FMU port.

The device path is needed to apply PWM limits on the motors that are not
used for FW flight (switch them off). With this parameter the device path can be set
to either IO or FMU, depending on whether the motors are on the IO or FMU port.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer sfuhrer added the Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! label Apr 22, 2020
@sfuhrer sfuhrer requested a review from RomanBapst April 22, 2020 12:38
@sfuhrer sfuhrer self-assigned this Apr 22, 2020
@sfuhrer
Copy link
Contributor Author

sfuhrer commented Apr 22, 2020

@dagar or would you have a better idea instead of a parameter to achieve that?

@dagar
Copy link
Member

dagar commented Apr 22, 2020

@dagar or would you have a better idea instead of a parameter to achieve that?

Nothing that isn't significantly more invasive. We'll find a better way to handle all of this holistically, but it's going to take some time.

@sfuhrer sfuhrer removed the request for review from RomanBapst April 22, 2020 17:18
@sfuhrer sfuhrer merged commit 172e435 into master Apr 22, 2020
@sfuhrer sfuhrer deleted the pr-mc-on-fmu branch April 22, 2020 18:42
@sfuhrer
Copy link
Contributor Author

sfuhrer commented Apr 22, 2020

@dagar or would you have a better idea instead of a parameter to achieve that?

Nothing that isn't significantly more invasive. We'll find a better way to handle all of this holistically, but it's going to take some time.

One way to (hopefully soonish) be able to solve it would be the control allocation.

@hamishwillee
Copy link
Contributor

@sfuhrer Does this need docs? I would have said yes because what is written above is meaningless to me. My understanding was that allocation of outputs was defined by the mixer and includes MC stuff. So the need for this is unclear.

@RomanBapst
Copy link
Contributor

@hamishwillee Historically the vtol controller was messing around with pwm outputs directly as the mixer interface was not designed for the functionality we need for vtol.
Now, the vtol controller was always using the "/dev/pwm_output0" for the aforementioned hackery. For boards which have an IO and an FMU output device the IO was mapped to "/dev/pwm_output0" and the FMU was mapped to "/dev/pwm_output1". So the requirement was to connect the hover motors to IO as the vtol controller was always using that device.
This PR enables the vtol controller to use either of the devices, so you can now also connect the motors to the FMU if you want to.

@hamishwillee
Copy link
Contributor

@RomanBapst (& @sfuhrer ) The problem here is that the docs don't mention the limitation at all, so not really clear where this should be extended.

I think "we" (meaning you :-) ) need to add a "VTOL Mixer" section under syntax explaining how you define a VTOL mixer - limitations/whatever and mentioning you need to set this parameter as well.

Can you do that?

I would do it but I bet there is more to it than just "define a multcopter mixer and an FW mixer(s), particularly for tailsitters etc. Though here is some idea of what it might look like.

## VTOL Mixer

A standard quadplane mixer is defined as a multicopter mixer and as a separate "Fixed wing mixer" (i.e. made up from a number of summing mixers).
Historically these had to be separately defined in the MAIN mixer and AUX mixer files (respectively).
From PX4v1.11 the multicopter can now be defined in the AUX file, if `VT_MC_ON_FMU` is enabled.

<Whatever you want to say about tiltrotor and tailsitter ???? >

Thoughts?

@TSC21 TSC21 added this to the Release v1.11.0 milestone May 4, 2020
@hamishwillee
Copy link
Contributor

@RomanBapst @sfuhrer ^^^^ Please see that last comment

@sfuhrer
Copy link
Contributor Author

sfuhrer commented May 15, 2020

@hamishwillee I would propose something like this:

## VTOL Mixer

The mixer system for a VTOL vehicle can be either combined into a single mixer where all the actuators are connected to either the IO or the FMU port, or split into two separate ones, one for IO and one for AUX. 
If separated, it is recommended that all the multicopter motors are one one, and all the servos and the fixed-wing motor on the other. Use the multirotor mixers for the multirotor mixers, and the summing mixers for the fixed-wing actuators (plus the tilting servos in case of a tiltrotor VTOL).
If you want to use the FMU output for the multicopter motors (only possible since PX4v1.11), you need to set VT_MC_ON_FMU to 1, as they are otherwise not switched off when in fixed-wing flight mode.

@hamishwillee
Copy link
Contributor

hamishwillee commented May 18, 2020

Thanks. Slightly modified version of your doc suggestion for review in PX4/PX4-Devguide#1042. Feel free to create PRs for your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants