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

Automated collision check / motion correction

#1
Hi everyone! 

I would like to check for collisions during a joint motion between 2 targets using the Python API. 
If the robot/gripper collides, I want to get the current joint values of the robot (so that I can later correct them or insert a new point). 
I tried using MoveJ_Test, RDK.Collision, RDK.Inside, and try...move...except ERROR_COLLISION functions based on the documentation. 
The previous ones were inaccurate, and with the last one, I couldn't implement error handling clearly. How can I achieve this cleanly and accurately?

Thanks!
#2
You can call robot.Joints() right after a collision is found using MoveJ_Test or MoveL_Test. This will retrieve the joint values of the collision point.
#3
(08-03-2023, 10:57 AM)Albert Wrote: You can call robot.Joints() right after a collision is found using MoveJ_Test or MoveL_Test. This will retrieve the joint values of the collision point.

Hello Albert,

This was exactly my plan, but unfortunately the collision is detected too late. 
Neither the Collision nor the IsInside performs better in this regard. 
The active collision checking is much more accurate, but there I cannot handle the Error_Collision exeption in the script. 
I'm attaching my test cell.

Thanks!


Attached Files
.rdk   cell.rdk (Size: 303.73 KB / Downloads: 145)
#4
When the collision is detected, the robot is in a collision state. So trying to move out of a collision state is not the best way to go.

You should not have to use IsInside to have a robust integration. Mostly because if an object is inside another one it means there is a collision state somewhere, so checking for collisions should be enough.

You could instead offset the movement towards the original location by a given value (an amount in degrees or millimeters). You can find the default steps used for collision checking here:
  1. Select Tools-Options
  2. Select the Motion tab
  3. You'll see the default 4 mm and 4 deg default steps towards the bottom of the window.
  




Users browsing this thread:
1 Guest(s)