02-22-2024, 08:54 AM
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)
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)