@T800_412,
Gripper script commands cannot be used in a thread since you cannot send multiple commands to the gripper at the same time (example : gripper open in the robot program and having rq_is_object_detected in a thread would consist of two commands at once).
Furthermore, the rq_is_object_detected() function will return either True or False. If the gripper detects a part between its fingertips, the gripper will return True, if the gripper does not detect an object, the gripper will return False. The rq_is_object_detected(0 command should be placed after the gripper_close() command.
If this doesn<t solve your problem, could you send me your program in a private message so I can help troubleshoot your problem?
Thanks
how can I use rq_is_object_detected() on a UR10 to get reliable results?
I tried putting it in a Thread with:
And I get an error that says gripper 1 is not activated. But this error goes away when I don't use the Thread.
I've also tried using it in the code directly, but get inconsistent results, causing the program to go on with an empty gripper.
There's an IF that is examined which causes the program to go back and attempt to pick the wheel again, but when the object detected is giving bad results, I'm not sure what to do. Ideally, I want to do it in a thread, and cause the program to pause, just in case the wheel gets dropped somewhere along the way of being processed.
If I look at the gripper toolbar, it seems that it is correctly reporting object detected status, even if I pull the wheel out of the gripper after it is successfully picked.