Update movement parameters across multiple tasks for improved execution. Adjust distance in task 1 and task 2.5, modify calibration handling in Robot_Ctrl class, and enhance task 3 with new lateral movement command. Refine Gait_Params configuration for better performance.
This commit is contained in:
parent
96217d9af9
commit
24de43692c
2
main.py
2
main.py
@ -133,7 +133,7 @@ class Robot_Ctrl(object):
|
||||
self.mode_ok = 0
|
||||
|
||||
def reset_offset(self):
|
||||
self.calibration_offset = self.odo_msg.xyz
|
||||
self.is_calibrated = False
|
||||
|
||||
def msg_handler_o(self, channel, data):
|
||||
self.odo_msg = localization_lcmt().decode(data)
|
||||
|
@ -192,6 +192,6 @@ def run_task_1_back(ctrl, msg, time_sleep=5000):
|
||||
section('任务1-19: 90度旋转', "旋转")
|
||||
turn_degree_v2(ctrl, msg, degree=0, absolute=True)
|
||||
|
||||
go_straight(ctrl, msg, distance=-1.4, observe=observe)
|
||||
go_straight(ctrl, msg, distance=-1, observe=observe)
|
||||
|
||||
success("任务1-back完成", "完成")
|
@ -31,7 +31,7 @@ def run_task_2_5(Ctrl, msg, direction='left'):
|
||||
no_end_reset=True,
|
||||
)
|
||||
|
||||
go_straight(Ctrl, msg, distance=0.2, speed=0.5, observe=observe)
|
||||
go_straight(Ctrl, msg, distance=0.1, speed=0.5, observe=observe)
|
||||
section('任务2.5-2:第二次旋转', "移动")
|
||||
|
||||
def run_task_2_5_back(Ctrl, msg, direction='left'):
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -419,7 +419,8 @@ def run_task_3(ctrl, msg, time_sleep=5000):
|
||||
pass_up_down(ctrl, msg)
|
||||
|
||||
turn_degree_v2(ctrl, msg, 90, absolute=True)
|
||||
# center_on_dual_tracks(ctrl, msg, max_deviation=10.0, observe=False)
|
||||
go_lateral(ctrl, msg, distance=-0.2, speed=0.5, observe=True)
|
||||
center_on_dual_tracks(ctrl, msg, max_deviation=10.0, observe=False)
|
||||
|
||||
section('任务3-2:yellow stop', "开始")
|
||||
go_until_yellow_area(ctrl, msg, yellow_ratio_threshold=0.15, speed=0.3)
|
||||
|
@ -56,6 +56,8 @@ def run_task_4_back(ctrl, msg):
|
||||
go_straight(ctrl, msg, distance=3, speed=1, observe=True)
|
||||
center_on_dual_tracks(ctrl, msg, max_deviation=10.0, observe=False)
|
||||
|
||||
return
|
||||
|
||||
# 向右移动0.5秒
|
||||
section('任务4-回程:向右移动', "移动")
|
||||
go_lateral(ctrl, msg, distance=-0.1, speed=0.15, observe=True) # DEBUG
|
||||
@ -71,7 +73,7 @@ def run_task_4_back(ctrl, msg):
|
||||
|
||||
turn_degree_v2(ctrl, msg, degree=-90, absolute=True)
|
||||
section('任务4-3:stone', "移动")
|
||||
go_straight(ctrl, msg, distance=1, speed=2)
|
||||
go_straight(ctrl, msg, distance=1, speed=1)
|
||||
|
||||
turn_degree_v2(ctrl, msg, degree=-92, absolute=True)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user