Update task functions by adding a new movement command in task 2, commenting out unused code in task 2.5, and disabling certain operations in task 3 for improved execution flow and clarity.
This commit is contained in:
parent
4eb237af83
commit
56c4131fa4
@ -138,6 +138,9 @@ class AsyncArrowDetector:
|
||||
return self.left_count, self.right_count
|
||||
|
||||
def run_task_2(ctrl, msg, xy_flag=False):
|
||||
go_to_xy(ctrl, msg, 0.8, 5, speed=0.5, observe=True)
|
||||
|
||||
return 'right'
|
||||
# 微调 xy 和角度
|
||||
go_to_xy_v2(ctrl, msg, 0.9, 0.25, speed=0.5, observe=True)
|
||||
turn_degree_v2(ctrl, msg, 0.8, absolute=True)
|
||||
|
@ -14,7 +14,7 @@ observe = True
|
||||
|
||||
def run_task_2_5(Ctrl, msg, direction='left'):
|
||||
section('任务2.5:预备进入任务3', "启动")
|
||||
go_straight(Ctrl, msg, distance=-0.1, speed=0.5, observe=observe)
|
||||
# go_straight(Ctrl, msg, distance=-0.1, speed=0.5, observe=observe)
|
||||
|
||||
# TEST
|
||||
turn_degree_v2(Ctrl, msg, 90, absolute=observe)
|
||||
|
@ -503,7 +503,7 @@ def run_task_3(ctrl, msg, time_sleep=5000):
|
||||
center_on_dual_tracks(ctrl, msg, max_deviation=10.0, observe=False)
|
||||
|
||||
section('任务3-2:yellow stop', "开始")
|
||||
go_until_yellow_area(ctrl, msg, yellow_ratio_threshold=0.15, speed=0.3)
|
||||
# go_until_yellow_area(ctrl, msg, yellow_ratio_threshold=0.15, speed=0.3)
|
||||
|
||||
# 原地站立3秒
|
||||
section("原地站立3秒", "站立")
|
||||
@ -516,7 +516,7 @@ def run_task_3(ctrl, msg, time_sleep=5000):
|
||||
ctrl.Send_cmd(msg)
|
||||
|
||||
info("开始原地站立3秒", "站立")
|
||||
time.sleep(time_sleep / 1000)
|
||||
# time.sleep(time_sleep / 1000)
|
||||
info("完成原地站立", "站立")
|
||||
|
||||
|
||||
|
@ -237,9 +237,9 @@ def run_task_5(ctrl, msg, direction='left', observe=False, time_sleep=5000):
|
||||
else:
|
||||
move_to_hori_line(ctrl, msg, target_distance=2, observe=observe, detect_func_version=4)
|
||||
|
||||
section('任务5-3:卸货', "卸货")
|
||||
ctrl.base_msg.lie_down(wait_time=time_sleep)
|
||||
ctrl.base_msg.stand_up()
|
||||
# section('任务5-3:卸货', "卸货")
|
||||
# ctrl.base_msg.lie_down(wait_time=time_sleep)
|
||||
# ctrl.base_msg.stand_up()
|
||||
|
||||
section('任务5-4:返回', "移动")
|
||||
go_straight(ctrl, msg, distance=-1, speed=0.5, observe=observe)
|
||||
@ -252,9 +252,9 @@ def run_task_5(ctrl, msg, direction='left', observe=False, time_sleep=5000):
|
||||
section('任务5-6:转弯', "转弯")
|
||||
arc_turn_around_hori_line(ctrl, msg, angle_deg=-85, target_distance=0.3, observe=observe, no_end_reset=True)
|
||||
|
||||
section('任务5-5:上货', "卸货")
|
||||
ctrl.base_msg.lie_down(wait_time=SLEEP_TIME)
|
||||
ctrl.base_msg.stand_up()
|
||||
# section('任务5-5:上货', "卸货")
|
||||
# ctrl.base_msg.lie_down(wait_time=SLEEP_TIME)
|
||||
# ctrl.base_msg.stand_up()
|
||||
|
||||
section('任务5-7:返回', "移动")
|
||||
turn_degree_v2(ctrl, msg, degree=-90, absolute=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user