Speedl in tool reference system

Hi all, I would like use function speedl in tool reference system instead of base reference system. How can I do that? it is important for me in order to move tool in the exact direction
many thanks in advance

Hi Denis…

so what you need is to first transform your coordinates to the tool coordinates system, make the change you want and then transform the end result back to the base coordinate system this can be done using pose_trans a couple of times.

please give it a try if you get stuck I can provide you with the actual script calls.

Best Regards cg1

Thank you really much can you suggest me the procedure? Or better wow can find vx vy vz vrx vry vrz for speed direction in base reference frame in order to move tool in x direction respect to tool reference frame. I need direction because I would like use speed function
Many many thanks

So what you do is this

so we have a tool coordinate frame described by our actual_tcp_pose if we then want a movement along the x axis of the tool we create a pseudo unit vector along the tools x axis.

x_unit_vec = pose_trans(get_actual_tcp_pose(), p[1., 0., 0., 0., 0., 0.])

we then transfer this unit vector back into the base frame by applying the inverse of our tcp_pose as it describes our transformation from the tool frame into our base frame

unit_vec_in_base = pose_trans(x_unit_vec, pose_inv(get_actual_tcp_pose()));

you should be left with a unit vector in the base frame given you the x direction in the tool frame.

you could then repeat this if you wanted to to have unit vectors for the other other axis aswell.