diff --git a/.gitignore b/.gitignore index 0a0e505..ac37242 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ __pycache__/ *.py[cod] *$py.class -/logs/image/* \ No newline at end of file +/logs/image/* +example/ \ No newline at end of file diff --git a/main.py b/main.py index 84d1430..82d6f11 100644 --- a/main.py +++ b/main.py @@ -71,7 +71,7 @@ def main(): else: run_task_4_back(Ctrl, msg) - run_task_2_5_back(Ctrl, msg, direction=arrow_direction) + # run_task_2_5_back(Ctrl, msg, direction=arrow_direction) # run_task_2_back(Ctrl, msg) diff --git a/task_4/task_4.py b/task_4/task_4.py index 718b89e..d70115b 100644 --- a/task_4/task_4.py +++ b/task_4/task_4.py @@ -56,7 +56,7 @@ def run_task_4_back(ctrl, msg): # 向右移动0.5秒 section('任务4-回程:向右移动', "移动") - go_lateral(ctrl, msg, distance=-0.1, speed=0.1, observe=True) # DEBUG + go_lateral(ctrl, msg, distance=-0.1, speed=0.15, observe=True) # DEBUG turn_degree_v2(ctrl, msg, degree=-90, absolute=True) @@ -67,9 +67,12 @@ def run_task_4_back(ctrl, msg): turn_degree_v2(ctrl, msg, degree=-90, absolute=True) pass_bar(ctrl, msg) + turn_degree_v2(ctrl, msg, degree=90, absolute=True) section('任务4-3:stone', "移动") go_straight(ctrl, msg, distance=1, speed=2) + turn_degree_v2(ctrl, msg, degree=90, absolute=True) + # Use enhanced calibration for better Y-axis correction on stone path go_straight(ctrl, msg, distance=4.5, speed=0.35, mode=11, gait_id=3, step_height=[0.21, 0.21], observe=True) # go_straight_with_enhanced_calibration(ctrl, msg, distance=4.5, speed=0.35, diff --git a/task_5/task_5.py b/task_5/task_5.py index 07eb014..d74342b 100644 --- a/task_5/task_5.py +++ b/task_5/task_5.py @@ -246,11 +246,11 @@ def run_task_5(ctrl, msg, direction='left', observe=False): move_to_hori_line(ctrl, msg, target_distance=1.35, observe=observe) section('任务5-5:转弯', "转弯") - turn_degree_v2(ctrl, msg, degree=90) + turn_degree_v2(ctrl, msg, degree=-90, absolute=True) go_straight(ctrl, msg, distance=1.2, speed=0.6, observe=observe) section('任务5-6:转弯', "转弯") - arc_turn_around_hori_line(ctrl, msg, angle_deg=-90, target_distance=0.3, observe=observe) + arc_turn_around_hori_line(ctrl, msg, angle_deg=-85, target_distance=0.3, observe=observe) section('任务5-5:上货', "卸货") ctrl.base_msg.lie_down(wait_time=SLEEP_TIME)