problems about generating IK with mimic joints

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

problems about generating IK with mimic joints

vivi
Hi Rosen,

 I am sorry that i failed to generate the IK for my robot model which has mimic joints in the manipulator.

When i set the mimic joints to enable = "true", the error information are shown as:

C:\Documents and Settings\Wang>openrave.py --database inversekinematics --robot=
data/mywim/wim.robot.xml
Generating inverse kinematics for manip arm : Transform6D [0, 1, 3, 4, 6, 7] (th
is might take ~10-30 min)
generating inverse kinematics file C:/Documents and Settings/Wang/.openrave/kine
matics.5021b627a2e598aa28777039f06b31d4/ikfast21.Transform6D_0_1_3_4_6_7.cpp
moved translation  [0.0250000000000000013877787807814, 0, 0] to right end
moved translation  [0, 0, 0.0899999999999999966693309261245] to left end
moved translation on intersecting axis  [0, 0, 0] to left
Taking the inverse of the mechanism (sometimes intersecting joints are on the ba
se)
could not divide translation/rotation
failed to genreate ik solution
Traceback (most recent call last):
  File "C:\Program Files\openrave\bin\openrave.py", line 87, in <module>
    database.run(args=args)
  File "C:\Program Files\openrave\share\openrave\openravepy\databases\inversekin
ematics.py", line 657, in run
    InverseKinematicsModel.RunFromParser(*args,**kwargs)
  File "C:\Program Files\openrave\share\openrave\openravepy\databases\inversekin
ematics.py", line 628, in RunFromParser
    OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
  File "C:\Program Files\openrave\share\openrave\openravepy\openravepy_ext.py",
line 658, in RunFromParser
    model.autogenerate(options=options)
  File "C:\Program Files\openrave\share\openrave\openravepy\databases\inversekin
ematics.py", line 248, in autogenerate
    self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoi
nts,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=o
utputlang,ipython=ipython)
  File "C:\Program Files\openrave\share\openrave\openravepy\databases\inversekin
ematics.py", line 366, in generate
    raise ValueError('failed to generate ik solver for robot %s:%s'%(self.robot.
GetName(),self.manip.GetName()))
ValueError: failed to generate ik solver for robot wim:arm


When i set the mimic joints to enable = "false", the error message are shown as follows:

C:\Documents and Settings\Wang>openrave.py --database inversekinematics --robot=
data/mywim/wim.robot.xml
Generating inverse kinematics for manip arm : Transform6D [0, 1, 2, 3, 4, 5] (th
is might take ~10-30 min)
generating inverse kinematics file C:/Documents and Settings/Wang/.openrave/kine
matics.5021b627a2e598aa28777039f06b31d4/ikfast21.Transform6D_0_1_2_3_4_5.cpp
Traceback (most recent call last):
  File "C:\Program Files\openrave\bin\openrave.py", line 87, in <module>
    database.run(args=args)
  File "C:\Program Files\openrave\share\openrave\openravepy\databases\inversekin
ematics.py", line 657, in run
    InverseKinematicsModel.RunFromParser(*args,**kwargs)
  File "C:\Program Files\openrave\share\openrave\openravepy\databases\inversekin
ematics.py", line 628, in RunFromParser
    OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
  File "C:\Program Files\openrave\share\openrave\openravepy\openravepy_ext.py",
line 658, in RunFromParser
    model.autogenerate(options=options)
  File "C:\Program Files\openrave\share\openrave\openravepy\databases\inversekin
ematics.py", line 248, in autogenerate
    self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoi
nts,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=o
utputlang,ipython=ipython)
  File "C:\Program Files\openrave\share\openrave\openravepy\databases\inversekin
ematics.py", line 364, in generate
    code = solver.generateIkSolver(baselink=baselink,eelink=eelink,solvejoints=s
olvejoints,freejointinds=freejointinds,usedummyjoints=usedummyjoints,solvefn=sol
vefn,lang=outputlang)
  File "C:\Program Files\openrave\share\openrave\openravepy\ikfast.py", line 714
, in generateIkSolver
    return self.generateIkSolverChain(chain,solvefn,lang=lang)
  File "C:\Program Files\openrave\share\openrave\openravepy\ikfast.py", line 726
, in generateIkSolverChain
    chaintree = solvefn(self,chain, Tee)
  File "C:\Program Files\openrave\share\openrave\openravepy\databases\inversekin
ematics.py", line 288, in solveFullIK_6D
    return ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)
  File "C:\Program Files\openrave\share\openrave\openravepy\ikfast.py", line 145
7, in solveFullIK_6D
    Links, jointvars, isolvejointvars, ifreejointvars = self.forwardKinematicsCh
ain(chain)
  File "C:\Program Files\openrave\share\openrave\openravepy\ikfast.py", line 625
