mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
use optimal recovery strategy for tailsitters
This commit is contained in:
parent
ac4e95df05
commit
7c3a67e374
@ -122,6 +122,7 @@ set(config_module_list
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
platforms/nuttx
|
||||
|
||||
# had to add for cmake, not sure why wasn't in original config
|
||||
|
||||
@ -40,6 +40,7 @@ set(config_module_list
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
|
||||
@ -49,6 +49,7 @@ set(config_module_list
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
modules/controllib
|
||||
|
||||
#
|
||||
|
||||
@ -72,6 +72,7 @@ set(config_module_list
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
|
||||
#
|
||||
# QuRT port
|
||||
|
||||
@ -54,6 +54,7 @@ set(config_module_list
|
||||
lib/ecl
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
|
||||
#
|
||||
# QuRT port
|
||||
|
||||
@ -387,9 +387,8 @@ MulticopterAttitudeControl::MulticopterAttitudeControl() :
|
||||
|
||||
/* fetch initial parameter values */
|
||||
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
|
||||
_ts_opt_recovery = new TailsitterRecovery();
|
||||
}
|
||||
@ -835,6 +834,8 @@ MulticopterAttitudeControl::task_main()
|
||||
control_attitude(dt);
|
||||
|
||||
} 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_sp(&_v_att_sp.q_d[0]);
|
||||
_ts_opt_recovery->setAttGains(_params.att_p, _params.yaw_ff);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user