0
$\begingroup$

Rosanswers logo

I am using MoveIt with a custom robotic arm. And it is working pretty well, it converges really fast to a solution.

My problem is that these solutions are far from optimal. The path planner usually performs pretty well. But the IK solver frequently converges to very odd positions (I am using TRAC-IK), something like 1 out of 3 solutions are not great.

I was wondering if it was possible to customize how the IK solver evaluates different solutions. Maybe something like running the IK solver N times and choosing the best solution given a custom evaluation function. Is this possible? For example, finding N different solutions and choosing the solution where joint X is closest to value Y. Doesn't sound like it should be that complicated to do. If this is possible through the Python API then even better, but if it is necessary to do through C++ then that is also fine.


Originally posted by willemstuijt on ROS Answers with karma: 42 on 2022-01-14

Post score: 1


Original comments

Comment by gvdhoorn on 2022-01-14:
An observation: this is a good example of an xy-problem.

The question is titled:

Is it possible to score IK solutions on MoveIt?

while the actual problem is:

the IK solver frequently converges to very odd positions

that's what the question should have been about.

Comment by willemstuijt on 2022-01-15:
Yes. I see that now. Thanks for the observation.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I was already using solve_type: Distance. What improved my results was increasing the kinematics_solver_timeout which was at it's default of 0.005, still not always a great solution but much better. I guess it is a tradeoff between computation speed and better solutions. I previously thought kinematics_solver_timeout was the timeout before finding any feasible solution and not the total time given to finding a better solution based on solve_type. Makes sense now. I still think it would be nice to be able to tell MoveIt which joint values are most likely to be close to the solution to help the IK a little bit, at least for my use case.


Originally posted by willemstuijt with karma: 42 on 2022-01-15

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.