Update .gitignore to include 'example/' directory and adjust movement parameters in task 4 and task 5 for improved control. Comment out a function call in main.py for clarity.
This commit is contained in:
parent
7ee061ffa9
commit
77bee57da9
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ __pycache__/
|
|||||||
*$py.class
|
*$py.class
|
||||||
|
|
||||||
/logs/image/*
|
/logs/image/*
|
||||||
|
example/
|
2
main.py
2
main.py
@ -71,7 +71,7 @@ def main():
|
|||||||
else:
|
else:
|
||||||
run_task_4_back(Ctrl, msg)
|
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)
|
# run_task_2_back(Ctrl, msg)
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ def run_task_4_back(ctrl, msg):
|
|||||||
|
|
||||||
# 向右移动0.5秒
|
# 向右移动0.5秒
|
||||||
section('任务4-回程:向右移动', "移动")
|
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)
|
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)
|
turn_degree_v2(ctrl, msg, degree=-90, absolute=True)
|
||||||
pass_bar(ctrl, msg)
|
pass_bar(ctrl, msg)
|
||||||
|
|
||||||
|
turn_degree_v2(ctrl, msg, degree=90, absolute=True)
|
||||||
section('任务4-3:stone', "移动")
|
section('任务4-3:stone', "移动")
|
||||||
go_straight(ctrl, msg, distance=1, speed=2)
|
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
|
# 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(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,
|
# go_straight_with_enhanced_calibration(ctrl, msg, distance=4.5, speed=0.35,
|
||||||
|
@ -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)
|
move_to_hori_line(ctrl, msg, target_distance=1.35, observe=observe)
|
||||||
|
|
||||||
section('任务5-5:转弯', "转弯")
|
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)
|
go_straight(ctrl, msg, distance=1.2, speed=0.6, observe=observe)
|
||||||
|
|
||||||
section('任务5-6:转弯', "转弯")
|
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:上货', "卸货")
|
section('任务5-5:上货', "卸货")
|
||||||
ctrl.base_msg.lie_down(wait_time=SLEEP_TIME)
|
ctrl.base_msg.lie_down(wait_time=SLEEP_TIME)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user