Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Inaccurate tcp using moveL command in RoboDK python api

#1
Hello, I use the the "moveL" command in python script to move the robot to a target pose:

pose= Mat([[0.000,0.72021,0.028918,-186.7158],[-0.72039,-0.01995,0.48149,35.3522],[0.69357,-0.020928,0.53619,38.6617],[0,0,0,1]])
robot.MoveL(pose)


However, the obtained pose in GUI is:
[    0.071116,    0.995608,    0.060890,  -175.393712 ;
    -0.863917,    0.030966,    0.502682,    42.856878 ;
      0.498589,    -0.088352,    0.862324,  -55.186329 ;
      0.000000,    0.000000,    0.000000,    1.000000 ];

which is not the same as my target point. I check that my target pose is not a singular point. I also tried the same command to move to other target poses. Some works accurately, but other don't. That seems so strange, I want to know whether that is a bug in roboDK or whether there is problem with my python program? Thank you! The following is the complete python code:

from robodk.robolink import *
from robodk.robomath import *
# Connect to the RoboDK API
RDK = Robolink()
list_items = RDK.ItemList()
for item in list_items:
    print(item.Name())
robot = RDK.ItemUserPick('Select a robot', ITEM_TYPE_ROBOT)
robot.MoveJ([0,90,90,90,-90,0])
pose= Mat([[0.000,0.72021,0.028918,-186.7158],[-0.72039,-0.01995,0.48149,35.3522],[0.69357,-0.020928,0.53619,38.6617],[0,0,0,1]])
robot.MoveL(pose)
print(pose)
xyzrpw=pose_2_xyzrpw(pose)
print(xyzrpw)
#robot.MoveL(target_ref)


Attached Files
.rdk   New Station 3.rdk (Size: 2.34 MB / Downloads: 41)
#2
I figure out that the problem lies in the rotation part of the target pose is not valid (i.e., its norm does not equal to 1). Sorry to disturb and hope that will be a useful lesson for others!
#3
OK perfect, thank you for letting us know!
  




Users browsing this thread:
1 Guest(s)