Open danielhonies opened 1 year ago
@sfuhrer Dev call: Two pushers, used in pusher assist for yaw but getting disabled in multicopter flight 👀
Current hack to circumvent this: in CA configuration put both pusher motors on Y-axis 0. This will stop CA trying to use them for yaw control and use the upwards motors again.
@sfuhrer @RomanBapst
<?xml version="1.0"?>
paste this into standard_vtol.sdf.jinja to observe the behaviour in gazebo and change the following params: param set-default CA_ROTOR4_KM -0.0500 param set-default CA_ROTOR4_PX -0.2000 param set-default CA_ROTOR4_PY -0.2500 param set-default CA_ROTOR5_AX 1.0000 param set-default CA_ROTOR5_AZ 0.0000 param set-default CA_ROTOR5_PX -0.2000 param set-default CA_ROTOR5_PY 0.2500 param set-default CA_ROTOR_COUNT 6 param set-default PWM_MAIN_FUNC6 106 param set-default PWM_MAIN_FUNC7 201 param set-default PWM_MAIN_FUNC8 202 param set-default PWM_MAIN_FUNC9 203 param set-default VT_PITCH_MIN 2.0000
Thanks for the detailed report! Currently it will use all configured motors for attitude control in hover, so also the pusher for yaw if it's configured that way. Setting the Y Position to 0 was the correct move, and it doesn't have side effects, it's not needed anywhere. Pusher/Puller motors currently cannot be used for any attitude control, and we should probably disable it in the control allocation. Or at lest remove the Position fields if the direction is Forwards on a Standard VTOL.
What if we only add the pusher motors to the CA matrix if VT_FWD_THRUST_EN is enabled (and it's conditions met, also in FW flight) and otherwise remove them? I'm pretty sure it would work as expected then and the pushers could be used for yaw (which could be beneficial for bigger vehicles with less control authority through the hover motors).
Can we make a step back - you want to use the horizontal motors for yaw control in hover mode, but with VT_FWD_THRUST_EN enabled? But then in ever mode (pusher assist is only active in Altitude and higher modes)? There really should be some refactoring on how we do the whole puller/pusher allocation for VTOLs. The allocation should only receive 3d thrust and 3d torque, plus maybe a flag for enabling/disabling the horizontal motors, and with that info do the whole allocation (currently parts of which are done in the VTOL attitude controller). For your specific feature request: I think easiest for you is to pass a flag "horizontal motors enabled" to the CA, and in there then update the matrix accordingly.
Describe the bug
A standard VTOL with two pusher motors will not yaw in MC mode if VT_FWD_THRUST_EN is disabled. Due to VT_FWD_THRUST_EN being always disabled in stabilized the vehicle will not yaw at all in that mode.
I suspect this is due to CA trying to use the pushers with differential thrust but the VTOL code disables them in MC mode on a higher level if the parameter is not set. I reproduced this both in sim and real world.
To Reproduce
Steps to reproduce the behavior: Equip standard vtol with two pushers and set VT_FWD_THRUST_EN to disabled.
Expected behavior
CA needs to take notice of disabled pushers and use normal yaw control through the MC motors.