How do I move the Robot using TCP Coordinates without changing the tools orientation

Hej, I’m trying to rotate the tool while simultaneously having the arm follow a predefined path. My approach was to obtain the joint positions and modifying only the final value by adding 90 degrees, allowing for a 90-degree turn of the tool using moveJ. However, I also need the tool to follow a specific path as it rotates.I tried using moveL, but this seems to override the original moveJ command. My question is: Is there a way to move to TCP coordinates without altering the orientation?
Thanks in advance!

As i see it you have a couple of options.

  1. use the tool_path_offset functionality, this would require having a thread that controled the rotation in the tool frame.

  2. use interpolate_pose(p_from, p_to, alpha) to generate a list of all the poses between your start and stop pose.
    and then get_inverse_kin(x, qnear, maxPositionError =1e-10,maxOrientationError =1e-10, tcp=’active_tcp’)
    to get their joint poses, now you can manipulate the end joint of all of them and convert them back to poses using
    get_forward_kin(q=’current_joint_positions’, tcp=’active_tcp’)

1 Like