RoboDK Forum
Pose difference using MoveL/MoveJ using python- Printable Version

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API)
+--- Thread: Pose difference using MoveL/MoveJ using python (/Thread-Pose-difference-using-MoveL-MoveJ-using-python)



Pose difference using MoveL/MoveJ using python-geogeo-02-04-2022

Hi,

I'm working with KUKA Kr6 and i tried to move the robot along the z axis of the TCP.
In order to do that, i created a function offset based on what I saw on roboDKapi documentation :

def Offset_pose(robot:robolink.Item,dist):
target_ref = robot.Pose()
target_i = Mat(target_ref)
pos_i = target_i.Pos()
pos_i[2]=pos_i[2]+dist
target_i.setPos(pos_i)
print('pose voulue')
print(target_i)
robot.MoveL(target_i)

看来,当我使用这个函数机器人move but not at the right place. For example:
Pose at the beginning
Pose(558.226, -97.864, 151.368, -180.000, 0.000, 0.000):
[[ 1.000, -0.000, 0.000, 558.226 ],
[ -0.000, -1.000, 0.000, -97.864 ],
[ 0.000, -0.000, -1.000, 151.368 ],
[ 0.000, 0.000, 0.000, 1.000 ]]

Desired pose
Pose(558.226, -97.864, 201.368, -180.000, 0.000, 0.000):
[[ 1.000, -0.000, 0.000, 558.226 ],
[ -0.000, -1.000, 0.000, -97.864 ],
[ 0.000, -0.000, -1.000, 201.368 ],
[ 0.000, 0.000, 0.000, 1.000 ]]

Pose after using Offset_pose(robot,50)
Pose(557.762, -98.563, 200.910, 179.900, 0.152, 0.026):
[[ 1.000, -0.000, 0.003, 557.762 ],
[ -0.000, -1.000, -0.002, -98.563 ],
[ 0.003, 0.002, -1.000, 200.910 ],
[ 0.000, 0.000, 0.000, 1.000 ]]

So my question is : is it common to have a difference between the the Desired pose and the real pose using MoveL?
When I use MoveJ instead of MoveL there is no difference between the Desired pose and the real pose.


RE: Pose difference using MoveL/MoveJ using python-Jeremy-02-08-2022

Why don't you use the Offset or RelTool function available in the API?


//www.sinclairbody.com/doc/en/PythonAPI/robodk.html#robodk.robomath.Mat.Offset

Jeremy