, in forwardKinematicsChain
    var = Symbol("j%d"%jointindexmap_inv[joint.jointindex])
KeyError: 2


I wonder is it possible to generate the IK for the mainpulator with mimic joints without any modification?
If you can give me any suggestion, It will be greatly helpful.

Thank you very much.
Best wishes!

Vivi
Reply | Threaded
Open this post in threaded view
|

Re: problems about generating IK with mimic joints

Rosen Diankov
Administrator
We've never tested with mimic joints, but it should be possible. Send
your robot.

rosen,

2010/12/14 vivi <[hidden email]>:

>
> Hi Rosen,
>
>  I am sorry that i failed to generate the IK for my robot model which has
> mimic joints in the manipulator.
>
> When i set the mimic joints to enable = "true", the error information are
> shown as:
>
> C:\Documents and Settings\Wang>openrave.py --database inversekinematics
> --robot=
> data/mywim/wim.robot.xml
> Generating inverse kinematics for manip arm : Transform6D [0, 1, 3, 4, 6, 7]
> (th
> is might take ~10-30 min)
> generating inverse kinematics file C:/Documents and
> Settings/Wang/.openrave/kine
> matics.5021b627a2e598aa28777039f06b31d4/ikfast21.Transform6D_0_1_3_4_6_7.cpp
> moved translation  [0.0250000000000000013877787807814, 0, 0] to right end
> moved translation  [0, 0, 0.0899999999999999966693309261245] to left end
> moved translation on intersecting axis  [0, 0, 0] to left
> Taking the inverse of the mechanism (sometimes intersecting joints are on
> the ba
> se)
> could not divide translation/rotation
> failed to genreate ik solution
> Traceback (most recent call last):
>  File "C:\Program Files\openrave\bin\openrave.py", line 87, in <module>
>    database.run(args=args)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\databases\inversekin
> ematics.py", line 657, in run
>    InverseKinematicsModel.RunFromParser(*args,**kwargs)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\databases\inversekin
> ematics.py", line 628, in RunFromParser
>
> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\openravepy_ext.py",
> line 658, in RunFromParser
>    model.autogenerate(options=options)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\databases\inversekin
> ematics.py", line 248, in autogenerate
>
> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoi
> nts,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=o
> utputlang,ipython=ipython)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\databases\inversekin
> ematics.py", line 366, in generate
>    raise ValueError('failed to generate ik solver for robot
> %s:%s'%(self.robot.
> GetName(),self.manip.GetName()))
> ValueError: failed to generate ik solver for robot wim:arm
>
>
> When i set the mimic joints to enable = "false", the error message are shown
> as follows:
>
> C:\Documents and Settings\Wang>openrave.py --database inversekinematics
> --robot=
> data/mywim/wim.robot.xml
> Generating inverse kinematics for manip arm : Transform6D [0, 1, 2, 3, 4, 5]
> (th
> is might take ~10-30 min)
> generating inverse kinematics file C:/Documents and
> Settings/Wang/.openrave/kine
> matics.5021b627a2e598aa28777039f06b31d4/ikfast21.Transform6D_0_1_2_3_4_5.cpp
> Traceback (most recent call last):
>  File "C:\Program Files\openrave\bin\openrave.py", line 87, in <module>
>    database.run(args=args)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\databases\inversekin
> ematics.py", line 657, in run
>    InverseKinematicsModel.RunFromParser(*args,**kwargs)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\databases\inversekin
> ematics.py", line 628, in RunFromParser
>
> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\openravepy_ext.py",
> line 658, in RunFromParser
>    model.autogenerate(options=options)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\databases\inversekin
> ematics.py", line 248, in autogenerate
>
> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoi
> nts,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=o
> utputlang,ipython=ipython)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\databases\inversekin
> ematics.py", line 364, in generate
>    code =
> solver.generateIkSolver(baselink=baselink,eelink=eelink,solvejoints=s
> olvejoints,freejointinds=freejointinds,usedummyjoints=usedummyjoints,solvefn=sol
> vefn,lang=outputlang)
>  File "C:\Program Files\openrave\share\openrave\openravepy\ikfast.py", line
> 714
> , in generateIkSolver
>    return self.generateIkSolverChain(chain,solvefn,lang=lang)
>  File "C:\Program Files\openrave\share\openrave\openravepy\ikfast.py", line
> 726
> , in generateIkSolverChain
>    chaintree = solvefn(self,chain, Tee)
>  File "C:\Program
> Files\openrave\share\openrave\openravepy\databases\inversekin
> ematics.py", line 288, in solveFullIK_6D
>    return ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)
>  File "C:\Program Files\openrave\share\openrave\openravepy\ikfast.py", line
> 145
> 7, in solveFullIK_6D
>    Links, jointvars, isolvejointvars, ifreejointvars =
> self.forwardKinematicsCh
> ain(chain)
>  File "C:\Program Files\openrave\share\openrave\openravepy\ikfast.py", line
> 625
> , in forwardKinematicsChain
>    var = Symbol("j%d"%jointindexmap_inv[joint.jointindex])
> KeyError: 2
>
>
> I wonder is it possible to generate the IK for the mainpulator with mimic
> joints without any modification?
> If you can give me any suggestion, It will be greatly helpful.
>
> Thank you very much.
> Best wishes!
>
> Vivi
> --
> View this message in context: http://openrave-users-list.185357.n3.nabble.com/problems-about-generating-IK-with-mimic-joints-tp2083845p2083845.html
> Sent from the OpenRAVE Users List mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: problems about generating IK with mimic joints

