Differences in ik solutions obtained by the generated cpp file and python code

classic Classic list List threaded Threaded
2 messages Options
TIF
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Differences in ik solutions obtained by the generated cpp file and python code

TIF
Hello, We are new in OpenRave, but we have successfully created a cpp file that generates the ik solutions for the robot model kuka kr420 with given tool, as showed in the attached file “okolina.xml” (the robot model is in the 7z file because it is too large to be uploaded). We generate the cpp file using the following command:

openrave.py --database inversekinematics --robot=okolina.xml

If we use the cpp file to generate ik solution for this position and orientation:

-0.00000000000000 0.70710678118668 0.70710678118642 -0.54347408228219
-1.00000000000000 0.00000000000000 0.00000002274769 -2.86900000000000
-0.00000000000000 -0.70710678118642 0.70710678118668 2.19461269081460


we obtain 8 ik solutions listed in the attached txt file “vs_2015_cpp_solutions.txt”. The same solutions can be obtained if we call ikfast by python with the code showen in “python_code.txt”.

With the folowing two orientations and positions we have a problem obtaining the ik solutions when we used the generated cpp file. But if we call ikfast by python again with the same code from “python_code.txt”, we can successfully generate solutions. We also obtained the same solutions, that we got from python, with ikfast_solver from the cpp examples that came with OpenRave.

-0.08284750153456 0.70386500567168 0.70355780411698 -0.65589334206771
-0.95165833468808 0.15028730293395 -0.13469633859124 -2.96927965212114
-0.29577475468369 -0.68070590334091 0.69775591193210 2.30042746678618

-0.09572159937123 0.71300972632945 0.69644628800394 -0.65519209855208
-0.93376205018541 0.17441752029693 -0.20750211774740 -2.96944889651085
-0.34485621503368 -0.67017754831427 0.68695373865777 2.30112116874777

Our question is why this happened?
Is there a difference between the process of generating the iksolution by the generated cpp file and calling ikfast in python, or using the provided ikfast_solver in the cpp examples?
okolina.xml
kr420_WEB_zip.7z
python_code.txt
vs_2015_cpp_solutions.txt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Differences in ik solutions obtained by the generated cpp file and python code

Lucy
Not sure it applies your case, but this might be an answer:

"IKFast works slightly differently in Python and C. In Python, OpenRave automatically iterates your fixed joints through their entire range with some discretization. So you can potentially get hundreds of solutions. But in C, it only gives you the few permutations of joint flips. So you only get a handful of solutions. You are forced to call it multiple times to iterate through your fixed joint range."
(Extracted from https://robotics.stackexchange.com/questions/9228/evaluating-the-similarity-of-two-7-degree-of-freedom-arms)
Loading...