07-31-2019, 06:43 PM
(This post was last modified: 07-31-2019, 06:46 PM bydavidmurray.)
Hi,
In one of our simulations, we are trying to detect collisions between the robot's tool and an object in the cell. Our trajectories have around15 000points.
My code is below.What would be the fastest way to detect collisions?现在我得到约1.2秒onds per joint move. (see timer below). Note that rendering is unnecessary for us.
Am I missing something? In particular, how can I entirely disable rendering? RDK.Render(False) doesn't seem to change anything. I have tried unchecking "Always display robot at the end of each movement"in Tools > Options > Motion, but that did not change anything. Note that the collision map is also configured correctly, and that only the relevant objects are checked.
Thanks!
In one of our simulations, we are trying to detect collisions between the robot's tool and an object in the cell. Our trajectories have around15 000points.
My code is below.What would be the fastest way to detect collisions?现在我得到约1.2秒onds per joint move. (see timer below). Note that rendering is unnecessary for us.
Am I missing something? In particular, how can I entirely disable rendering? RDK.Render(False) doesn't seem to change anything. I have tried unchecking "Always display robot at the end of each movement"in Tools > Options > Motion, but that did not change anything. Note that the collision map is also configured correctly, and that only the relevant objects are checked.
Code:
RDK = robolink.Robolink()
RDK.setCollisionActive(True)
RDK.setSimulationSpeed(500)
RDK.Render(False)
robot = RDK.Item('KUKA KR 300 R2500 ultra')
for pose in poses: # list of points...
start = timer()
robot.MoveL(pose, blocking=True) # I have also tried MoveL_Test, but that seems to be even slower.
collisions = RDK.Collisions()
print('collisions: {0}'.format(collisions))
end = timer()
print(end - start) # about 1.2 seconds on average
Thanks!