mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 21:53:34 +08:00
use optimal recovery strategy for tailsitters
This commit is contained in:
@@ -122,6 +122,7 @@ set(config_module_list
|
|||||||
lib/launchdetection
|
lib/launchdetection
|
||||||
lib/terrain_estimation
|
lib/terrain_estimation
|
||||||
lib/runway_takeoff
|
lib/runway_takeoff
|
||||||
|
lib/tailsitter_recovery
|
||||||
platforms/nuttx
|
platforms/nuttx
|
||||||
|
|
||||||
# had to add for cmake, not sure why wasn't in original config
|
# had to add for cmake, not sure why wasn't in original config
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ set(config_module_list
|
|||||||
lib/conversion
|
lib/conversion
|
||||||
lib/terrain_estimation
|
lib/terrain_estimation
|
||||||
lib/runway_takeoff
|
lib/runway_takeoff
|
||||||
|
lib/tailsitter_recovery
|
||||||
|
|
||||||
platforms/common
|
platforms/common
|
||||||
platforms/posix/px4_layer
|
platforms/posix/px4_layer
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ set(config_module_list
|
|||||||
lib/conversion
|
lib/conversion
|
||||||
lib/terrain_estimation
|
lib/terrain_estimation
|
||||||
lib/runway_takeoff
|
lib/runway_takeoff
|
||||||
|
lib/tailsitter_recovery
|
||||||
modules/controllib
|
modules/controllib
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ set(config_module_list
|
|||||||
lib/conversion
|
lib/conversion
|
||||||
lib/terrain_estimation
|
lib/terrain_estimation
|
||||||
lib/runway_takeoff
|
lib/runway_takeoff
|
||||||
|
lib/tailsitter_recovery
|
||||||
|
|
||||||
#
|
#
|
||||||
# QuRT port
|
# QuRT port
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ set(config_module_list
|
|||||||
lib/ecl
|
lib/ecl
|
||||||
lib/terrain_estimation
|
lib/terrain_estimation
|
||||||
lib/runway_takeoff
|
lib/runway_takeoff
|
||||||
|
lib/tailsitter_recovery
|
||||||
|
|
||||||
#
|
#
|
||||||
# QuRT port
|
# QuRT port
|
||||||
|
|||||||
@@ -387,9 +387,8 @@ MulticopterAttitudeControl::MulticopterAttitudeControl() :
|
|||||||
|
|
||||||
/* fetch initial parameter values */
|
/* fetch initial parameter values */
|
||||||
parameters_update();
|
parameters_update();
|
||||||
vehicle_status_poll();
|
|
||||||
|
|
||||||
if (_vehicle_status.is_vtol && _params.vtol_type == 0) {
|
if (_params.vtol_type == 0) {
|
||||||
// the vehicle is a tailsitter, use optimal recovery control strategy
|
// the vehicle is a tailsitter, use optimal recovery control strategy
|
||||||
_ts_opt_recovery = new TailsitterRecovery();
|
_ts_opt_recovery = new TailsitterRecovery();
|
||||||
}
|
}
|
||||||
@@ -835,6 +834,8 @@ MulticopterAttitudeControl::task_main()
|
|||||||
control_attitude(dt);
|
control_attitude(dt);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
vehicle_attitude_setpoint_poll();
|
||||||
|
_thrust_sp = _v_att_sp.thrust;
|
||||||
math::Quaternion q(_ctrl_state.q[0], _ctrl_state.q[1], _ctrl_state.q[2], _ctrl_state.q[3]);
|
math::Quaternion q(_ctrl_state.q[0], _ctrl_state.q[1], _ctrl_state.q[2], _ctrl_state.q[3]);
|
||||||
math::Quaternion q_sp(&_v_att_sp.q_d[0]);
|
math::Quaternion q_sp(&_v_att_sp.q_d[0]);
|
||||||
_ts_opt_recovery->setAttGains(_params.att_p, _params.yaw_ff);
|
_ts_opt_recovery->setAttGains(_params.att_p, _params.yaw_ff);
|
||||||
|
|||||||
Reference in New Issue
Block a user