Position only IK solutions by changing value of freeparameters

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Position only IK solutions by changing value of freeparameters

achint
Hi Rosen
Im trying to generate position IK solutions for a 7dof manipulator. My aim is to be able to only specify the position of the wrist and find IK solutions using the first 4dofs.
I used Translate3D IK solver with 1st, 2nd and 4th joint as active and 3rd, 5th, 6th and 7th as free parameters. While calculating Ik solutions, since I also want to include the 3rd joint in the solutions, I check for Ik solutions by iterating the value my first free parameter between 0 and 1. This is what i mean: 

vector<dReal> freeParams
freeParams.resize(pmanip->GetNumFreeParameters());

//set all the freeparams to 0.5
for (int i=0; i<(int)freeParams.size(); i++)
    freeParams.at(i)=0.5;

//check for IK solutions by changing the 1st freeparameter from 0 to 1
for (float i=0.0; i<=0.5; i=i+0.01){
    freeParams.at(0)=0.5+i;
    if( !pmanip->FindIKSolution(ikparam,freeParams,vJoints,checkEnvCollisions) ){
              freeParams.at(0)=0.5-i;
        if( pmanip->FindIKSolution(ikparam,freeParams,vJoints,checkEnvCollisions) )
            break;
    }
        ...
    ...
    ...
}
   

However, for all EEF positions that I tested, solutions, if found, correspond to the same value (freeparam=0.5) of the 3rd joint. So checking for different values of the freeparameter does not increase the chances of a solution being found. Is this true? or am I making a mistake somewhere?

Is there a better way to generate position IK solutions using 1st 4 joints of the manipulator?
Thanks
Achint

--
Achint Aggarwal
Researcher/Robotics Engineer
Robotics Innovation Center
DFKI (German Research Center for Artificial Intelligence)
Bremen, Germany
Office: +49 421 218 64140
Mobile: +49 176 626 09211

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Position only IK solutions by changing value of freeparameters

Rosen Diankov
Administrator
hi achint,

I think this is a problem with the generated IK, the 4 free joints
generate a lot of interesting degenerate cases, and ikfast is
attempting to reduce the computation by cutting corners (ie setting
the 3rd joint to a specific value).

After fixing these, ikfast generates (after a couple of hours) a 56Mb
c++ file... which gcc has trouble compiling ;0)

i'm re-opening our ticket on this:
https://sourceforge.net/apps/trac/openrave/ticket/82

rosen,

2010/11/5 achint aggarwal <[hidden email]>:

> Hi Rosen
> Im trying to generate position IK solutions for a 7dof manipulator. My aim
> is to be able to only specify the position of the wrist and find IK
> solutions using the first 4dofs.
> I used Translate3D IK solver with 1st, 2nd and 4th joint as active and 3rd,
> 5th, 6th and 7th as free parameters. While calculating Ik solutions, since I
> also want to include the 3rd joint in the solutions, I check for Ik
> solutions by iterating the value my first free parameter between 0 and 1.
> This is what i mean:
>
> vector<dReal> freeParams
> freeParams.resize(pmanip->GetNumFreeParameters());
>
> //set all the freeparams to 0.5
> for (int i=0; i<(int)freeParams.size(); i++)
>     freeParams.at(i)=0.5;
>
> //check for IK solutions by changing the 1st freeparameter from 0 to 1
> for (float i=0.0; i<=0.5; i=i+0.01){
>     freeParams.at(0)=0.5+i;
>     if(
> !pmanip->FindIKSolution(ikparam,freeParams,vJoints,checkEnvCollisions) ){
>               freeParams.at(0)=0.5-i;
>         if(
> pmanip->FindIKSolution(ikparam,freeParams,vJoints,checkEnvCollisions) )
>             break;
>     }
>         ...
>     ...
>     ...
> }
>
>
> However, for all EEF positions that I tested, solutions, if found,
> correspond to the same value (freeparam=0.5) of the 3rd joint. So checking
> for different values of the freeparameter does not increase the chances of a
> solution being found. Is this true? or am I making a mistake somewhere?
>
> Is there a better way to generate position IK solutions using 1st 4 joints
> of the manipulator?
> Thanks
> Achint
>
> --
> Achint Aggarwal
> Researcher/Robotics Engineer
> Robotics Innovation Center
> DFKI (German Research Center for Artificial Intelligence)
> Bremen, Germany
> Office: +49 421 218 64140
> Mobile: +49 176 626 09211
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Position only IK solutions by changing value of freeparameters

