feat: 通信塔定点停车及其他动作优化

This commit is contained in:
bmy
2024-06-14 11:18:50 +08:00
parent 21ac0f773e
commit 2a3993ea62
4 changed files with 113 additions and 89 deletions

View File

@@ -34,7 +34,7 @@ class main_task():
# 转向 pid
# self.pid1 = PidWrap(0.5, 0, 0, output_limits=55) # 1.2
self.pid1 = PidWrap(1.2, 0, 0, output_limits=55) # 1.2
self.pid1 = PidWrap(1.2, 0, 0, output_limits=50) # 1.2
self.pid1.set_target(0)
def parse_data(self,data):
@@ -71,11 +71,11 @@ class main_task():
error_abs = abs(self.lane_error)
if error_abs > 50:
speed = 10
speed = 15
elif error_abs > 45:
speed = 11
speed = 15
elif error_abs > 35:
speed = 13
speed = 15
elif error_abs > 25:
speed = 15
elif error_abs > 15: