Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Robot without blocking

#1
Hello everyone,
I've been doing some tests with a KUKA robot + robodk + python scripts and I've noticed that the robot is not waiting to finish the movement (in this case, move_joint)
This is some weird behaviour because we have another robot of the same brand and model and it is waiting for finishing movements before start next line of python code...
I'm wondering if this is because of certain setting on the robot or on robodk?

Thanks in advance!
#2
I've noticed that the robot doesn't block while moving as soon as I use a bunch of setDO functions before

Example with DO:

Code:
def robot_ready():
print("Robot Ready!")
robot.setDO(io_value = 1, io_var = 4)  # Robot Ready


def robot_not_ready():
print("Robot NOT Ready!")
robot.setDO(io_value = 0, io_var = 4)  # Robot NOT Ready


# Set Work Mode to get "Job Numbers"
def work_mode(mode):
print("Work mode set")
if mode == "job_numbers":
robot.setDO(io_value = 0, io_var = 11)
robot.setDO(io_value = 1, io_var = 8)
robot.setDO(io_value = 0, io_var = 7)
elif mode == "manual":
robot.setDO(io_value = 0, io_var = 11)
robot.setDO(io_value = 0, io_var = 8)
robot.setDO(io_value = 1, io_var = 7)


# Set Job #1
def job1():
print("Changing to Job #1")
robot.setDO(io_value = 1, io_var = 12)
time.sleep(0.1)
robot.setDO(io_value = 0, io_var = 15)
time.sleep(0.1)
robot.setDO(io_value = 0, io_var = 16)
time.sleep(0.1)

robot_ready()
robot.move_joint(pos)
print("1")
robot.move_joint(weld_1)
print("2")
robot.move_joint(pos)
print("3")


Output:

Code:
Robot Ready!
[2020-07-31 09:33:32.355090] KUKA START setDO['io_value=1', 'io_var=4']
[2020-07-31 09:33:32.355090] KUKA FINISH setDO['io_value=1', 'io_var=4']
Work mode set
[2020-07-31 09:33:32.356088] KUKA START setDO['io_value=0', 'io_var=11']
[2020-07-31 09:33:32.357085] KUKA FINISH setDO['io_value=0', 'io_var=11']
[2020-07-31 09:33:32.357085] KUKA START setDO['io_value=1', 'io_var=8']
[2020-07-31 09:33:32.357085] KUKA FINISH setDO['io_value=1', 'io_var=8']
[2020-07-31 09:33:32.358097] KUKA START setDO['io_value=0', 'io_var=7']
[2020-07-31 09:33:32.358097] KUKA FINISH setDO['io_value=0', 'io_var=7']
Changing to Job #1
[2020-07-31 09:33:32.358097] KUKA START setDO['io_value=1', 'io_var=12']
[2020-07-31 09:33:32.361074] KUKA FINISH setDO['io_value=1', 'io_var=12']
[2020-07-31 09:33:32.361074] KUKA START setDO['io_value=0', 'io_var=15']
[2020-07-31 09:33:32.361074] KUKA FINISH setDO['io_value=0', 'io_var=15']
[2020-07-31 09:33:32.361074] KUKA START setDO['io_value=0', 'io_var=16']
[2020-07-31 09:33:32.362071] KUKA FINISH setDO['io_value=0', 'io_var=16']
[2020-07-31 09:33:32.362071] KUKA START move_joint[Matrix: (4, 4)
Pose(1433.412, 263.954, 941.910,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1433.412 ],
[ -0.000, -1.000, -0.000, 263.954 ],
[ 0.000, 0.000, -1.000, 941.910 ],
[ 0.000, 0.000, 0.000, 1.000 ]]
]
[2020-07-31 09:33:32.535185] KUKA FINISH move_joint[Matrix: (4, 4)
Pose(1433.412, 263.954, 941.910,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1433.412 ],
[ -0.000, -1.000, -0.000, 263.954 ],
[ 0.000, 0.000, -1.000, 941.910 ],
[ 0.000, 0.000, 0.000, 1.000 ]]
]
1
[2020-07-31 09:33:32.535185] KUKA START move_joint[Matrix: (4, 4)
Pose(1533.415, 263.949, 841.912,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1533.415 ],
[ -0.000, -1.000, -0.000, 263.949 ],
[ 0.000, 0.000, -1.000, 841.912 ],
[ 0.000, 0.000, 0.000, 1.000 ]]
]
[2020-07-31 09:33:32.605416] KUKA FINISH move_joint[Matrix: (4, 4)
Pose(1533.415, 263.949, 841.912,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1533.415 ],
[ -0.000, -1.000, -0.000, 263.949 ],
[ 0.000, 0.000, -1.000, 841.912 ],
[ 0.000, 0.000, 0.000, 1.000 ]]
]
2
[2020-07-31 09:33:32.605621] KUKA START move_joint[Matrix: (4, 4)
Pose(1433.412, 263.954, 941.910,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1433.412 ],
[ -0.000, -1.000, -0.000, 263.954 ],
[ 0.000, 0.000, -1.000, 941.910 ],
[ 0.000, 0.000, 0.000, 1.000 ]]
]
[2020-07-31 09:33:32.678451] KUKA FINISH move_joint[Matrix: (4, 4)
Pose(1433.412, 263.954, 941.910,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1433.412 ],
[ -0.000, -1.000, -0.000, 263.954 ],
[ 0.000, 0.000, -1.000, 941.910 ],
[ 0.000, 0.000, 0.000, 1.000 ]]
]
3


