Universal Robots+

SpeedL in tool frame

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.

Thanks

Hi @minava

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:

def MakeToolSpeedZ():
dir = get_actual_tcp_pose()
dir = p[0,0,0,dir[3],dir[4],dir[5]]
sp =pose_trans(dir, p[0,0,1,0,0,0])
tsp = [sp[0], sp[1], sp[2], 0, 0, 0]
return tsp
end

I hope this helps.