Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KUKA Robot Move Linear Error
#1
Hello everyone, 
I'm having problems with the MoveL function, it doesn't work in real life at all, in the simulation it works fine, but in the real robot the movement is somehow erratic, and the simulation shows some really weird movements.

Code:
ref = refRobot2
   robot2.setPoseFrame(ref)
   home = RDK.Item("KR210-2 - Home").Pose()
   robot2.MoveL(home * transl(100,0,-300))
   pause(1)
   robot2.MoveL(home * transl(100, 100, -300))


I attach a video of this weird movement...

https://youtu.be/5sEjQ5MH8D4

I would like to know, if this is a RoboDK Issue, robot, postprocessor?
#2
It looks like the target is a joint target but you are moving using a linear movement and Cartesian coordinates.

If you want to use Cartesian coordinates I would recommend you to first set the reference frame of that target (target's parent item). Something like:

Code:
home_target = RDK.Item("KR210-2 - Home")
ref = home_target.Parent()
robot2.setPoseFrame(ref)
home_pose = home_target.Pose()
robot2.MoveL(home * transl(100,0,-300))

If you can provide the RDK file we can better look into this issue.
#3
The target is actually a Cartesian Target, and I'm doing practically the same thing that you told me...

When I tried to isolate the script in a new file I don't get the same error... this has happened to me before with this problem, sometimes it works and sometimes is not working at all... but I can't see any difference in the targets, script or robot... what can be wrong?


Attached Files
.rdk   Test.rdk (Size: 734.66 KB / Downloads: 40)
#4
You should use setPoseTool() before you try any movements. This will update the tool pose on the robot. This is important because you may have used another tool in a previous program and the robot driver remembers the last tool you set.

I recommend you to try the following:


Code:
from robolink import *    # RoboDK API
from robodk import *      # Robot toolbox
RDK = Robolink()

ref = RDK.Item("KUKA KR 210 L150-2 Base")
robot = RDK.Item("KUKA KR 210 L150-2")
home = RDK.Item("Target").Pose()

# Send commands to the robot (not just the simulator)
RDK.setRunMode(RUNMODE_RUN_ROBOT)

# Use the target reference
#robot.setPoseFrame(ref)
# This is more robust (in case you place the target on a reference frame)
robot.setPoseFrame(home.Parent()

# Set the robot tool
# This is important to reset any other tools that you may have used before
robot.setPoseTool(robot.PoseTool())

# Move to one location
robot.MoveL(home * transl(100,0,-300))
                   
pause(1)

# Move to another location
robot.MoveL(home * transl(100, 100, -300))
  




Users browsing this thread:
1 Guest(s)