Without DO:

Code:
#robot_ready()
#work_mode("job_numbers")
#job1()

robot.move_joint(pos)
print("1")
robot.move_joint(weld_1)
print("2")
robot.move_joint(pos)
print("3")


Output:

Code:
[2020-07-31 09:35:01.823666] KUKA START move_joint[Matrix: (4, 4)
Pose(1433.412, 263.954, 941.910,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1433.412 ],
 [ -0.000, -1.000, -0.000, 263.954 ],
 [ 0.000, 0.000, -1.000, 941.910 ],
 [ 0.000, 0.000, 0.000, 1.000 ]]

[2020-07-31 09:35:02.240909] KUKA FINISH move_joint[Matrix: (4, 4)
Pose(1433.412, 263.954, 941.910,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1433.412 ],
 [ -0.000, -1.000, -0.000, 263.954 ],
 [ 0.000, 0.000, -1.000, 941.910 ],
 [ 0.000, 0.000, 0.000, 1.000 ]]

1
[2020-07-31 09:35:02.240909] KUKA START move_joint[Matrix: (4, 4)
Pose(1533.415, 263.949, 841.912,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1533.415 ],
 [ -0.000, -1.000, -0.000, 263.949 ],
 [ 0.000, 0.000, -1.000, 841.912 ],
 [ 0.000, 0.000, 0.000, 1.000 ]]

[2020-07-31 09:35:17.269861] KUKA FINISH move_joint[Matrix: (4, 4)
Pose(1533.415, 263.949, 841.912,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1533.415 ],
 [ -0.000, -1.000, -0.000, 263.949 ],
 [ 0.000, 0.000, -1.000, 841.912 ],
 [ 0.000, 0.000, 0.000, 1.000 ]]

2
[2020-07-31 09:35:17.270888] KUKA START move_joint[Matrix: (4, 4)
Pose(1433.412, 263.954, 941.910,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1433.412 ],
 [ -0.000, -1.000, -0.000, 263.954 ],
 [ 0.000, 0.000, -1.000, 941.910 ],
 [ 0.000, 0.000, 0.000, 1.000 ]]

[2020-07-31 09:35:32.196230] KUKA FINISH move_joint[Matrix: (4, 4)
Pose(1433.412, 263.954, 941.910,  179.999, 0.001, 0.002):
[[ 1.000, -0.000, 0.000, 1433.412 ],
 [ -0.000, -1.000, -0.000, 263.954 ],
 [ 0.000, 0.000, -1.000, 941.910 ],
 [ 0.000, 0.000, 0.000, 1.000 ]]

3

If you check the times, with the DO functions the robot doesn't wait to finish the movement to start reading the next line...
#3
Hi Nox,

You can turn off rounding to make point to point moves and make the movements blocking.

For example, you can call setRounding(-1) at the beginning of your program to apply point to point moves for the rest of your program.

Albert
#4
I figured out that if I put a small wait in between of every setDO the robot starts blocking each movement, is this a bug?
#5
Hello,

I have the same problem with the kuka iiwa, the robot stops after each movement. I set the rouding to -1 but I still have the same problem. how to make the robot's movements smoother ?
Thanks for your help.
#6
Hi Haythem,

Setting rounding at -1 will do the opposite of what you are looking for.
-1 will stop at every point.

Rounding > 0 is what you are looking for.

Jeremy
  




Users browsing this thread:
1 Guest(s)