区域赛版本
This commit is contained in:
@@ -415,8 +415,8 @@ class task_queuem(task):
|
||||
class get_block1():
|
||||
def init(self):
|
||||
var.task_speed = 15
|
||||
act.cmd.camera(0)
|
||||
act.cmd.z2(20, 60, 0)
|
||||
while (by_cmd.send_angle_camera(0) == -1):
|
||||
pass
|
||||
filter.switch_camera(1)
|
||||
# if cfg['get_block']['first_block'] == "blue":
|
||||
# self.target_label = tlabel.BBLOCK
|
||||
@@ -439,8 +439,7 @@ class get_block1():
|
||||
if any(ret):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
|
||||
def exec(self):
|
||||
car_stop()
|
||||
if self.target_counts[0] > self.target_counts[1]:
|
||||
@@ -771,8 +770,8 @@ class get_rball():
|
||||
logger.info("抓红球")
|
||||
# by_cmd.send_angle_scoop(15)
|
||||
time.sleep(0.5)
|
||||
by_cmd.send_position_axis_z(30, 170)
|
||||
time.sleep(2.5)
|
||||
by_cmd.send_position_axis_z(30, 190) #170
|
||||
time.sleep(3.5)
|
||||
by_cmd.send_angle_scoop(7)
|
||||
time.sleep(0.5)
|
||||
by_cmd.send_speed_y(15)
|
||||
@@ -944,7 +943,7 @@ class put_hanoi1():
|
||||
def after(self):
|
||||
# var.switch_lane_model = True
|
||||
if utils.direction == tlabel.RMARK:
|
||||
var.pid_turning.set(cfg["put_hanoi1"]["pid_kp"] - 0.3, cfg["put_hanoi1"]["pid_ki"], cfg["put_hanoi1"]["pid_kd"])
|
||||
var.pid_turning.set(cfg["put_hanoi1"]["pid_kp"] - 0.4, cfg["put_hanoi1"]["pid_ki"], cfg["put_hanoi1"]["pid_kd"])
|
||||
else:
|
||||
var.pid_turning.set(cfg["put_hanoi1"]["pid_kp"], cfg["put_hanoi1"]["pid_ki"], cfg["put_hanoi1"]["pid_kd"])
|
||||
pass
|
||||
@@ -1185,6 +1184,7 @@ class put_hanoi2():
|
||||
# pass
|
||||
by_cmd.send_speed_x(12)
|
||||
time.sleep(1.5)
|
||||
var.task_speed = 10
|
||||
def nexec(self):
|
||||
pass
|
||||
def after(self):
|
||||
@@ -1222,6 +1222,7 @@ class put_hanoi3():
|
||||
def nexec(self):
|
||||
pass
|
||||
def after(self):
|
||||
var.task_speed = 0
|
||||
by_cmd.send_position_axis_x(1, 150)
|
||||
var.pid_turning.set(cfg["put_hanoi3"]["pid_kp"], cfg["put_hanoi3"]["pid_ki"], cfg["put_hanoi3"]["pid_kd"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user