2025-05-11 15:44:54 +00:00
|
|
|
|
import time
|
2025-05-12 00:05:54 +08:00
|
|
|
|
import cv2
|
2025-05-14 11:25:44 +00:00
|
|
|
|
import sys
|
|
|
|
|
import os
|
2025-05-11 15:44:54 +00:00
|
|
|
|
|
2025-05-14 11:25:44 +00:00
|
|
|
|
# 添加父目录到路径,以便能够导入utils
|
|
|
|
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
2025-05-15 08:35:38 +00:00
|
|
|
|
from base_move.move_base_hori_line import move_to_hori_line, arc_turn_around_hori_line
|
2025-05-12 08:06:08 +00:00
|
|
|
|
|
2025-05-15 12:44:48 +00:00
|
|
|
|
observe = True
|
2025-05-14 12:12:57 +00:00
|
|
|
|
|
2025-05-14 19:35:29 +08:00
|
|
|
|
def run_task_1(ctrl, msg):
|
2025-05-12 08:06:08 +00:00
|
|
|
|
print('Running task 1...')
|
|
|
|
|
|
2025-05-14 11:25:44 +00:00
|
|
|
|
# v2
|
2025-05-15 08:35:38 +00:00
|
|
|
|
arc_turn_around_hori_line(ctrl, msg, angle_deg=90, left=False, observe=observe)
|
2025-05-15 12:08:49 +00:00
|
|
|
|
|
|
|
|
|
move_to_hori_line(ctrl, msg, target_distance=1, observe=observe)
|
2025-05-12 08:06:08 +00:00
|
|
|
|
|
2025-05-15 19:53:36 +08:00
|
|
|
|
arc_turn_around_hori_line(ctrl, msg, angle_deg=180, left=True, observe=observe)
|
2025-05-12 08:06:08 +00:00
|
|
|
|
|
2025-05-15 19:53:36 +08:00
|
|
|
|
move_to_hori_line(ctrl, msg, observe=observe)
|
2025-05-12 08:06:08 +00:00
|
|
|
|
|
|
|
|
|
|
2025-05-11 15:44:54 +00:00
|
|
|
|
|