pref: subtask_raw 击打动作优化
This commit is contained in:
22
subtask.py
22
subtask.py
@@ -771,6 +771,7 @@ class get_rball():
|
||||
# 上古參數
|
||||
# by_cmd.send_distance_y(-15, 50) # 50 # 70
|
||||
by_cmd.send_distance_y(-15, 40) # 50 # 70
|
||||
time.sleep(1.5)
|
||||
# 6_9 參數
|
||||
# by_cmd.send_distance_y(-15, 35)
|
||||
# time.sleep(2)
|
||||
@@ -1314,7 +1315,7 @@ class move_area1():
|
||||
# 任务检查间隔
|
||||
by_cmd.send_position_axis_x(1, 150)
|
||||
# time.sleep(1)
|
||||
by_cmd.send_angle_claw_arm(225)
|
||||
# by_cmd.send_angle_claw_arm(225)
|
||||
|
||||
pass
|
||||
|
||||
@@ -1567,7 +1568,8 @@ class move_area2():
|
||||
pass
|
||||
def after(self):
|
||||
var.pid_turning.set(cfg["move_area"]["pid_kp"], cfg["move_area"]["pid_ki"], cfg["move_area"]["pid_kd"])
|
||||
by_cmd.send_position_axis_z(30, 0)
|
||||
# by_cmd.send_position_axis_z(30, 0)
|
||||
by_cmd.send_position_axis_z(30, 120)
|
||||
while by_cmd.send_angle_claw(90) == -1:
|
||||
pass
|
||||
time.sleep(2)
|
||||
@@ -1583,7 +1585,7 @@ class kick_ass():
|
||||
self.target_person = cfg_args['lane_mode']['mode_index']
|
||||
|
||||
# by_cmd.send_angle_claw(15)
|
||||
by_cmd.send_position_axis_x(1, 160)
|
||||
# by_cmd.send_position_axis_x(1, 160)
|
||||
|
||||
def find(self):
|
||||
ret = filter.find(tlabel.SIGN)
|
||||
@@ -1598,12 +1600,20 @@ class kick_ass():
|
||||
calibrate_new(tlabel.SIGN, offset = 8, run = True)
|
||||
by_cmd.send_angle_claw(15)
|
||||
time.sleep(0.5)
|
||||
by_cmd.send_position_axis_z(30, 80)
|
||||
by_cmd.send_position_axis_x(1, 130)
|
||||
# by_cmd.send_position_axis_z(30, 80)
|
||||
# OCR 摄像头向前移动
|
||||
by_cmd.send_position_axis_x(1, 50)
|
||||
time.sleep(1)
|
||||
by_cmd.send_position_axis_x(1, 150)
|
||||
|
||||
# 移动到中间
|
||||
by_cmd.send_distance_x(10, 295)
|
||||
time.sleep(4)
|
||||
time.sleep(1)
|
||||
by_cmd.send_angle_claw(15)
|
||||
by_cmd.send_angle_claw_arm(225)
|
||||
time.sleep(1)
|
||||
by_cmd.send_position_axis_z(30, 80)
|
||||
time.sleep(1)
|
||||
if self.target_person == 1:
|
||||
by_cmd.send_distance_x(-10, 150)
|
||||
time.sleep(1.5)
|
||||
|
||||
Reference in New Issue
Block a user