- Remove imports for task_5 and task_test - Add import for task_4 - Comment out task_2_5 execution - Uncomment and execute task_4
27 lines
699 B
Python
27 lines
699 B
Python
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.go_straight import go_straight
|
||
from utils.log_helper import LogHelper, get_logger, section, info, debug, warning, error, success, timing
|
||
|
||
# 创建本模块特定的日志记录器
|
||
logger = get_logger("任务5")
|
||
|
||
def run_task_4(ctrl, msg):
|
||
"""
|
||
参数:
|
||
ctrl: Robot_Ctrl对象
|
||
msg: 控制消息对象
|
||
image_processor: 可选的图像处理器实例
|
||
"""
|
||
|
||
turn_degree(ctrl, msg, 90, absolute=90)
|
||
|
||
go_straight(ctrl, msg, distance=10)
|
||
|