mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 06:10:35 +08:00
mc_pos_control: replace legacy refactor
Until now we replaced legacy position controller functionality inside the flight task architecture to split up the huge position control module into the different tasks and have a modular setup with a clear setpoint interface. This commit removes all the legacy code and hard switches to using the flight task architecture for multicopter. This is done because maintaining and testing everything in parallel is not sustainable. The architecture is by now tested to cover all basic legacy functionality and missing corner cases can be fixed a lot easier with the new architecture.
This commit is contained in:
committed by
Lorenz Meier
parent
29fb5089bd
commit
e51e1bbe74
File diff suppressed because it is too large
Load Diff
@@ -609,16 +609,24 @@ PARAM_DEFINE_FLOAT(MPC_LAND_ALT2, 5.0f);
|
||||
PARAM_DEFINE_FLOAT(MPC_TKO_RAMP_T, 0.4f);
|
||||
|
||||
/**
|
||||
* Flag to test flight tasks instead of legacy functionality
|
||||
* Temporary Parameter during the transition to flight tasks
|
||||
* Manual-Position control sub-mode.
|
||||
*
|
||||
* The supported sub-modes are:
|
||||
* 0 Default position control where sticks map to position/velocity directly. Maximum speeds
|
||||
* is MPC_VEL_MANUAL.
|
||||
* 1 Smooth position control where setpoints are adjusted based on acceleration limits
|
||||
* and jerk limits.
|
||||
* 2 Sport mode that is the same Default position control but with velocity limits set to
|
||||
* the maximum allowed speeds (MPC_XY_VEL_MAX)
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @value 0 Legacy Functionality
|
||||
* @value 1 Test flight tasks
|
||||
* @max 2
|
||||
* @value 0 Default position control
|
||||
* @value 1 Smooth position control
|
||||
* @value 2 Sport position control
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_INT32(MPC_FLT_TSK, 0);
|
||||
PARAM_DEFINE_INT32(MPC_POS_MODE, 1);
|
||||
|
||||
/**
|
||||
* Flag to enable obstacle avoidance
|
||||
|
||||
Reference in New Issue
Block a user