Dear UR Community,
when I go inside the move tab (UR5e) and select “Tool” as Feature, I can accelerate in a direction with respect to the tool by pressing the buttons.
Is there a way to do this via URScript? With speedl the robot accelerates with respect to the base frame. But I am looking for something like speedl but with respect to the tool frame.
You can transform the coordinate system of the tool, and then use speedl with that speed vector.
In this example we created a parameter that is suitable for moving the robot along the tool Z axis when approaching the workpiece from above:
dir = get_actual_tcp_pose()
dir = p[0,0,0,dir,dir,dir]
sp =pose_trans(dir, p[0,0,1,0,0,0])
tsp = [sp, sp, sp, 0, 0, 0]
I hope this helps.