vivi
Hi, rosen,

Thank you for your quick reply.

Attached please find my robot files and the render files of the parts.

It seems that if the enable="false" is set, the mimic joints are treated as the joints to be calculated,
whereas when enable="true" is set, the mimic joints will not be treated for calculation.

Best wishes!

wimiv.rar

wim.robot.xml
Reply | Threaded
Open this post in threaded view
|

Re: problems about generating IK with mimic joints

vivi
In reply to this post by Rosen Diankov
Hi Rosen,

If it is impossible to generate IK for my robot model which has two mimic joints in the manipulator, then what should i do in order to play with my robot model for simulation.

Because i have failed to generate IK using Analytical Inverse Kinematics Solvers, then Do i have to write a totally new IK solver plugin? or do i only need to rectify the ikfast plugin to generate an specified ikfast plugin for my robot?

By the way, i have another question about ikfast: what is the relationship between the "ikfast plugin" and the Knowledge-base Generators "Analytical Inverse Kinematics Solvers"? I noticed that there existing a lot of ikfast plugins when i use the command "openrave --listplugins", for example "ikfast", "ikfast_pr2_head". On the other hand, the Knowledge-base Generators "Analytical Inverse Kinematics Solvers" are said to be able to Automatically generate and load inverse kinematics equations for any kind of robots.

I would greatly appreciate if you can give me some advice about my case.

Best wishes!

Reply | Threaded
Open this post in threaded view
|

Re: problems about generating IK with mimic joints

Rosen Diankov
Administrator
hi vivi,

we're still working on the ik + mimic joints. It is a very interesting
problem, and I think it can be solved.

the ik knowledge-base generator uses ikfast and connects the generated
ik to the openrave world. it also manages user options and the
organization of the database.

as a very quick workaround, you can try removing the mimic joint and
generating ik as is. Because you'll have 1 free parameter, you can
search all the ik solutions for the one that matches the mimic
constraint.

rosen,

2010/12/26 vivi <[hidden email]>:

>
> Hi Rosen,
>
> If it is impossible to generate IK for my robot model which has two mimic
> joints in the manipulator, then what should i do in order to play with my
> robot model for simulation.
>
> Because i have failed to generate IK using Analytical Inverse Kinematics
> Solvers, then Do i have to write a totally new IK solver plugin? or do i
> only need to rectify the ikfast plugin to generate an specified ikfast
> plugin for my robot?
>
> By the way, i have another question about ikfast: what is the relationship
> between the "ikfast plugin" and the Knowledge-base Generators "Analytical
> Inverse Kinematics Solvers"? I noticed that there existing a lot of ikfast
> plugins when i use the command "openrave --listplugins", for example
> "ikfast", "ikfast_pr2_head". On the other hand, the Knowledge-base
> Generators "Analytical Inverse Kinematics Solvers" are said to be able to
> Automatically generate and load inverse kinematics equations for any kind of
> robots.
>
> I would greatly appreciate if you can give me some advice about my case.
>
> Best wishes!
>
>
> --
> View this message in context: http://openrave-users-list.185357.n3.nabble.com/problems-about-generating-IK-with-mimic-joints-tp2083845p2147196.html
> Sent from the OpenRAVE Users List mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: problems about generating IK with mimic joints

vivi
hi, rosen

Thanks for your quick reply and suggestion received.

I have tried to edit the two mimic joints "j2p" and "j4p" to be normal joints in my robot file, and then set these two joints as free joints in order to generate IK, using the command "openrave.py --database inversekinematics --robot=data/mywim/wim.robot.xml --freejoint=j4p --freejoint=j2p".

However, i failed with the following error message
"could not divide translation/rotation
failed to genreate ik solution"

I also tried to only reset one mimic joint, the same error happens.

Maybe i have to wait for your resolve about this problem.

Vivi
Reply | Threaded
Open this post in threaded view
|

Re: problems about generating IK with mimic joints

kmohan
Hi @Vivi,

Were you able to generate ikfast eventually? I am also facing a similar situation.

Thanks,
Kiran.