mirror of
https://gitee.com/dlmu-cone/half-steering-basic-framework
synced 2026-10-23 17:42:20 +08:00
new brench
This commit is contained in:
@@ -93,7 +93,7 @@ static void CalcOffsetAngle()
|
||||
new_offset -= 360.0f;
|
||||
else if (angle_diff < -180.0f)
|
||||
new_offset += 360.0f;
|
||||
chassis_cmd_send .offset_angle = last_offset_angle *(1.0f - smooth_factor) + new_offset * smooth_factor;
|
||||
chassis_cmd_send.offset_angle = last_offset_angle *(1.0f - smooth_factor) + new_offset * smooth_factor;
|
||||
last_offset_angle = chassis_cmd_send.offset_angle;
|
||||
// static float angle;
|
||||
// static float last_diff = 0.0f; // 用于在±180°附近保持上次符号,避免来回跳变
|
||||
|
||||
Reference in New Issue
Block a user