Ask Your Question
0

KDL IK fails in Descartes

asked 2018-03-13 10:39:32 -0500

ipa-hsd gravatar image

I am using Descartes library on Ubuntu 16.04 ROS kinetic for my Denso robot.

I am using IkFastMoveitStateAdapter with KDLKinematicsPlugin defined in the kinematics.yaml. I am able to load this plugin successfully. But the getAllIK() in IkFastMoveitStateAdapter fails since there no solutions found for any point of the cartesian trajectory. The pose seems to be reachable by the arm. How do I know if the kinematics plugin is setup correctly? Can I use the standard KDL plugin or I need to build a custom IKFast plugin for my robot? What else might I be missing?

I found a similar issue here, but somehow it does not solve my problem

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-13 10:58:37 -0500

gvdhoorn gravatar image

updated 2018-03-13 11:03:49 -0500

Can I use the standard KDL plugin

No. You cannot use the IkFastMoveitStateAdapter with a KDL based plugin.

(this seems obvious: the name IkFastMoveitStateAdapter seems to indicate this already)

or I need to build a custom IKFast plugin for my robot?

Yes.

Descartes depends on the IK plugin returning 'all' joint space solutions for a particular Cartesian pose, otherwise it has nothing to choose from / optimise for. KDL cannot reliably return those solutions, as it is a numerical solver.

I found a similar issue here, but somehow it does not solve my problem

Jorge seems to explain it quite well in the issue you link:

Instead you can instantiate an IkFastMoveitStateAdapter object which will load the kinematics plugin of your arm as long as it is provided in the "kinematics.yaml" of the moveit config package. This flavor of the Descartes Robot Model assumes the the underlying kinematics is running a closed-form solver and so it'll exploit that fact in order to generate more pose samples and potentially produce a better path.

What would be good to verify (over at Descartes' issue tracker) is whether the MoveitStateAdapters are still needed. MoveIt's IK plugin class got extended to support everything that Descartes needs, so the intermediary may not be necessary any more. But I would suggest you verify this with the developers.

edit flag offensive delete link more

Comments

My bad - my idea was that IkFastMoveitStateAdapter communicates with any available underlying IK solver to get multiple solutions. When you say Moveit's IK plugin is extended, do you mean KDL also should return multiple solutions? And how can I bypass MoveitStateAdapter? By replacing getAllIK()?

ipa-hsd gravatar image ipa-hsd  ( 2018-03-14 12:18:34 -0500 )edit

When you say Moveit's IK plugin is extended, do you mean KDL also should return multiple solutions?

No. I don't believe KDL can do this reliably. TracIK maybe, see ros-industrial-consortium/descartes#124.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-14 14:00:28 -0500 )edit

Thanks! Now I have a brief idea of how things are working. I used MoveitStateAdapter (Still waiting for a reply: https://github.com/ros-industrial-con... ) and defined Trac IK in my kinematics.yaml. I am able to plan the trajectories now.

ipa-hsd gravatar image ipa-hsd  ( 2018-03-15 07:48:56 -0500 )edit

I'm not sure trac_ik is the best choice, but it will probably work 'somewhat'. Note Patrick's comments at the end of the issue I linked. IIUC he's describing a hypothetical / desired situation, not the current state.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-15 07:50:58 -0500 )edit

IKFastMoveitStateAdapter calls getPositionIK in getAllIK, where as MoveitStateAdapter calls setFromIK with multiple seeds. Also, I was able to generate trajectories even with KDL+MoveitStateAdapter, just that it was 5x slower than Trac IK.

ipa-hsd gravatar image ipa-hsd  ( 2018-03-15 08:15:18 -0500 )edit

Unfortunately, I was unable to generate IKFast plugin for my Denso robot ( https://github.com/rdiankov/openrave/... )

ipa-hsd gravatar image ipa-hsd  ( 2018-03-15 08:18:10 -0500 )edit

See if the procedure in #q263925 helps. It's written for 4dof, but just replace with the appropriate solver type. Can't guarantee it'll help, but using the inversekinematics has helped me get past weird IKFast errors before.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-15 08:35:55 -0500 )edit

Used this PR: https://github.com/rdiankov/openrave/... , with extraprec=100 and maxsteps=750, I was able to generate the plugin

ipa-hsd gravatar image ipa-hsd  ( 2018-03-19 03:03:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-03-13 10:39:32 -0500

Seen: 333 times

Last updated: Mar 13 '18