Page 1 of 1

Can not find Ik path with "sim.generateIkPath"

Posted: 19 May 2020, 06:12
by Jiang

I am learning the 'motionPlanningServerDemo' to use the python API. Basically I'm trying to use the same Lua script and python usage. I met a problem when using sim.generateIkPath. It returns nil instead of the expected Ik path. There are several existing forums asking the same question so I made several attempts, but none of them helps.

I have ensured the following things,

1. setting joints in "Inverse kinematic mode" without hybrid.
2. Enlarge the linear precision in IK elements, but not working.
3. increase the maximum iteration of the solver. This is tricky. When I increase the path points pretty huge, i.e. 1e5, and with a high maximum iteration, it sometimes works for some target points. But for other points, it still does not work.
4. I also tried to combine "sim getConfigForTipPose" before feeding into generateIkPath. Still not working.

I have attached the scene file and python script in the following link. ... sp=sharing
Could you please help me with this? Thank you so much!

Re: Can not find Ik path with "sim.generateIkPath"

Posted: 22 May 2020, 12:24
by coppelia

it is always much more troublesome for us to test a scene if it is linked to another application or in your case a python script, since this adds more overhead for us (understanding the script, knowing how to use it, etc.). Self-contained, minimalistic scenes are the best.
Back to your problem: are you checking for collision? If yes, what happens if you leave the collisionPairs argument to nil?
Are you sure the target is reachable and not a singular configuration?
Are you sure the target is reachable by driving the tip dummy in a straight line towards it? e.g. some joint limitations might hinder your manipulator to drive via a straight line, and in that case path planning would be needed. To quickly roule out that possibility, you can set all revolute joints to cyclic and see it that works.