mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
Remove parameters MPC_{XY/Z/YAW}_MAN_EXPO and use default value instead
This commit is contained in:
committed by
Silvan Fuhrer
parent
5b94557310
commit
5c5bf0b83d
@@ -677,7 +677,6 @@
|
||||
1 1 MPC_VEL_MAN_SIDE -1.000000000000000000 9
|
||||
1 1 MPC_XY_CRUISE 5.000000000000000000 9
|
||||
1 1 MPC_XY_ERR_MAX 2.000000000000000000 9
|
||||
1 1 MPC_XY_MAN_EXPO 0.600000023841857910 9
|
||||
1 1 MPC_XY_P 0.949999988079071045 9
|
||||
1 1 MPC_XY_TRAJ_P 0.500000000000000000 9
|
||||
1 1 MPC_XY_VEL_ALL -10.000000000000000000 9
|
||||
@@ -687,9 +686,7 @@
|
||||
1 1 MPC_XY_VEL_P_ACC 1.799999952316284180 9
|
||||
1 1 MPC_YAWRAUTO_ACC 60.000000000000000000 9
|
||||
1 1 MPC_YAWRAUTO_MAX 45.000000000000000000 9
|
||||
1 1 MPC_YAW_EXPO 0.600000023841857910 9
|
||||
1 1 MPC_YAW_MODE 0 6
|
||||
1 1 MPC_Z_MAN_EXPO 0.600000023841857910 9
|
||||
1 1 MPC_Z_P 1.000000000000000000 9
|
||||
1 1 MPC_Z_VEL_ALL -3.000000000000000000 9
|
||||
1 1 MPC_Z_VEL_D_ACC 0.000000000000000000 9
|
||||
|
||||
@@ -64,10 +64,10 @@ public:
|
||||
float getYaw() const { return _positions(2); }
|
||||
float getThrottleZeroCentered() const { return _positions(3); }
|
||||
|
||||
float getRollExpo() const { return math::expo_deadzone(getRoll(), _param_mpc_xy_man_expo.get(), _param_man_deadzone.get()); }
|
||||
float getPitchExpo() const { return math::expo_deadzone(getPitch(), _param_mpc_xy_man_expo.get(), _param_man_deadzone.get()); }
|
||||
float getYawExpo() const { return math::expo_deadzone(getYaw(), _param_mpc_yaw_expo.get(), _param_man_deadzone.get()); }
|
||||
float getThrottleZeroCenteredExpo() const { return math::expo_deadzone(getThrottleZeroCentered(), _param_mpc_z_man_expo.get(), _param_man_deadzone.get()); }
|
||||
float getRollExpo(float expo = .6f) const { return math::expo_deadzone(getRoll(), expo, _param_man_deadzone.get()); }
|
||||
float getPitchExpo(float expo = .6f) const { return math::expo_deadzone(getPitch(), expo, _param_man_deadzone.get()); }
|
||||
float getYawExpo(float expo = .6f) const { return math::expo_deadzone(getYaw(), expo, _param_man_deadzone.get()); }
|
||||
float getThrottleZeroCenteredExpo(float expo = .6f) const { return math::expo_deadzone(getThrottleZeroCentered(), expo, _param_man_deadzone.get()); }
|
||||
|
||||
const matrix::Vector2f getPitchRoll() { return {getPitch(), getRoll()}; }
|
||||
const matrix::Vector2f getPitchRollExpo() { return {getPitchExpo(), getRollExpo()}; }
|
||||
@@ -98,9 +98,6 @@ private:
|
||||
uORB::Subscription _failsafe_flags_sub{ORB_ID(failsafe_flags)};
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamFloat<px4::params::MAN_DEADZONE>) _param_man_deadzone,
|
||||
(ParamFloat<px4::params::MPC_XY_MAN_EXPO>) _param_mpc_xy_man_expo,
|
||||
(ParamFloat<px4::params::MPC_Z_MAN_EXPO>) _param_mpc_z_man_expo,
|
||||
(ParamFloat<px4::params::MPC_YAW_EXPO>) _param_mpc_yaw_expo
|
||||
(ParamFloat<px4::params::MAN_DEADZONE>) _param_man_deadzone
|
||||
)
|
||||
};
|
||||
|
||||
@@ -167,7 +167,6 @@ private:
|
||||
(ParamFloat<px4::params::MPC_THR_MAX>) _param_mpc_thr_max,
|
||||
(ParamFloat<px4::params::MPC_THR_HOVER>) _param_mpc_thr_hover,
|
||||
(ParamInt<px4::params::MPC_THR_CURVE>) _param_mpc_thr_curve,
|
||||
(ParamFloat<px4::params::MPC_YAW_EXPO>) _param_mpc_yaw_expo,
|
||||
|
||||
(ParamFloat<px4::params::COM_SPOOLUP_TIME>) _param_com_spoolup_time
|
||||
)
|
||||
|
||||
@@ -146,8 +146,7 @@ MulticopterAttitudeControl::generate_attitude_setpoint(const Quatf &q, float dt)
|
||||
}
|
||||
|
||||
const float yaw = Eulerf(q).psi();
|
||||
const float yaw_stick_input = math::expo_deadzone(_manual_control_setpoint.yaw, _param_mpc_yaw_expo.get(),
|
||||
_param_man_deadzone.get());
|
||||
const float yaw_stick_input = math::expo_deadzone(_manual_control_setpoint.yaw, .6f, _param_man_deadzone.get());
|
||||
_stick_yaw.generateYawSetpoint(attitude_setpoint.yaw_sp_move_rate, _yaw_setpoint_stabilized, yaw_stick_input, yaw, dt,
|
||||
_unaided_heading);
|
||||
|
||||
|
||||
@@ -129,54 +129,3 @@ PARAM_DEFINE_FLOAT(MPC_ACC_HOR_MAX, 5.f);
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MPC_JERK_MAX, 8.f);
|
||||
|
||||
/**
|
||||
* Manual position control stick exponential curve sensitivity
|
||||
*
|
||||
* The higher the value the less sensitivity the stick has around zero
|
||||
* while still reaching the maximum value with full stick deflection.
|
||||
*
|
||||
* 0 Purely linear input curve
|
||||
* 1 Purely cubic input curve
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @decimal 2
|
||||
* @increment 0.01
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MPC_XY_MAN_EXPO, 0.6f);
|
||||
|
||||
/**
|
||||
* Manual control stick vertical exponential curve
|
||||
*
|
||||
* The higher the value the less sensitivity the stick has around zero
|
||||
* while still reaching the maximum value with full stick deflection.
|
||||
*
|
||||
* 0 Purely linear input curve
|
||||
* 1 Purely cubic input curve
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @decimal 2
|
||||
* @increment 0.01
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MPC_Z_MAN_EXPO, 0.6f);
|
||||
|
||||
/**
|
||||
* Manual control stick yaw rotation exponential curve
|
||||
*
|
||||
* The higher the value the less sensitivity the stick has around zero
|
||||
* while still reaching the maximum value with full stick deflection.
|
||||
*
|
||||
* 0 Purely linear input curve
|
||||
* 1 Purely cubic input curve
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @decimal 2
|
||||
* @increment 0.01
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MPC_YAW_EXPO, 0.6f);
|
||||
|
||||
Reference in New Issue
Block a user