修改钢针到达抓料点位后再收缩和在震动点不走的问题

This commit is contained in:
cdeyw
2025-02-27 10:48:42 +08:00
parent ef50aed6bb
commit 308ac2229c
4 changed files with 1502 additions and 7 deletions

View File

@ -29,6 +29,10 @@ class Catch:
self.shake_Q = False
def run(self):
if self.catch_status == CatchStatus.CNone:
self.shake_continue.SetReset()
# self.robotClient.sendIOControl(self.robotClient.con_ios[1], 0,emptyList='1')
close(0, 1, 0)
self.is_send_take_command = False
return
if self.catch_status == CatchStatus.CTake:
@ -64,20 +68,21 @@ class Catch:
if self.catch_status == CatchStatus.CShake: # 1500
self.shake_Q = not self.shake_Q # 10
if not self.shake_continue.Q(True, 4000):
if not self.shake_continue.Q(True, 6000):
if self.shake_Q:
open(0, 1, 0)
else:
close(0, 1, 0)
else:
self.shake_continue.SetReset()
self.catch_status = CatchStatus.COk
#self.catch_status = CatchStatus.COk
#if Constant.Debug or self.robotClient.check_outputQ(self.robotClient.con_ios[2]):
# self.robotClient.sendIOControl(self.robotClient.con_ios[2], 0)
close(0, 1, 0)
print("震动结束")
if self.catch_status == CatchStatus.COk :
self.shake_continue.SetReset()
# self.robotClient.sendIOControl(self.robotClient.con_ios[1], 0,emptyList='1')
open(1,0,0)
close(0, 1, 0)