Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UR5 Online Programming Python API Issue with non-blocking moves
#1
Hello,

I am attempting to use non-blocking calls with the Python API in order to send move commands within a GUI program. i.e robot.MoveL(target, blocking=False)

I have a seperate camera stream program that is periodically communicating target coordinates within the robots workspace in which the gui displays and allows the user to issue a command to get the robot to jog over that position with a laser. The program works however the non-blocking move commands still block and prevent the GUI from updating as well as preventing the camera from refreshing in the other asynchronous script while the robot moves.

Any advice is appreciated. Thanks.

I will attach the simple blocking function below and can provide a full script if needed. I am using a UR5 CB3 and using online-programming.


Code:
def MoveCommandLaser(self):
print("sending move")
robot.setPoseTool(tool3) # laser
# self.UpdateActiveTool(tool3)
XYZUVW = Pose_2_UR(robot.Pose())
x, y, z, u, v, w = XYZUVW
i = int(self.lasertargetentry.get())
targ = self.coords[((i - 1) * 4):((i * 4))]
x = float(targ[0])
y = float(targ[1])
z = float(self.laserzentry.get())
Move_Pose = UR_2_Pose([x, y, z, u, v, w])
robot.MoveL(Move_Pose, blocking=False)
robot.setPoseTool(tool2) #camera ref
print("move sent")
# self.UpdateActiveTool(tool2)




Users browsing this thread:
1 Guest(s)