Frozen program when trying to rotate around Z axis

Greetings,

I have a weird problem I can’t explain.
I have a PC connected to a UR3e controller and I send URSript through the primary interface to control it.
I created a small UI to be able to move the robot either using freedrive which works wonder, or by sending some small programs to position my robot precisely.

I used the Polyscope arrows interface as a reference, so I created some buttons to move the robot in the base coordinate system.
When I try to move along the XYZ axis, I have no problem. The only command in my program is a movel:

movel(pose_add(get_forward_kin(), p[0.001, 0, 0, 0, 0, 0]), a=1, v=0.2) # Works perfectly

This works perfecly, but when I try to rotate around the XYZ axis, it works for X and Y but Z freezes the program. The program stays running forever and I can’t stop it through the dashboard server or anything else. I can’t send anything using the primary interface too. The urscript used is:

movel(pose_add(get_forward_kin(), p[0, 0, 0, 0, 0, 0.010]), a=1, v=0.2) # Freezes the robot in RUNNING

In my understanding of things, this should rotate the orientation of the TCP around the Z axis (base coordinate system), and keep the position of the TCP fixed.

Does someone have an idea about what is going on? When I check the logs, I have the program started line, but nothing under it, and I have to reboot the robot to make it function properly again.

Just to be clear, I always send the command in a small program looking like that:

def prg():
  movel(..........)
end

Hello,
Use pose_trans instead of pose_add.

Greetings :waving_hand:

Using pose_trans here would make the rotation around Z in the tool coordinates system, which is not what I want. This action does indeed not freeze the program though, but neither does rotating around X or Y in the base csys.

Yes, absolutely.
-pose_trans is beter then pose_add to do the rotations (base or TCP)
-”Use get_forward_kin() if you want to ignore the TCP”.

Can you try this code please:
movel(pose_trans(p[0, 0, 0, 0, 0, 0.010], get_actual_tcp_pose()), a=1, v=0.2)

The robot is long gone to the customer’s place :slight_smile:
I used pose_trans for my rotations around the TCP and for other transforms, as well as pose_add, and I never had the robot program freezing like that. I have absolutely no issues with moving the robot the way I want / performing transforms or anything like this really. I reimplemented all of these functions in Python (plus the kinematics one) using math3d and I know how they work.

My real issue was with the freezing. My code and yours too, worked in simulation (with a dummy UR10, the ubuntu image with polyscope you can install).

1 Like