feat: 增加转塔动作
This commit is contained in:
@@ -62,9 +62,9 @@ class main_task():
|
||||
error_abs = abs(self.lane_error)
|
||||
|
||||
if error_abs > 50:
|
||||
speed = 15
|
||||
speed = 11
|
||||
elif error_abs > 45:
|
||||
speed = 15
|
||||
speed = 13
|
||||
elif error_abs > 35:
|
||||
speed = 15
|
||||
elif error_abs > 25:
|
||||
@@ -94,7 +94,7 @@ class main_task():
|
||||
# pid_out = self.pid1.get(self.lane_error*0.65)
|
||||
pid_out = self.pid1.get(self.lane_error)
|
||||
# pid_out = -pid_out
|
||||
logger.debug(f"err={self.lane_error}, pwm out={pid_out}")
|
||||
# logger.debug(f"err={self.lane_error}, pwm out={pid_out}")
|
||||
self.by_cmd.send_speed_omega(pid_out)
|
||||
|
||||
self.socket.send_string("")
|
||||
|
||||
12
subtask.py
12
subtask.py
@@ -523,16 +523,20 @@ class up_tower():
|
||||
def exec(self):
|
||||
logger.info("找到塔")
|
||||
car_stop()
|
||||
time.sleep(1)
|
||||
calibrate_new(tlabel.TOWER, offset = 27, run = True)
|
||||
by_cmd.send_light(1)
|
||||
time.sleep(0.5)
|
||||
by_cmd.send_light(0)
|
||||
time.sleep(1)
|
||||
# calibrate(tlabel.TOWER, 27, False, 6)
|
||||
by_cmd.send_distance_x(-10, 130)
|
||||
time.sleep(1)
|
||||
by_cmd.send_distance_y(-10, 50)
|
||||
time.sleep(3)
|
||||
|
||||
by_cmd.send_angle_zhuan(10)
|
||||
time.sleep(9)
|
||||
by_cmd.send_distance_y(10, 50)
|
||||
time.sleep(1)
|
||||
by_cmd.send_angle_zhuan(0)
|
||||
time.sleep(1)
|
||||
# while True:
|
||||
# pass
|
||||
# 下一动作预备位置
|
||||
|
||||
Reference in New Issue
Block a user