- Enhance rotation feedback by printing current angle during and after rotation - Adjust angles and add target distance in task 1 execution - Modify stop method in BaseMsg class to use milliseconds for duration
31 lines
787 B
Python
31 lines
787 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.move_base_hori_line import move_to_hori_line, arc_turn_around_hori_line
|
||
|
||
observe = True
|
||
|
||
def run_task_1(ctrl, msg):
|
||
print('🐶 Running task 1...')
|
||
|
||
# v2
|
||
print('😺 task 1 - 1')
|
||
arc_turn_around_hori_line(ctrl, msg, angle_deg=85, left=False, observe=observe)
|
||
|
||
print('😺 task 1 - 2')
|
||
move_to_hori_line(ctrl, msg, target_distance=1, observe=observe)
|
||
|
||
print('😺 task 1 - 3')
|
||
arc_turn_around_hori_line(ctrl, msg, angle_deg=180, target_distance=0.4, left=True, observe=observe)
|
||
|
||
return
|
||
|
||
print('😺 task 1 - 4')
|
||
move_to_hori_line(ctrl, msg, observe=observe)
|
||
|
||
|
||
|