Can not find Ik path with "sim.generateIkPath"

Typically: "How do I... ", "How can I... " questions
Post Reply
Jiang
Posts: 1
Joined: 17 May 2020, 04:35

Can not find Ik path with "sim.generateIkPath"

Post by Jiang »

Hi,

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. https://drive.google.com/drive/folders/ ... sp=sharing
Could you please help me with this? Thank you so much!

coppelia
Site Admin
Posts: 7838
Joined: 14 Dec 2012, 00:25

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

Post by coppelia »

Hello,

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.

Cheers

Post Reply