mi-task/task_test/task_left_line.py
2025-08-18 11:06:42 +08:00

21 lines
746 B
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import time
import sys
import os
# 添加父目录到路径以便能够导入utils
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from base_move.turn_degree import turn_degree
from base_move.move_base_hori_line import follow_left_side_track
from base_move.go_straight import go_straight
from utils.log_helper import LogHelper, get_logger, section, info, debug, warning, error, success, timing
# 创建本模块特定的日志记录器
logger = get_logger("任务-test")
def run_task_test(ctrl, msg):
# turn_degree(ctrl, msg, 90, absolute=True)
# turn_degree(ctrl, msg, 90, absolute=True)
go_straight(ctrl, msg, distance=0.3, speed=0.1)
# follow_left_side_track(ctrl, msg)
# time.sleep(100)