Page 1 of 1

MotionPlanningdemo1 based file wont work

Posted: 10 May 2019, 22:19
by bjsp33
I am trying to use the OMPL plug-in for motion planning on baxter's left arm. I am following one of the demos called "motionplanningdemo1" and have copied and pasted the lua script in the left arm script. I have set up the inverse kinematics as well with a dummy on the tip and another at the base of the arm, exactly how the demo has defined it. The only things i have changed are the names of the joints as well as the names of the collection handles, etc. but everything else remains the same. I keep getting what seems to trace back as a IK error that will not go away even though everything is about 98% the same as the demo. The targets are within reachable range, below is a picture of the error along with the file in a google drive link. ... sp=sharing

Any feedback is appreciated greatly,



Re: MotionPlanningdemo1 based file wont work

Posted: 13 May 2019, 10:05
by coppelia
Hello Bryan,

the error originates from the child script of the left arm, at line 277: the return of findSeveralCollisionFreeConfigsAndCheckApproach appears to be nil. So you need to check why it is nil. It can have many reasons: e.g. arm is constantly colliding with itself, collision pairs are not correctly defined, Target pose is not reachable, calculation time is too low for a path to be found, path planning task is not correctly defined, etc.
This is most of the time the problem when trying to modify a scene without properly understanding what the original scene was doing in details...


Re: MotionPlanningdemo1 based file wont work

Posted: 13 May 2019, 13:35
by bjsp33

I know that it is a nil value, my confusion is WHY it is a nil value. I have already checked all of the things you have mentioned before posting.

I have moved the targets in a straight line, directly in front of the arm so i know it is not colliding and i know it is easily reachable.

individual Collision pairs are defined as collections, which is exactly how it is defined in the demo.

I have tried many different values for simulation times from 1-1000 within 'simOMPL.compute' because this is what i have seen on other posts and still nothing.

as for the the task, it is just a string name and the handle is used correctly everywhere.

having defined everything correctly and just how the demo has described, Im not understanding why i am not able to get any results.

Re: MotionPlanningdemo1 based file wont work

Posted: 14 May 2019, 06:53
by coppelia
Please try to debug your code yourself. There are many errors. If you follow-back the reason of the error, you would have noticed that it is not linked with path planning (that didn't even have a chance of running). The problem (one of the problems) is because sim.getConfigForTipPose doesn't succeed. Some of the problems: in jh, you are using the handles of the right arm, not the left arm. Also, you are getting the handle of the IK group Baxter_P5, not Baxter_leftArm. etc.