Rosen Diankov
Administrator
Hi achint,

Caching of the degenerate cases has been added to ikfast (r1844),
which generation of a more accurate ik function for your 4-free-joint
example. The generated file went from 56Mb -> 2.4Mb. It still brings
gcc to its knees, but at least you can start exploring the entire 4DOF
space.

rosen,

2010/11/8 Rosen Diankov <[hidden email]>:

> hi achint,
>
> I think this is a problem with the generated IK, the 4 free joints
> generate a lot of interesting degenerate cases, and ikfast is
> attempting to reduce the computation by cutting corners (ie setting
> the 3rd joint to a specific value).
>
> After fixing these, ikfast generates (after a couple of hours) a 56Mb
> c++ file... which gcc has trouble compiling ;0)
>
> i'm re-opening our ticket on this:
> https://sourceforge.net/apps/trac/openrave/ticket/82
>
> rosen,
>
> 2010/11/5 achint aggarwal <[hidden email]>:
>> Hi Rosen
>> Im trying to generate position IK solutions for a 7dof manipulator. My aim
>> is to be able to only specify the position of the wrist and find IK
>> solutions using the first 4dofs.
>> I used Translate3D IK solver with 1st, 2nd and 4th joint as active and 3rd,
>> 5th, 6th and 7th as free parameters. While calculating Ik solutions, since I
>> also want to include the 3rd joint in the solutions, I check for Ik
>> solutions by iterating the value my first free parameter between 0 and 1.
>> This is what i mean:
>>
>> vector<dReal> freeParams
>> freeParams.resize(pmanip->GetNumFreeParameters());
>>
>> //set all the freeparams to 0.5
>> for (int i=0; i<(int)freeParams.size(); i++)
>>     freeParams.at(i)=0.5;
>>
>> //check for IK solutions by changing the 1st freeparameter from 0 to 1
>> for (float i=0.0; i<=0.5; i=i+0.01){
>>     freeParams.at(0)=0.5+i;
>>     if(
>> !pmanip->FindIKSolution(ikparam,freeParams,vJoints,checkEnvCollisions) ){
>>               freeParams.at(0)=0.5-i;
>>         if(
>> pmanip->FindIKSolution(ikparam,freeParams,vJoints,checkEnvCollisions) )
>>             break;
>>     }
>>         ...
>>     ...
>>     ...
>> }
>>
>>
>> However, for all EEF positions that I tested, solutions, if found,
>> correspond to the same value (freeparam=0.5) of the 3rd joint. So checking
>> for different values of the freeparameter does not increase the chances of a
>> solution being found. Is this true? or am I making a mistake somewhere?
>>
>> Is there a better way to generate position IK solutions using 1st 4 joints
>> of the manipulator?
>> Thanks
>> Achint
>>
>> --
>> Achint Aggarwal
>> Researcher/Robotics Engineer
>> Robotics Innovation Center
>> DFKI (German Research Center for Artificial Intelligence)
>> Bremen, Germany
>> Office: +49 421 218 64140
>> Mobile: +49 176 626 09211
>>
>> ------------------------------------------------------------------------------
>> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
>> David G. Thomson, author of the best-selling book "Blueprint to a
>> Billion" shares his insights and actions to help propel your
>> business during the next growth cycle. Listen Now!
>> http://p.sf.net/sfu/SAP-dev2dev
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>>
>

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users