Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pose difference using MoveL/MoveJ using python
#1
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)

It seems that when i use this function the robot 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.


Attached Files
.py Test.py(Size: 1.71 KB / Downloads: 142)
#2
Why don't you use the Offset or RelTool function available in the API?


//www.sinclairbody.com/doc/en/PythonAPI/robo...Mat.Offset

Jeremy
Find useful information about RoboDK and its features by visiting ourOnline Documentationand by watching tutorials on ourYoutube Channel.






Users browsing this thread:
1 Guest(s)