03-30-2020, 11:45 AM
Hi Edo,
I recommend you to use the RelTool function:
//m.sinclairbody.com/doc/en/PythonAPI/robo...at.RelTool
It is very similar to ABB's RelTool function in Rapid.
You can take a look at the source code to better understand how to do such transformations:
Albert
I recommend you to use the RelTool function:
//m.sinclairbody.com/doc/en/PythonAPI/robo...at.RelTool
It is very similar to ABB's RelTool function in Rapid.
You can take a look at the source code to better understand how to do such transformations:
Code:
def RelTool(target_pose, x, y, z, rx=0,ry=0,rz=0):
"""Calculates a relative target with respect to the tool coordinates. This procedure has exactly the same behavior as ABB's RelTool instruction.
X,Y,Z are in mm, W,P,R are in degrees."""
new_target = target_pose*transl(x,y,z)*rotx(rx*pi/180)*roty(ry*pi/180)*rotz(rz*pi/180)
return new_target
Albert