Why attitude control is disabled in fixed-wing mode or forward transition mode in VTOL?

Hi, I’m testing VTOL vehicle on the ground bench for the first time.

But something strange happened to me.

According to several codes below, the attitude and attitude rate controllers are disabled in fixed-wing mode or forward transition mode.

But in fixed-wing mode or forward transition mode, isn’t that right that the attitude and attitude rate controllers should be enabled?

Additional info:
Though if the parameter VT_FW_PERM_STAB (Permanent Stabilization in fw mode) is set to 1 (enabled) the attitude and attitude rate controllers are always enabled, but its default value is 0 (disabled). Furthermore, in the description of the parameter on QGC, it says that “This parameter has been introduced for pure convenience sake”. So it means that its normal value is 0 (disabled) and the change to 1 (enabled) is only for convenience of some special case.

Environment:
PX4 v1.7.3 in Pixhawk2.1, DeltaQuad Airframe, QGC v3.3.1

in commander.cpp

void
Commander::run()
{
...
	while (!should_exit()) {
...
		/* publish states (armed, control_mode, vehicle_status, commander_state, vehicle_status_flags) at least with 5 Hz */
		if (counter % (200000 / COMMANDER_MONITORING_INTERVAL) == 0 || status_changed) {
			set_control_mode();
...
}
...
void
set_control_mode()
{
...
	switch (status.nav_state) {
	case vehicle_status_s::NAVIGATION_STATE_MANUAL:
		control_mode.flag_control_manual_enabled = true;
		control_mode.flag_control_auto_enabled = false;
		control_mode.flag_control_rates_enabled = stabilization_required();
		control_mode.flag_control_attitude_enabled = stabilization_required();
...
bool
stabilization_required()
{
	return (status.is_rotary_wing ||		// is a rotary wing, or
		status.vtol_fw_permanent_stab || 	// is a VTOL in fixed wing mode and stabilisation is on, or
		(vtol_status.vtol_in_trans_mode && 	// is currently a VTOL transitioning AND
			!status.is_rotary_wing));	// is a fixed wing, ie: transitioning back to rotary wing mode
}
1 Like

I got to see the reason.

In Manual mode of Fixed Wing status of a VTOL, the attitude controllers are disabled by default as the Manual mode means. But in Stabilized mode the controllers are enabled. The two modes are different.

1 Like