I am placing a hollow cylindrical part onto a pin at a regrip station. It is possible for the part to be gripped such that it will not go onto the pin, i.e. the part crashes into the pin. I want the robot to detect the collision and discard the part when this happens.
Right now, I call zero_ftsensor() immediately before the MoveL during which the collision detection should occur. I use an “Until expression” for this movement, moving the part onto the pin Until force()>30.
When I run the program, the first time a collision happens, the robot does exactly what I want: It detects contact, retracts, and discards the part. The problem is, after that first collision, it seems to detect a collision on every subsequent iteration, retracting and discarding every part every time. I set up a thread to monitor the value of force(), and I never see it go anywhere near my set limit of 30 N.
Any ideas what I’m doing wrong?