mi-task/task_4/task_4.py
havoc420ubuntu 30c63ce2e5 refactor(task_4): adjust movement parameters and image save path
- Modify go_straight distance from 10 to 6 in task 4
- Update image save path in rgb-camera test
2025-05-25 08:53:13 +00:00

27 lines
698 B
Python
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.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=6)