FW auto launch: Add option to lock selected surfaces before/during launch (#25799)

* FWModeManager: add option to set flag for disabling actuators during launch

Signed-off-by: Silvan <silvan@auterion.com>

* Allocation: add option to each control surface to be locked for launch

Signed-off-by: Silvan <silvan@auterion.com>

* FW rate control: reset integral while control surfaces are locked

Signed-off-by: Silvan <silvan@auterion.com>

---------

Signed-off-by: Silvan <silvan@auterion.com>
Co-authored-by: mahima-yoga <mahima@auterion.com>
This commit is contained in:
Silvan Fuhrer
2026-02-17 09:26:38 +01:00
committed by GitHub
parent fd4b958790
commit 11007dc893
12 changed files with 105 additions and 4 deletions
@@ -1207,6 +1207,7 @@ FixedWingModeManager::control_auto_takeoff(const hrt_abstime &now, const float c
_takeoff_init_position = global_position;
_takeoff_ground_alt = _current_altitude;
_launch_current_yaw = _yaw;
_time_launch_detected = now;
}
const Vector2f launch_local_position = _global_local_proj_ref.project(_takeoff_init_position(0),
@@ -1282,6 +1283,9 @@ FixedWingModeManager::control_auto_takeoff(const hrt_abstime &now, const float c
launch_detection_status_s launch_detection_status;
launch_detection_status.timestamp = now;
launch_detection_status.launch_detection_state = _launchDetector.getLaunchDetected();
launch_detection_status.selected_control_surface_disarmed =
hrt_elapsed_time(&_time_launch_detected) < _param_fw_laun_cs_lk_dy.get() * 1_s
|| _time_launch_detected == 0;
_launch_detection_status_pub.publish(launch_detection_status);
}
@@ -1377,6 +1381,7 @@ FixedWingModeManager::control_auto_takeoff_no_nav(const hrt_abstime &now, const
if (!_launch_detected && _launchDetector.getLaunchDetected() > launch_detection_status_s::STATE_WAITING_FOR_LAUNCH) {
_launch_detected = true;
_takeoff_ground_alt = _current_altitude;
_time_launch_detected = now;
}
/* Launch has been detected, hence we have to control the plane. */
@@ -1408,6 +1413,9 @@ FixedWingModeManager::control_auto_takeoff_no_nav(const hrt_abstime &now, const
launch_detection_status_s launch_detection_status;
launch_detection_status.timestamp = now;
launch_detection_status.launch_detection_state = _launchDetector.getLaunchDetected();
launch_detection_status.selected_control_surface_disarmed =
hrt_elapsed_time(&_time_launch_detected) < _param_fw_laun_cs_lk_dy.get() * 1_s
|| _time_launch_detected == 0;
_launch_detection_status_pub.publish(launch_detection_status);
}
@@ -2312,6 +2320,8 @@ FixedWingModeManager::reset_takeoff_state()
_launch_detected = false;
_time_launch_detected = 0;
_takeoff_ground_alt = _current_altitude;
}