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

IGNORE SOME OBJECTS WHEN USING COLLISION_LINE()

#1
[Python API]

I am using the Collision_Line() method to evaluate the distance from a specific point to the workpiece. The point I wish to sample from is potentially inside the tool. Is it possible to ignore collisions with certain objects when calling the Collision_Line() method? Or is there another similar method that does have this feature?

My current workaround it to move the tool out of the way then check the distance then put the tool back, but this bogs down when run for many targets.

There is no offset applied to the starting point of the line passed to Collision_Line() that would guarantee non-collision with the tool while still guarantee that collisions with the workpiece are detected.
#2
Turning Render off while doing this operation should speed things up because when you move a robot or the pose of an object RoboDK will provoke an immediate render event by default.

Another option is to skip the first surface you collided with. For example, if you know you collided with a tool, you could move your start point by 1 mm or so to continue the search for collisions along your line.
  




Users browsing this thread:
1 Guest(s)