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 QuadChute Maximum roll and pitch angles #6665
Conversation
Ref #6660 |
@@ -562,6 +564,14 @@ VtolAttitudeControl::parameters_update() | |||
param_get(_params_handles.fw_min_alt, &v); | |||
_params.fw_min_alt = v; | |||
|
|||
/* maximum pitch angle (QuadChute) */ | |||
param_get(_params_handles.fw_qc_max_pitch, &l); |
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.
copy directly to &_params.fw_qc_max_pitch
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.
Done
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.
Reverted, doesn't work
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.
Type mismatch
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.
The parameter is an int, but you the param_get (mem)copied it into a float.
if (_params->fw_qc_max_roll > 0 | ||
&& _armed->armed && !_land_detected->landed) { | ||
|
||
if (math::degrees(euler.phi()) < -_params->fw_qc_max_roll |
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.
Check abs
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.
What do you mean?
* @max 180 | ||
* @group VTOL Attitude Control | ||
*/ | ||
PARAM_DEFINE_INT32(VT_FW_QC_P, 55); |
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.
Disable by default
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.
Done
Needs a few small changes. What about tailsitters? Is the attitude always relative to the MC frame and then rotated for FW? I've never used one. Thoughts for a more general solution longer term.
|
@Tumbili can you answer this? i'm not sure |
Regarding the parameters and @dagar 's comment: instead of adding separate angle parameters I would instead only add a margin parameter (in degrees) and add that on top of the largest angles already set for FW (take the ones for manual). Re tailsitter: there is rotation code used in FW pos control to rotate the attitude (search for tailsitter) which could be copied. Make sure this check gets excluded during tailsitter transitions. Or leave it for tailsitters at the moment. |
@AndreasAntener is that FW_P_LIM_MIN FW_P_LIM_MAX and FW_R_LIM ? |
If the check was in the FW attitude controller we'd get the rotation for free. |
452f7c3
to
68a7fde
Compare
Rebased to include tecs integrator resets |
Test flown, no regression. |
@dagar this seems ready to merge, all your comments are addressed. can you approve? |
Any reason why QC min alt is a float, but these new QC params are ints? |
Sidenote - log looks good. I think a quick improvement would be adding FW_PSP_OFF to the transitions. Front transition ramp up to PSP_OFF, and back transition could just maintain to better hold altitude. |
Consistency, all altitude params are float (perhaps smaller vehicles use half meter), all degree params are int.
Funny, that was exactly what i was thinking when i looked at the altitude. indeed the FW_PSP_OFF should be taken into account. perhaps mostly during back transition as in the first stage of the fron transition it might pull the vehicle backwards. |
This looks good for now, and would have likely saved at least a couple airframes on my end. Let's just try to keep in mind a more general solution closer to the controllers in the future. |
Addresses #6661
This triggers quadchute on maximum roll and pitch angles to prevent stalling or actuation problems like reversed ailerons/elevons