Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MoveL instruction with KUKA KRC2
#1
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:

Code:
# Initialize the RoboDK API
RDK = Robolink()

# Promt 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()

# Promt 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.


Attached Files Thumbnail(s)
       
#2
You should set the reference frame AND the tool from RoboDK to make sure you set them up on the robot the same way you have them in RoboDK. 

Example:

Code:
robot.Connect()
robot.setPoseFrame(robot.PoseFrame())
robot.setPoseTool(robot.PoseTool())
robot.MoveL(KUKA_2_Pose([x,y,z,a,b,c]))
#3
Hi Albert,

Your suggestion did not work. But the problem is something else, even using the MoveLinear in RoboDK control panel, robot does not obey the proper path. With MoveJoint works fine. See video below(sorry about the quality):

https://drive.google.com/file/d/1Kt0wGaW...sp=sharing


My robotic manipulator is a KR100-2 HA(image attached). This manipulator is not available in the library so I'm using a KR100-2 P. Maybe this is the problem?


Attached Files Thumbnail(s)
       
#4
Yes, you should select the correct robot. Otherwise it would explain the issue you are seeing.

You can model robots yourself in the RoboDK menu: Utilities-Create Mechanism or Robot.
Or at least, you can change the kinematic parameters in the Parameters menu.

If you have a professional license we can add the robot for you, just send us a request at info@robodk.com with the 3D files of the robot (STEP files if possible).
#5
Currently, I don't have a license installed on my laptop, but my company has a distributor agreement with you guys.

I created a new mechanism based on the robot parameters. Attached picture with robot data from datasheet and with parameters on RoboDK parameters window.

Also, I set the Cartesian Jog frames as ABB/KUKA/Nachi. Screenshot attached.

Still, robot is acting weird with the MoveLinear command. First I get current robot position, then without changing anything on the rotating knob(X, Y, Z) I click MoveJoints. The robot does not move as I expect. But if I click Move Linear, again without changing anything on the rotating knob, the robot starts to move to an unknown position, until it reaches a software limit.

On the robot pendant, it is stuck at the same line 49 of the KUKAROBODK35SYNC.SRC, picture attached.

I don't know what is happening. Appreciate if you can help, as I am working on the project that we are discussing on the other post.

Thanks!


Attached Files Thumbnail(s)
               
  




Users browsing this thread:
1 Guest(s)