Enhance main.py and task_3.py by enabling task execution in main and adjusting target y-coordinate for improved performance. Add additional logging for arrow direction recognition in main.py.
This commit is contained in:
parent
9ce1a04fb4
commit
dfb114257d
6
main.py
6
main.py
@ -51,11 +51,15 @@ def main():
|
||||
Ctrl.base_msg.stop() # BUG 垃圾指令 for eat
|
||||
|
||||
# time.sleep(100) # TEST,
|
||||
# run_task_1(Ctrl, msg, time_sleep=TIME_SLEEP)
|
||||
run_task_1(Ctrl, msg, time_sleep=TIME_SLEEP)
|
||||
|
||||
arrow_direction = run_task_2(Ctrl, msg, xy_flag=False)
|
||||
# arrow_direction = 'right' # TEST
|
||||
|
||||
info(f"识别到箭头方向: {arrow_direction}", "info")
|
||||
info(f"识别到箭头方向: {arrow_direction}", "info")
|
||||
info(f"识别到箭头方向: {arrow_direction}", "info")
|
||||
info(f"识别到箭头方向: {arrow_direction}", "info")
|
||||
info(f"识别到箭头方向: {arrow_direction}", "info")
|
||||
run_task_2_5(Ctrl, msg, direction=arrow_direction)
|
||||
|
||||
|
@ -205,7 +205,7 @@ def pass_up_down(ctrl, msg):
|
||||
descent_speed_threshold = -0.05 # 检测到开始下坡的速度阈值(负值表示下降)
|
||||
max_iterations = 200 # 最大循环次数,作为安全保障
|
||||
start_height = ctrl.odo_msg.xyz[2] # 记录起始高度
|
||||
y_target = 4 # 目标y坐标,达到此值时停止
|
||||
y_target = 4.5 # 目标y坐标,达到此值时停止
|
||||
|
||||
# 阶段控制
|
||||
descending_detected = False # 是否检测到正在下坡
|
||||
|
Loading…
x
Reference in New Issue
Block a user