Code:
I have programmed as:
#1. Connect to RoboDK using the Robolink module:
from robolink import *
# Connect to RoboDK
RDK = Robolink()
#2. Get the target using the `Item` method and specify the name of the target:
# Get the target
target = RDK.Item('상1_T0')
#3. Get the pose of the target using the `Pose` method:
# Get the pose of the target
pose = target.Pose()
#4. Extract the position and rotation data from the pose:
# Extract the position data
x, y, z = pose.Pos()
# Extract the rotation data
rx, ry, rz = pose.Rot().Euler()
#5. Print the position and rotation data:
# Print the position data
print('Position: X={}, Y={}, Z={}'.format(x, y, z))
# Print the rotation data
print('Rotation: RX={}, RY={}, RZ={}'.format(rx, ry, rz))
But I have an error when running this line:
rx, ry, rz = pose.Rot().Euler()
AttributeError: 'Mat' object has no attribute 'Rot'. Did you mean: 'Row'?
I can not resolve this, please help me.