修复lqr_u计算bug
This commit is contained in:
1 parent
c059348614
commit
a0b9323774
1 file changed
-9
@@ -668,17 +668,8 @@ void lqr_balance_loop()
|
|||||||
distance_zeropoint = LQR_distance; // 位移零点重置
|
distance_zeropoint = LQR_distance; // 位移零点重置
|
||||||
pid_lqr_u.error_prev = 0; // 输出积分清零 测试
|
pid_lqr_u.error_prev = 0; // 输出积分清零 测试
|
||||||
}
|
}
|
||||||
// 没有摇杆指令,小车微微移动,需要重置位移零点,让小车自己回来
|
|
||||||
// if ((wrobot_move_stop_flag == 1) && (abs(LQR_speed) < 0.5))
|
|
||||||
// {
|
|
||||||
// distance_zeropoint = LQR_distance; // 位移零点重置
|
|
||||||
// pid_lqr_u.error_prev = 0; // 输出积分清零 测试
|
|
||||||
// wrobot_move_stop_flag = 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 实时重置位移零点和积分情形
|
// 实时重置位移零点和积分情形
|
||||||
// if (abs(robot_speed_diff) > 10 || (abs(LQR_speed) > 15)
|
|
||||||
// || jump_flag > 0 || wrobot.joyy != 0 || sitting_down )
|
|
||||||
if (abs(robot_speed_diff) > 10 || (abs(LQR_speed) > 15)
|
if (abs(robot_speed_diff) > 10 || (abs(LQR_speed) > 15)
|
||||||
|| wrobot.joyy != 0 || sitting_down )
|
|| wrobot.joyy != 0 || sitting_down )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user