1.0
This commit is contained in:
@@ -42,9 +42,9 @@ void CorridorCtrl_Compute(const CorridorState_t *state,
|
||||
* - kp_y * e_y : 横向纠偏,车身偏了就产生角速度拉回来
|
||||
* ======================================================== */
|
||||
|
||||
float w_cmd = s_cfg.kp_theta * state->e_th
|
||||
+ s_cfg.kd_theta * (-imu_wz)
|
||||
+ s_cfg.kp_y * state->e_y;
|
||||
float w_cmd = -(s_cfg.kp_theta * state->e_th
|
||||
+ s_cfg.kd_theta * imu_wz
|
||||
+ s_cfg.kp_y * state->e_y);
|
||||
|
||||
/* 角速度限幅:防止 PD 溢出导致原地打转 */
|
||||
w_cmd = clampf(w_cmd, -s_cfg.w_max, s_cfg.w_max);
|
||||
|
||||
Reference in New Issue
Block a user