07-29-2019, 12:40 AM
Hello all,
I'm having an issue with the MoveL instruction running on a KUKA KRC2. The instruction works fine in the simulation. But when I run on the robot controller, with the driver, the robot gets stuck at the instruction in the image attached and drifts, completely unresponsive to the instruction. If I use the MoveJ instruction, robot works fine and performs the motion. What am I missing? My code sends cartesian points to the robot. I tried two different codes and none of them are working on the robot:
Above was just a test because what I want to achieve is below:
Thank you for your help.
I'm having an issue with the MoveL instruction running on a KUKA KRC2. The instruction works fine in the simulation. But when I run on the robot controller, with the driver, the robot gets stuck at the instruction in the image attached and drifts, completely unresponsive to the instruction. If I use the MoveJ instruction, robot works fine and performs the motion. What am I missing? My code sends cartesian points to the robot. I tried two different codes and none of them are working on the robot:
Code:
# Initialize the RoboDK API
RDK = Robolink()
#职业mt the user to select a robot (if only one robot is available it will select that robot automatically)
robot = RDK.ItemUserPick('Select a robot', ITEM_TYPE_ROBOT)
RDK.setRunMode(RUNMODE_RUN_ROBOT)
# Retrieve the robot reference frame
reference = robot.Parent()
# Use the robot base frame as the active reference
robot.setPoseFrame(reference)
# get the current orientation of the robot (with respect to the active reference frame and tool frame)
pose_ref = robot.Pose() #home position
robot.MoveL(KUKA_2_Pose([613,0,762,-180,0,-180]))
Above was just a test because what I want to achieve is below:
Code:
# Initialize the RoboDK API
RDK = Robolink()
#职业mt the user to select a robot (if only one robot is available it will select that robot automatically)
robot = RDK.ItemUserPick('Select a robot', ITEM_TYPE_ROBOT)
RDK.setRunMode(RUNMODE_RUN_ROBOT)
# Retrieve the robot reference frame
reference = robot.Parent()
# Use the robot base frame as the active reference
robot.setPoseFrame(reference)
# get the current orientation of the robot (with respect to the active reference frame and tool frame)
pose_ref = robot.Pose() #home position
pose_i = pose_ref
#I have more code which is not relevant here
for i in vetor:
pose_n1 = pose_i.Offset(i.x,i.y,i.z)*rotz(i.rz*pi/180)*roty(i.ry*pi/180)*rotx(i.rx*pi/180) #kuka
robot.MoveL (pose_n1)
Thank you for your help.