Event node making wrist 3 rotate for no reason

I am importing code from a USB drive created in Rhino using Grasshopper and some plugins, anyways after looking over the UR API manual the code generated looks fine and works how I expect it to. That is until I have an event node to look for a change in a digital output signal, which it does perfectly, but when I add the event node to the program in Polyscope it also makes Wrist 3 rotate 90 degrees for seemingly no reason. I know it is the even node because when it is suppressed the wrist does not rotate.

Here is the program in PolyScope:
Program
Robot Program
Script: gcode_Gripper_Test_7.script
Event digital_out[1]≟ True
RG Grip
Event digital_out[1]≟ False
RG Grip

And the code from Grasshopper:
DefaultGHToolTcp = p[0, 0, 0.2, 0, 0, 1.5708]
DefaultGHToolWeight = 0
DefaultGHToolCog = [0, 0, 0.2]
DefaultSpeed = 0.1
DefaultZone = 0
Wait000 = 1.5
set_digital_out(1,False)
set_tcp(DefaultGHToolTcp)
set_payload(DefaultGHToolWeight, DefaultGHToolCog)
movej([2.3174, -1.3439, 1.7939, -2.0208, -1.5708, 0.7466], a=3.1416, v=0.3142, r=DefaultZone)
movej(p[0.51015, -0.24788, 0.08371, 2.22144, 2.22144, 0], a=3.1416, v=0.1705, r=DefaultZone)
movej(p[0.54529, -0.1787, 0.0695, 2.22144, 2.22144, 0], a=3.1416, v=0.1755, r=DefaultZone)
movej(p[0.57627, -0.10629, 0.07029, 2.22144, 2.22144, 0], a=3.1416, v=0.1768, r=DefaultZone)
movej(p[0.60103, -0.03575, 0.09434, 2.22144, 2.22144, 0], a=3.1416, v=0.1768, r=DefaultZone)
set_digital_out(1,True)
sleep(Wait000)
movej(p[0.61665, 0.02427, 0.14274, 2.22144, 2.22144, 0], a=3.1416, v=0.1768, r=DefaultZone)
set_digital_out(1,False)
sleep(Wait000)
movej(p[0.62113, 0.07889, 0.19945, 2.22144, 2.22144, 0], a=3.1416, v=0.1842, r=DefaultZone)
movej(p[0.60362, 0.14303, 0.2381, 2.22144, 2.22144, 0], a=3.1416, v=0.1356, r=DefaultZone)
movej(p[0.56032, 0.20228, 0.2133, 2.22144, 2.22144, 0], a=3.1416, v=0.1674, r=DefaultZone)
movej(p[0.5153, 0.2439, 0.16378, 2.22144, 2.22144, 0], a=3.1416, v=0.2167, r=DefaultZone)
movej(p[0.47079, 0.2743, 0.10618, 2.22144, 2.22144, 0], a=3.1416, v=0.2107, r=DefaultZone)
end

Hello,

I’m assuming RG grip represents an OnRobot gripper model?

OnRobot grippers have the ability to reset the tcp on their own, and I believe that is what you’re seeing here.

There should be a setting somewhere in the gripper setup of the installation or the gripper program node to disable the auto-tcp set and retain the tcp you assigned in grasshopper/elsewhere.

2 Likes

it could be because of the OnRobot automatically overwriting TCP as Miwa mentioned above.
Because in DefaultGHToolTcp = p[0, 0, 0.2, 0, 0, 1.5708], Rz is set to 90 degrees.

Go to Installation > URCaps > OnRobot Setup> TCP> Automatic overwrite of the robot TCP configuration and uncheck it.

2 Likes

That was absolutely the problem, thank you both for your help and support!

1 Like