Calculate reltool offsets between two points
FraNrem
✭
Hello,
what I'm looking for is some sort of an inverse of the Reltool function.
I want to calculate the pose variables needed for a reltool movement to go from a point pA to a point pB.
For example, if I want to move from a point pA, 5 mm along the X coordinate of the tool i can find the next point with:
pB:=RelTool(pA,5,0,0 \Rx:=0,\Ry:=0,\Rz:=0);
But if I have pA and pB, how can I find the offsets? For example:
PERS pose Offset;
Offset:=myFunc(pA, pB); ! Offset=[[5,0,0],[1,0,0,0]]
So I can do:
Kind regards,
Francesco
what I'm looking for is some sort of an inverse of the Reltool function.
I want to calculate the pose variables needed for a reltool movement to go from a point pA to a point pB.
For example, if I want to move from a point pA, 5 mm along the X coordinate of the tool i can find the next point with:
pB:=RelTool(pA,5,0,0 \Rx:=0,\Ry:=0,\Rz:=0);
But if I have pA and pB, how can I find the offsets? For example:
PERS pose Offset;
Offset:=myFunc(pA, pB); ! Offset=[[5,0,0],[1,0,0,0]]
So I can do:
Xrot:=EulerZYX(\X, Offset.rot);
Yrot:=EulerZYX(\Y, Offset.rot);
Zrot:=EulerZYX(\Z, Offset.rot);
Yrot:=EulerZYX(\Y, Offset.rot);
Zrot:=EulerZYX(\Z, Offset.rot);
MoveL pA,vmax,fine,tool0;
MoveL RelTool(pA, Offset.trans.x, Offset.trans.y, Offset.trans.z \Rx:=Xrot \Ry:=Yrot \Rz:=Zrot),vmax,fine,tool0;
Kind regards,
Francesco
0
Answers
-
HI ...If I understand correctly, you want to go from one point to another, if it is the same tool (pos:=pA.trans-pB.trans) with a digest tool, for that, the CalcJoint() function can help you with that
MoveL CalcRobT(CalcJointT(pB,tool1),tool0),vmax,fine,tool0;
Good job.0 -
Hi,
If I understand the question, try the following:FUNC pose myFunc (robtarget pA, robtarget pB)var pose poseA;var pose poseB;VAR pose result;poseA.trans:=pA.trans;poseA.rot:=pA.rot;poseB.trans:=pB.trans;poseB.rot:=pB.rot;result:=PoseMult(PoseInv(poseA),poseB);RETURN result;endfunc
Ted0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings