Rotation around tool z axis without X and Y TCP movements

Hello,

I’m trying to make to cobot rotate 90° around TCP using URScript.
So far, I tried:

movej(pose_trans(get_actual_tcp_pose(), p[0,0,0,0,0,1.57]))

movej(pose_trans(get_forward_kin(), p[0,0,0,0,0,1.57]))

The final position after the movment seems correct but the trajectory is wrong : the robot moves the TCP on X and Y before reaching the final position, it’s not a rotation around tool Z axis only.

Could you please help me figure out how to achieve the rotation around tool Z axis only?

Thanks

Is the TCP setup exactly to the location you are trying to rotate around?

Yes, the TCP seems correct because when I use the movment tab in polyscope, select tool base and make Rz rotation it works fine.
Any idea how to do it using URScript?

Thanks

So i just tested in sim making 4 random way points.

Waypoint 1 set to the unrotated location, then i used the tool position menu to set a 90deg rotation for the next waypoint.


OK, thanks, but how do I do the same using URScript?

I think it’s because you are using movej which generates a linear trajectory in the joint space and not in the cartesian space.
Using movel you should be able to obtain the desired behaviour