提交 6_9 巡线模型参数和子任务
This commit is contained in:
38
subtask.py
38
subtask.py
@@ -657,8 +657,19 @@ class up_tower():
|
||||
# calibrate(tlabel.TOWER, 27, False, 6)
|
||||
by_cmd.send_distance_x(-10, 120)
|
||||
time.sleep(1)
|
||||
by_cmd.send_distance_y(-10, 50)
|
||||
time.sleep(3)
|
||||
# 上古參數
|
||||
# by_cmd.send_distance_y(-10, 50)
|
||||
# 6_9 模型參數
|
||||
by_cmd.send_distance_y(-10, 40)
|
||||
# 7_12_3 模型參數
|
||||
# by_cmd.send_distance_y(-10, 50)
|
||||
# time.sleep(1)
|
||||
car_stop()
|
||||
# FIXME 如果下發 distance 後直接 car_stop,則 distance 執行時間僅由指令間處理延時決定
|
||||
# time.sleep(3)
|
||||
# by_cmd.send_speed_y(-10)
|
||||
# time.sleep(0.15)
|
||||
|
||||
by_cmd.send_angle_zhuan(10)
|
||||
time.sleep(12)
|
||||
by_cmd.send_speed_y(10)
|
||||
@@ -702,8 +713,15 @@ class get_rball():
|
||||
time.sleep(0.5)
|
||||
# 靠近塔
|
||||
by_cmd.send_angle_scoop(20)
|
||||
by_cmd.send_distance_y(-15, 45) # 50
|
||||
# 上古參數
|
||||
# by_cmd.send_distance_y(-15, 45) # 50
|
||||
# 6_9 參數
|
||||
by_cmd.send_distance_y(-15, 35)
|
||||
time.sleep(2)
|
||||
# 7_12_3 參數
|
||||
# by_cmd.send_distance_y(-15, 45)
|
||||
# time.sleep(2)
|
||||
car_stop()
|
||||
calibrate_new(tlabel.RBALL,offset = 44, run = True)
|
||||
time.sleep(1)
|
||||
logger.info("抓红球")
|
||||
@@ -826,7 +844,8 @@ class put_hanoi1():
|
||||
# time.sleep(0.5)
|
||||
# by_cmd.send_distance_x(10, 200)
|
||||
|
||||
by_cmd.send_distance_x(10, 180)
|
||||
# by_cmd.send_distance_x(10, 180)
|
||||
by_cmd.send_distance_x(10, 250)
|
||||
time.sleep(1)
|
||||
car_stop()
|
||||
|
||||
@@ -1358,9 +1377,10 @@ class kick_ass():
|
||||
car_stop()
|
||||
time.sleep(1)
|
||||
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, 60)
|
||||
by_cmd.send_position_axis_x(1, 120)
|
||||
by_cmd.send_position_axis_x(1, 130)
|
||||
|
||||
if self.target_person == 1:
|
||||
target_distance = self.pos_gap1
|
||||
@@ -1371,15 +1391,15 @@ class kick_ass():
|
||||
time.sleep(1.5 + (self.target_person - 1) * 0.7 )
|
||||
car_stop()
|
||||
|
||||
by_cmd.send_angle_claw_arm(220)
|
||||
by_cmd.send_angle_claw(15)
|
||||
# by_cmd.send_angle_claw_arm(220)
|
||||
# time.sleep(0.5)
|
||||
by_cmd.send_position_axis_x(1, 20)
|
||||
time.sleep(3)
|
||||
by_cmd.send_position_axis_x(1, 120)
|
||||
time.sleep(1)
|
||||
logger.debug("結束任務,前進四")
|
||||
by_cmd.send_speed_x(25)
|
||||
time.sleep(4)
|
||||
# by_cmd.send_speed_x(25)
|
||||
# time.sleep(4)
|
||||
pass
|
||||
def nexec(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user