Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MoveLinstruction 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@www.sinclairbody.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)

#6
This strange behavior moving the robot using the "Move Linear" option happens if you have not updated your tool and reference frame from RoboDK to your robot.

You can create yourself a program that sets the tool and run it with the "Run on robot" option to update the tool on the robot. Alternatively, you can modify the RoboDKSync.SRC file to set the same tool you use in RoboDK.

The Move Linear option will be removed in future versions of RoboDK given this misunderstanding.
#7
Hi Albert, please don't remove the MoveLinear option. I tested with an ABB controller, in RobotStudio, and it works fine. I did not have to run a program to update the tool on it.

However, the problem still persists when I try with a Kuka robot. I did create a simple Python program to update the robot tool and reference frame. See my project attached. Even after running it, the robot does not respond correctly to a Move Linear command(button on connection panel), and the same behaviour happens on my other python project. I made a video, below link, demonstrating what happens with a Move Joints and Move Linear command. RoboDk is connected to a KRC controller:

The other thing that I still can't understand is that even when I don't send the robot to any position but I press Move Linear it just goes to an unknown position. You can see it in the second video. This does not happen with ABB at all.

https://drive.google.com/file/d/168Jb7wr...sp=sharing

https://drive.google.com/file/d/10u8ufoI...sp=sharing


I'm not very familiar with KRL, what is the modification that can be done onRoboDKSync.SRC?


Attached Files
.rdk KR6_2_PRJ.rdk(Size: 127.23 KB / Downloads: 384)
#8
I think there is a bug in RoboDK in the translation of each axis angle position to the cartesian system(with Kuka robots), or I am missing something.

运行一个程序来更新机器人工具没有t fix the issue I am having.

Here is what found runningMoveJandMoveL:

MoveJ:

Commanded J Values(deg RoboDK) | Final J Values(deg RoboDK) | Final J Values(deg Kuka Pendant)
J1-------------------0.05------------------------|-------------0.05-------------------|-------------0.048-------
J2------------------(-92.24)---------------------|--------------(-92.24)-------------|------------(-92.24)---------
J3-------------------78.20-----------------------|-------------78.20-----------------|-------------78.20---------
J4--------------------(-0.07)--------------------|------------(-0.07)-----------------|-------------(-0.07)---------
J5 ------------------- 103.82 ---------------------|-------------103.82----------------|-------------103.81---------
J6-------------------0.07------------------------|-------------0.07-------------------|-------------0.072---------

Commanded Cart. Values(mm RoboDK) | Final Cart Values(mm RoboDK) | Final Cart Values(mm Kuka Pendant)
X-------------------892.336--------------------|-------------892.335-----------------|-------------819.55-----------
Y--------------------(-0.616)-------------------|-------------(-0.616)-----------------|--------------0.54-------------
Z-------------------1368.040-------------------|-------------1368.040---------------|-------------1495.41-----------
A-------------------(-179.959)-----------------|-------------(-179.959)--------------|-------------(-179.959)--------
B-------------------0.222-----------------------|-------------0.222--------------------|------------0.222---------------
C-------------------179.929--------------------|-------------179.929-----------------|-------------179.929--------------




MoveL:

Commanded J Values(deg RoboDK) | Final J Values(deg RoboDK) | Final J Values(deg Kuka Pendant)
J1-------------------0.08------------------------|-------------0.08-------------------|-------------0.078-------
J2------------------(-99.14)---------------------|--------------(-97.75)-------------|------------(-97.74)---------
J3-------------------86.09-----------------------|-------------97.81-----------------|-------------97.81---------
J4--------------------(-0.07)--------------------|------------(-0.07)-----------------|-------------(-0.06)---------
J5-------------------102.84---------------------|-------------89.71----------------|-------------89.71---------
J6-------------------0.10------------------------|-------------0.12-------------------|-------------0.115---------

Commanded Cart. Values(mm RoboDK) | Final Cart Values(mm RoboDK) | Final Cart Values(mm Kuka Pendant)
X-------------------812.96--------------------|-------------838.735-----------------|-------------813.04-----------
Y--------------------(-0.961)-------------------|-------------(-1.00)-----------------|-------------(-0.962)-------------
Z-------------------1348.648-------------------|-------------1198.0---------------|-------------1348.36-----------
A-------------------(-179.953)-----------------|-------------(-179.96)--------------|-------------(-179.959)--------
B-------------------0.220-----------------------|-------------0.219--------------------|------------0.21---------------
C-------------------179.932--------------------|-------------179.93-----------------|-------------179.93--------------



With a MoveJ command, the final joint angle readings in both RoboDk and Kuka pendant match but the cartesian positions reading do not match.

Whereas with a MoveL command, the cartesian commanded and final(on Kuka pendant) match but not the cartesian on RoboDK readings.

Given that running a program to update the tool does change the above behaviour what else can be done?




Users browsing this thread:
1 Guest(s)