Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check robot reachability
#1
What is the easiest way to check if a robot can reach a target (at any configuration or joint angles) using the robodk api?

I have a target that I know should not be reached by a robot, yet when I use the MoveJ_Test function I still get back zero.
#2
I'm not sure if you want to test the collision or only the reach of the robot, for the reach it's not that clear in the API but it's not hard, my example is in C++ but the function should be the same for other language.

  • Create a robot (which is an "Item")
  • Create a referential (here "robot2ref" which is a "Mat"), be careful, for example, fanuc have their 0 above the ground in the center of the first axe, which could cause issue if you don't set it right
  • Create a tool (here "toolTCP", which is a "Mat"), you can just create a empty tool at the 0 of your wrist with an empty Mat
  • Take a position (here "pose1", which is a "Mat")

Then you juste have to solve the inverse Kinematic, it will give you a Joint object, if the dimension is 6 (for a 6 axis of course), it means it worked, otherwise it will return something else, so you could just do this:

Code:
bool reach (Item& robot, Mat toolTCP, Mat robot2ref, Mat pose1) {
tJoints jPos = robot.SolveIK(pose1, &toolTCP, &robot2ref);
return (jPos.Length() == 6);
}
  




Users browsing this thread:
1 Guest(s)