more probelms with the pr2 model

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

more probelms with the pr2 model

garratt
Hi Rosen,

I'm trying to run the a simple planner with openrave on the PR2, but the
planner keeps finding that the robot is in self collision.  It turns
out, the wheels are colliding with the base.  Hilariously, these are the
joints that _never_ need to be collision checked!

Is it possible to disable the checking of collisions on specific joints?
Also, I suppose the wheels need to be made smaller in the model, or at
least something needs to be changed...

Of note: the robot does not seem to have this problem in simulation.
(even though it does _look_ like it is in collision)

I'm attaching a screenshot of the collidiness.

Garratt


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

Screenshot-OpenRAVE-3.png (51K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: more probelms with the pr2 model

Huan Liu
Hi Rosen,
Once we move all wheels down 10cm, the problem is solved. The modified
dae file is attached.

Also I have a question about the robot links. Say that I've created a
dualmanipulation problem.
robot.GetLinks()[i] returns the ith link. But if I do
robot.SetActiveDOFs([i]), then
problem.SendCommand('movealljoints goal .1'), it's the (i-1)th link
that's got moved.

Nevertheless, robot.GetManipulator('leftwarm').GetArmJoints() does
return the correct links. So There seems to be an inconsistency in the
indexing between robot.GetLikns() and SetActiveDOFs(), SendCommand()

Thanks!
Huan

2010/8/30 garratt <[hidden email]>:

> Hi Rosen,
>
> I'm trying to run the a simple planner with openrave on the PR2, but the
> planner keeps finding that the robot is in self collision.  It turns
> out, the wheels are colliding with the base.  Hilariously, these are the
> joints that _never_ need to be collision checked!
>
> Is it possible to disable the checking of collisions on specific joints?
> Also, I suppose the wheels need to be made smaller in the model, or at
> least something needs to be changed...
>
> Of note: the robot does not seem to have this problem in simulation.
> (even though it does _look_ like it is in collision)
>
> I'm attaching a screenshot of the collidiness.
>
> Garratt
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

pr2-beta-static-mod.dae (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: more probelms with the pr2 model

Rosen Diankov
Administrator
hi guys,

SetActiveDOFs takes a list of DOF indices. not link indices. You can
get the dof index of every joint by calling Joint.GetDOFIndex.

OpenRAVE kinbodies have 'adjacent' links that can be set manually.
Adjacent links never collide with each other, so are helpful in
pruning spurious collisions. OpenRAVE should have realized that the
wheels were colliding initially and should have added them to the
ignore list.... r1721 updates the pr2 robot with these adjacent links:

    <kinbody>
      <adjacent>base_link br_caster_r_wheel_link</adjacent>
      <adjacent>base_link br_caster_l_wheel_link</adjacent>
      <adjacent>base_link fr_caster_r_wheel_link</adjacent>
      <adjacent>base_link fr_caster_l_wheel_link</adjacent>
      <adjacent>base_link fl_caster_r_wheel_link</adjacent>
      <adjacent>base_link fl_caster_l_wheel_link</adjacent>
      <adjacent>base_link bl_caster_r_wheel_link</adjacent>
      <adjacent>base_link bl_caster_l_wheel_link</adjacent>
    </kinbody>

rosen,


Moving the wheels to a wrong location is not the solution.

2010/9/7 Huan Liu <[hidden email]>:

> Hi Rosen,
> Once we move all wheels down 10cm, the problem is solved. The modified
> dae file is attached.
>
> Also I have a question about the robot links. Say that I've created a
> dualmanipulation problem.
> robot.GetLinks()[i] returns the ith link. But if I do
> robot.SetActiveDOFs([i]), then
> problem.SendCommand('movealljoints goal .1'), it's the (i-1)th link
> that's got moved.
>
> Nevertheless, robot.GetManipulator('leftwarm').GetArmJoints() does
> return the correct links. So There seems to be an inconsistency in the
> indexing between robot.GetLikns() and SetActiveDOFs(), SendCommand()
>
> Thanks!
> Huan
>
> 2010/8/30 garratt <[hidden email]>:
>> Hi Rosen,
>>
>> I'm trying to run the a simple planner with openrave on the PR2, but the
>> planner keeps finding that the robot is in self collision.  It turns
>> out, the wheels are colliding with the base.  Hilariously, these are the
>> joints that _never_ need to be collision checked!
>>
>> Is it possible to disable the checking of collisions on specific joints?
>> Also, I suppose the wheels need to be made smaller in the model, or at
>> least something needs to be changed...
>>
>> Of note: the robot does not seem to have this problem in simulation.
>> (even though it does _look_ like it is in collision)
>>
>> I'm attaching a screenshot of the collidiness.
>>
>> Garratt
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

more ikfast problems

Daniel Leidner-2
hi rosen,

its me again, in noticed some other bugs in the ikfast module:
i tried to generate an ik for our robot justin, and it seems it will
take all night long... ( right now it stopped by "attempting  j2  =  0"
for an hour )
however i tried the pr2 with your example code from the wiki:

openrave.py --database inversekinematics
--robot=robots/pr2-beta-static.robot.xml --manipname=rightarm
--freejoint=r_shoulder_pan_joint --freeinc=0.01

unfortunately even this command creates some errors:

Generating inverse kinematics for manip rightarm : Transform6D [57, 58,
60, 61, 65, 66] (this might take ~10 min)
generating inverse kinematics file
/home/leid_da/.openrave/kinematics.30b0c746bc8e2c01a8b0478ad7acb287/ikfast10.Transform6D_57_58_60_61_65_66_f56.cpp
moved translation  [0, 0, 0] to right end
moved translation on intersecting axis
[0.321000000000000007549516567451, 0, 0] to left
attempting  j0  =  0
attempting  j0  =  pi/2
attempting  j0  =  pi
attempting  j0  =  -pi/2
attempting  None  =  None
generating c++ code...
Traceback (most recent call last):
  File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
    database.run(args=args)
  File
"/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
line 590, in run
    InverseKinematicsModel.RunFromParser(*args,**kwargs)
  File
"/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
line 562, in RunFromParser
   
OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
  File
"/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py", line
583, in RunFromParser
    model.autogenerate(options=options)
  File
"/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
line 237, in autogenerate
   
self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
  File
"/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
line 318, in generate
    code =
solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
551, in generateIkSolver
    return self.generateIkSolverChain(chain,solvefn,lang=lang)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
571, in generateIkSolverChain
    return CodeGenerators[lang]().generate(chaintree)
  File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 226, in generate
    code += solvertree.generate(self)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
190, in generate
    return generator.generateChain(self)
  File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 345, in generateChain
    fcode += self.generateTree(node.jointtree)
  File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 946, in generateTree
    code += n.generate(self)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
145, in generate
    return generator.generateBranchConds(self)
  File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 838, in generateBranchConds
    branchcode += n.generate(self)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
120, in generate
    return generator.generateConditionedSolution(self)
  File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 791, in generateConditionedSolution
    for i,j in combinations(range(allnumsolutions),2):
ValueError: r cannot be bigger than the iterable

daniel

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: more probelms with the pr2 model

Huan Liu
In reply to this post by Rosen Diankov
Thanks Rosen! The new model works perfectly!
I still can't find GetDOFIndex() under a joint. I did
robot.GetLink('torso_lift_link') to get a link. There's a GetIndex()
method, which still returns the wrong value (the index of that link in
robot.GetLinks()).

On Tue, Sep 7, 2010 at 10:21 AM, Rosen Diankov <[hidden email]> wrote:

> hi guys,
>
> SetActiveDOFs takes a list of DOF indices. not link indices. You can
> get the dof index of every joint by calling Joint.GetDOFIndex.
>
> OpenRAVE kinbodies have 'adjacent' links that can be set manually.
> Adjacent links never collide with each other, so are helpful in
> pruning spurious collisions. OpenRAVE should have realized that the
> wheels were colliding initially and should have added them to the
> ignore list.... r1721 updates the pr2 robot with these adjacent links:
>
>    <kinbody>
>      <adjacent>base_link br_caster_r_wheel_link</adjacent>
>      <adjacent>base_link br_caster_l_wheel_link</adjacent>
>      <adjacent>base_link fr_caster_r_wheel_link</adjacent>
>      <adjacent>base_link fr_caster_l_wheel_link</adjacent>
>      <adjacent>base_link fl_caster_r_wheel_link</adjacent>
>      <adjacent>base_link fl_caster_l_wheel_link</adjacent>
>      <adjacent>base_link bl_caster_r_wheel_link</adjacent>
>      <adjacent>base_link bl_caster_l_wheel_link</adjacent>
>    </kinbody>
>
> rosen,
>
>
> Moving the wheels to a wrong location is not the solution.
>
> 2010/9/7 Huan Liu <[hidden email]>:
>> Hi Rosen,
>> Once we move all wheels down 10cm, the problem is solved. The modified
>> dae file is attached.
>>
>> Also I have a question about the robot links. Say that I've created a
>> dualmanipulation problem.
>> robot.GetLinks()[i] returns the ith link. But if I do
>> robot.SetActiveDOFs([i]), then
>> problem.SendCommand('movealljoints goal .1'), it's the (i-1)th link
>> that's got moved.
>>
>> Nevertheless, robot.GetManipulator('leftwarm').GetArmJoints() does
>> return the correct links. So There seems to be an inconsistency in the
>> indexing between robot.GetLikns() and SetActiveDOFs(), SendCommand()
>>
>> Thanks!
>> Huan
>>
>> 2010/8/30 garratt <[hidden email]>:
>>> Hi Rosen,
>>>
>>> I'm trying to run the a simple planner with openrave on the PR2, but the
>>> planner keeps finding that the robot is in self collision.  It turns
>>> out, the wheels are colliding with the base.  Hilariously, these are the
>>> joints that _never_ need to be collision checked!
>>>
>>> Is it possible to disable the checking of collisions on specific joints?
>>> Also, I suppose the wheels need to be made smaller in the model, or at
>>> least something needs to be changed...
>>>
>>> Of note: the robot does not seem to have this problem in simulation.
>>> (even though it does _look_ like it is in collision)
>>>
>>> I'm attaching a screenshot of the collidiness.
>>>
>>> Garratt
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net Dev2Dev email is sponsored by:
>>>
>>> Show off your parallel programming skills.
>>> Enter the Intel(R) Threading Challenge 2010.
>>> http://p.sf.net/sfu/intel-thread-sfd
>>> _______________________________________________
>>> Openrave-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>>
>

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: more ikfast problems

Rosen Diankov
Administrator
In reply to this post by Daniel Leidner-2
hi daniel,

I think this is a python version problem since I cannot reproduce it
here. Can you try r1722?

thanks,
rosen,


2010/9/7 Daniel Leidner <[hidden email]>:

> hi rosen,
>
> its me again, in noticed some other bugs in the ikfast module:
> i tried to generate an ik for our robot justin, and it seems it will
> take all night long... ( right now it stopped by "attempting  j2  =  0"
> for an hour )
> however i tried the pr2 with your example code from the wiki:
>
> openrave.py --database inversekinematics
> --robot=robots/pr2-beta-static.robot.xml --manipname=rightarm
> --freejoint=r_shoulder_pan_joint --freeinc=0.01
>
> unfortunately even this command creates some errors:
>
> Generating inverse kinematics for manip rightarm : Transform6D [57, 58,
> 60, 61, 65, 66] (this might take ~10 min)
> generating inverse kinematics file
> /home/leid_da/.openrave/kinematics.30b0c746bc8e2c01a8b0478ad7acb287/ikfast10.Transform6D_57_58_60_61_65_66_f56.cpp
> moved translation  [0, 0, 0] to right end
> moved translation on intersecting axis
> [0.321000000000000007549516567451, 0, 0] to left
> attempting  j0  =  0
> attempting  j0  =  pi/2
> attempting  j0  =  pi
> attempting  j0  =  -pi/2
> attempting  None  =  None
> generating c++ code...
> Traceback (most recent call last):
>  File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
>    database.run(args=args)
>  File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 590, in run
>    InverseKinematicsModel.RunFromParser(*args,**kwargs)
>  File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 562, in RunFromParser
>
> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>  File
> "/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py", line
> 583, in RunFromParser
>    model.autogenerate(options=options)
>  File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 237, in autogenerate
>
> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
>  File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 318, in generate
>    code =
> solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 551, in generateIkSolver
>    return self.generateIkSolverChain(chain,solvefn,lang=lang)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 571, in generateIkSolverChain
>    return CodeGenerators[lang]().generate(chaintree)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 226, in generate
>    code += solvertree.generate(self)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 190, in generate
>    return generator.generateChain(self)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 345, in generateChain
>    fcode += self.generateTree(node.jointtree)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 946, in generateTree
>    code += n.generate(self)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 145, in generate
>    return generator.generateBranchConds(self)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 838, in generateBranchConds
>    branchcode += n.generate(self)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 120, in generate
>    return generator.generateConditionedSolution(self)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 791, in generateConditionedSolution
>    for i,j in combinations(range(allnumsolutions),2):
> ValueError: r cannot be bigger than the iterable
>
> daniel
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: more ikfast problems

Daniel Leidner-2
Hi Rosen,

the latest openrave version works for the PR2. But our robot model is
still busy. Last night it ended up in a memory error...
Can i send you our model? Maybe its something wrong with my
configuration or the robot model.

ciao daniel

Rosen Diankov wrote:

> hi daniel,
>
> I think this is a python version problem since I cannot reproduce it
> here. Can you try r1722?
>
> thanks,
> rosen,
>
>
> 2010/9/7 Daniel Leidner <[hidden email]>:
>  
>> hi rosen,
>>
>> its me again, in noticed some other bugs in the ikfast module:
>> i tried to generate an ik for our robot justin, and it seems it will
>> take all night long... ( right now it stopped by "attempting  j2  =  0"
>> for an hour )
>> however i tried the pr2 with your example code from the wiki:
>>
>> openrave.py --database inversekinematics
>> --robot=robots/pr2-beta-static.robot.xml --manipname=rightarm
>> --freejoint=r_shoulder_pan_joint --freeinc=0.01
>>
>> unfortunately even this command creates some errors:
>>
>> Generating inverse kinematics for manip rightarm : Transform6D [57, 58,
>> 60, 61, 65, 66] (this might take ~10 min)
>> generating inverse kinematics file
>> /home/leid_da/.openrave/kinematics.30b0c746bc8e2c01a8b0478ad7acb287/ikfast10.Transform6D_57_58_60_61_65_66_f56.cpp
>> moved translation  [0, 0, 0] to right end
>> moved translation on intersecting axis
>> [0.321000000000000007549516567451, 0, 0] to left
>> attempting  j0  =  0
>> attempting  j0  =  pi/2
>> attempting  j0  =  pi
>> attempting  j0  =  -pi/2
>> attempting  None  =  None
>> generating c++ code...
>> Traceback (most recent call last):
>>  File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
>>    database.run(args=args)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>> line 590, in run
>>    InverseKinematicsModel.RunFromParser(*args,**kwargs)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>> line 562, in RunFromParser
>>
>> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py", line
>> 583, in RunFromParser
>>    model.autogenerate(options=options)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>> line 237, in autogenerate
>>
>> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>> line 318, in generate
>>    code =
>> solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>> 551, in generateIkSolver
>>    return self.generateIkSolverChain(chain,solvefn,lang=lang)
>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>> 571, in generateIkSolverChain
>>    return CodeGenerators[lang]().generate(chaintree)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>> line 226, in generate
>>    code += solvertree.generate(self)
>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>> 190, in generate
>>    return generator.generateChain(self)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>> line 345, in generateChain
>>    fcode += self.generateTree(node.jointtree)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>> line 946, in generateTree
>>    code += n.generate(self)
>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>> 145, in generate
>>    return generator.generateBranchConds(self)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>> line 838, in generateBranchConds
>>    branchcode += n.generate(self)
>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>> 120, in generate
>>    return generator.generateConditionedSolution(self)
>>  File
>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>> line 791, in generateConditionedSolution
>>    for i,j in combinations(range(allnumsolutions),2):
>> ValueError: r cannot be bigger than the iterable
>>
>> daniel
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>>    


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: more ikfast problems

Rosen Diankov
Administrator
hi daniel,

sure, sending just the xml file should be enough.

rosen,

2010/9/8 Daniel Leidner <[hidden email]>:

> Hi Rosen,
>
> the latest openrave version works for the PR2. But our robot model is
> still busy. Last night it ended up in a memory error...
> Can i send you our model? Maybe its something wrong with my
> configuration or the robot model.
>
> ciao daniel
>
> Rosen Diankov wrote:
>> hi daniel,
>>
>> I think this is a python version problem since I cannot reproduce it
>> here. Can you try r1722?
>>
>> thanks,
>> rosen,
>>
>>
>> 2010/9/7 Daniel Leidner <[hidden email]>:
>>
>>> hi rosen,
>>>
>>> its me again, in noticed some other bugs in the ikfast module:
>>> i tried to generate an ik for our robot justin, and it seems it will
>>> take all night long... ( right now it stopped by "attempting  j2  =  0"
>>> for an hour )
>>> however i tried the pr2 with your example code from the wiki:
>>>
>>> openrave.py --database inversekinematics
>>> --robot=robots/pr2-beta-static.robot.xml --manipname=rightarm
>>> --freejoint=r_shoulder_pan_joint --freeinc=0.01
>>>
>>> unfortunately even this command creates some errors:
>>>
>>> Generating inverse kinematics for manip rightarm : Transform6D [57, 58,
>>> 60, 61, 65, 66] (this might take ~10 min)
>>> generating inverse kinematics file
>>> /home/leid_da/.openrave/kinematics.30b0c746bc8e2c01a8b0478ad7acb287/ikfast10.Transform6D_57_58_60_61_65_66_f56.cpp
>>> moved translation  [0, 0, 0] to right end
>>> moved translation on intersecting axis
>>> [0.321000000000000007549516567451, 0, 0] to left
>>> attempting  j0  =  0
>>> attempting  j0  =  pi/2
>>> attempting  j0  =  pi
>>> attempting  j0  =  -pi/2
>>> attempting  None  =  None
>>> generating c++ code...
>>> Traceback (most recent call last):
>>>  File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
>>>    database.run(args=args)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 590, in run
>>>    InverseKinematicsModel.RunFromParser(*args,**kwargs)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 562, in RunFromParser
>>>
>>> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py", line
>>> 583, in RunFromParser
>>>    model.autogenerate(options=options)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 237, in autogenerate
>>>
>>> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 318, in generate
>>>    code =
>>> solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 551, in generateIkSolver
>>>    return self.generateIkSolverChain(chain,solvefn,lang=lang)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 571, in generateIkSolverChain
>>>    return CodeGenerators[lang]().generate(chaintree)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 226, in generate
>>>    code += solvertree.generate(self)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 190, in generate
>>>    return generator.generateChain(self)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 345, in generateChain
>>>    fcode += self.generateTree(node.jointtree)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 946, in generateTree
>>>    code += n.generate(self)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 145, in generate
>>>    return generator.generateBranchConds(self)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 838, in generateBranchConds
>>>    branchcode += n.generate(self)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 120, in generate
>>>    return generator.generateConditionedSolution(self)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 791, in generateConditionedSolution
>>>    for i,j in combinations(range(allnumsolutions),2):
>>> ValueError: r cannot be bigger than the iterable
>>>
>>> daniel
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net Dev2Dev email is sponsored by:
>>>
>>> Show off your parallel programming skills.
>>> Enter the Intel(R) Threading Challenge 2010.
>>> http://p.sf.net/sfu/intel-thread-sfd
>>> _______________________________________________
>>> Openrave-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>
>>>
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: more ikfast problems

Rosen Diankov
Administrator
hi daniel,

Thanks for the robot file, after doing some testing, it turns out that
the problem might be due to numerical precision. Maybe because your
robot arms are defined diagonally and you've approximated the
positions of the links to 3 decimal digits instead of 7?

In any case, there are several approaches to solve this:

1. check the precision of all the link transforms in your robot file,
or make the arms along one of the major axes so that there are mostly
0s in the translations.

2. pick a different joint for the free parameter (like the base
joint). You can specify this with the --freeparam argument

3. You can also increase the rounding accuracy using the --accuracy
parameter (default is 1e-7). Be careful when changing this since you
can remove important equations.

rosen,

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

> hi daniel,
>
> sure, sending just the xml file should be enough.
>
> rosen,
>
> 2010/9/8 Daniel Leidner <[hidden email]>:
>> Hi Rosen,
>>
>> the latest openrave version works for the PR2. But our robot model is
>> still busy. Last night it ended up in a memory error...
>> Can i send you our model? Maybe its something wrong with my
>> configuration or the robot model.
>>
>> ciao daniel
>>
>> Rosen Diankov wrote:
>>> hi daniel,
>>>
>>> I think this is a python version problem since I cannot reproduce it
>>> here. Can you try r1722?
>>>
>>> thanks,
>>> rosen,
>>>
>>>
>>> 2010/9/7 Daniel Leidner <[hidden email]>:
>>>
>>>> hi rosen,
>>>>
>>>> its me again, in noticed some other bugs in the ikfast module:
>>>> i tried to generate an ik for our robot justin, and it seems it will
>>>> take all night long... ( right now it stopped by "attempting  j2  =  0"
>>>> for an hour )
>>>> however i tried the pr2 with your example code from the wiki:
>>>>
>>>> openrave.py --database inversekinematics
>>>> --robot=robots/pr2-beta-static.robot.xml --manipname=rightarm
>>>> --freejoint=r_shoulder_pan_joint --freeinc=0.01
>>>>
>>>> unfortunately even this command creates some errors:
>>>>
>>>> Generating inverse kinematics for manip rightarm : Transform6D [57, 58,
>>>> 60, 61, 65, 66] (this might take ~10 min)
>>>> generating inverse kinematics file
>>>> /home/leid_da/.openrave/kinematics.30b0c746bc8e2c01a8b0478ad7acb287/ikfast10.Transform6D_57_58_60_61_65_66_f56.cpp
>>>> moved translation  [0, 0, 0] to right end
>>>> moved translation on intersecting axis
>>>> [0.321000000000000007549516567451, 0, 0] to left
>>>> attempting  j0  =  0
>>>> attempting  j0  =  pi/2
>>>> attempting  j0  =  pi
>>>> attempting  j0  =  -pi/2
>>>> attempting  None  =  None
>>>> generating c++ code...
>>>> Traceback (most recent call last):
>>>>  File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
>>>>    database.run(args=args)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>>> line 590, in run
>>>>    InverseKinematicsModel.RunFromParser(*args,**kwargs)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>>> line 562, in RunFromParser
>>>>
>>>> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py", line
>>>> 583, in RunFromParser
>>>>    model.autogenerate(options=options)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>>> line 237, in autogenerate
>>>>
>>>> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>>> line 318, in generate
>>>>    code =
>>>> solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
>>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>>> 551, in generateIkSolver
>>>>    return self.generateIkSolverChain(chain,solvefn,lang=lang)
>>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>>> 571, in generateIkSolverChain
>>>>    return CodeGenerators[lang]().generate(chaintree)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>>> line 226, in generate
>>>>    code += solvertree.generate(self)
>>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>>> 190, in generate
>>>>    return generator.generateChain(self)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>>> line 345, in generateChain
>>>>    fcode += self.generateTree(node.jointtree)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>>> line 946, in generateTree
>>>>    code += n.generate(self)
>>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>>> 145, in generate
>>>>    return generator.generateBranchConds(self)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>>> line 838, in generateBranchConds
>>>>    branchcode += n.generate(self)
>>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>>> 120, in generate
>>>>    return generator.generateConditionedSolution(self)
>>>>  File
>>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>>> line 791, in generateConditionedSolution
>>>>    for i,j in combinations(range(allnumsolutions),2):
>>>> ValueError: r cannot be bigger than the iterable
>>>>
>>>> daniel
>>>>
>>>> ------------------------------------------------------------------------------
>>>> This SF.net Dev2Dev email is sponsored by:
>>>>
>>>> Show off your parallel programming skills.
>>>> Enter the Intel(R) Threading Challenge 2010.
>>>> http://p.sf.net/sfu/intel-thread-sfd
>>>> _______________________________________________
>>>> Openrave-users mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>>
>>>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: more ikfast problems

Daniel Leidner-2
hi rosen,

i tried the 3rd sollution, but it just works with --accuracy=1e-4.
1e-5 and 1e-6 failed with this message at the end:  "ValueError: r cannot be bigger than the iterable"

attempting  j2  =  0
Traceback (most recent call last):
  File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
    database.run(args=args)
  File "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py", line 590, in run
    InverseKinematicsModel.RunFromParser(*args,**kwargs)
  File "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py", line 562, in RunFromParser
    OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
  File "/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py", line 583, in RunFromParser
    model.autogenerate(options=options)
  File "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py", line 237, in autogenerate
    self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
  File "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py", line 318, in generate
    code = solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 551, in generateIkSolver
    return self.generateIkSolverChain(chain,solvefn,lang=lang)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 562, in generateIkSolverChain
    chaintree = solvefn(self,chain, Tee)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 1366, in solveFullIK_6D
    transtree = self.solveAllEquations(AllEquations,curvars=curtransvars,othersolvedvars = rotvars+freejointvars if solveRotationFirst else freejointvars,solsubs = solsubs,endbranchtree=endbranchtree)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 1706, in solveAllEquations
    rawsolutions=self.solvePairVariables(raweqns,var0,var1)
  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 2031, in solvePairVariables
    for eqs in combinations(reduceeqns,4):
ValueError: r cannot be bigger than the iterable


daniel


Rosen Diankov wrote:
hi daniel,

Thanks for the robot file, after doing some testing, it turns out that
the problem might be due to numerical precision. Maybe because your
robot arms are defined diagonally and you've approximated the
positions of the links to 3 decimal digits instead of 7?

In any case, there are several approaches to solve this:

1. check the precision of all the link transforms in your robot file,
or make the arms along one of the major axes so that there are mostly
0s in the translations.

2. pick a different joint for the free parameter (like the base
joint). You can specify this with the --freeparam argument

3. You can also increase the rounding accuracy using the --accuracy
parameter (default is 1e-7). Be careful when changing this since you
can remove important equations.

rosen,

2010/9/8 Rosen Diankov [hidden email]:
  
hi daniel,

sure, sending just the xml file should be enough.

rosen,

2010/9/8 Daniel Leidner [hidden email]:
    
Hi Rosen,

the latest openrave version works for the PR2. But our robot model is
still busy. Last night it ended up in a memory error...
Can i send you our model? Maybe its something wrong with my
configuration or the robot model.

ciao daniel

Rosen Diankov wrote:
      
hi daniel,

I think this is a python version problem since I cannot reproduce it
here. Can you try r1722?

thanks,
rosen,


2010/9/7 Daniel Leidner [hidden email]:

        
hi rosen,

its me again, in noticed some other bugs in the ikfast module:
i tried to generate an ik for our robot justin, and it seems it will
take all night long... ( right now it stopped by "attempting  j2  =  0"
for an hour )
however i tried the pr2 with your example code from the wiki:

openrave.py --database inversekinematics
--robot=robots/pr2-beta-static.robot.xml --manipname=rightarm
--freejoint=r_shoulder_pan_joint --freeinc=0.01

unfortunately even this command creates some errors:

Generating inverse kinematics for manip rightarm : Transform6D [57, 58,
60, 61, 65, 66] (this might take ~10 min)
generating inverse kinematics file
/home/leid_da/.openrave/kinematics.30b0c746bc8e2c01a8b0478ad7acb287/ikfast10.Transform6D_57_58_60_61_65_66_f56.cpp
moved translation  [0, 0, 0] to right end
moved translation on intersecting axis
[0.321000000000000007549516567451, 0, 0] to left
attempting  j0  =  0
attempting  j0  =  pi/2
attempting  j0  =  pi
attempting  j0  =  -pi/2
attempting  None  =  None
generating c++ code...
Traceback (most recent call last):
 File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
   database.run(args=args)
 File
"/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
line 590, in run
   InverseKinematicsModel.RunFromParser(*args,**kwargs)
 File
"/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
line 562, in RunFromParser

OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
 File
"/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py", line
583, in RunFromParser
   model.autogenerate(options=options)
 File
"/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
line 237, in autogenerate

self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
 File
"/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
line 318, in generate
   code =
solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
 File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
551, in generateIkSolver
   return self.generateIkSolverChain(chain,solvefn,lang=lang)
 File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
571, in generateIkSolverChain
   return CodeGenerators[lang]().generate(chaintree)
 File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 226, in generate
   code += solvertree.generate(self)
 File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
190, in generate
   return generator.generateChain(self)
 File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 345, in generateChain
   fcode += self.generateTree(node.jointtree)
 File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 946, in generateTree
   code += n.generate(self)
 File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
145, in generate
   return generator.generateBranchConds(self)
 File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 838, in generateBranchConds
   branchcode += n.generate(self)
 File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
120, in generate
   return generator.generateConditionedSolution(self)
 File
"/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
line 791, in generateConditionedSolution
   for i,j in combinations(range(allnumsolutions),2):
ValueError: r cannot be bigger than the iterable

daniel

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users


          
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

      


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev

_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: more ikfast problems

Rosen Diankov
Administrator
hi daniel,

If you ever increase the accuracy threshold, you should test the ik
with "--usecached --numiktests=100". I don't think you'll get a
properly working ik with such high thresholds....

rosen,

2010/9/13 Daniel Leidner <[hidden email]>:

> hi rosen,
>
> i tried the 3rd sollution, but it just works with --accuracy=1e-4.
> 1e-5 and 1e-6 failed with this message at the end:  "ValueError: r cannot be
> bigger than the iterable"
>
> attempting  j2  =  0
> Traceback (most recent call last):
>   File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
>     database.run(args=args)
>   File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 590, in run
>     InverseKinematicsModel.RunFromParser(*args,**kwargs)
>   File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 562, in RunFromParser
>
> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>   File "/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py",
> line 583, in RunFromParser
>     model.autogenerate(options=options)
>   File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 237, in autogenerate
>
> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
>   File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 318, in generate
>     code =
> solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 551,
> in generateIkSolver
>     return self.generateIkSolverChain(chain,solvefn,lang=lang)
>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 562,
> in generateIkSolverChain
>     chaintree = solvefn(self,chain, Tee)
>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 1366,
> in solveFullIK_6D
>     transtree =
> self.solveAllEquations(AllEquations,curvars=curtransvars,othersolvedvars =
> rotvars+freejointvars if solveRotationFirst else freejointvars,solsubs =
> solsubs,endbranchtree=endbranchtree)
>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 1706,
> in solveAllEquations
>     rawsolutions=self.solvePairVariables(raweqns,var0,var1)
>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 2031,
> in solvePairVariables
>     for eqs in combinations(reduceeqns,4):
> ValueError: r cannot be bigger than the iterable
>
> daniel
>
> Rosen Diankov wrote:
>
> hi daniel,
>
> Thanks for the robot file, after doing some testing, it turns out that
> the problem might be due to numerical precision. Maybe because your
> robot arms are defined diagonally and you've approximated the
> positions of the links to 3 decimal digits instead of 7?
>
> In any case, there are several approaches to solve this:
>
> 1. check the precision of all the link transforms in your robot file,
> or make the arms along one of the major axes so that there are mostly
> 0s in the translations.
>
> 2. pick a different joint for the free parameter (like the base
> joint). You can specify this with the --freeparam argument
>
> 3. You can also increase the rounding accuracy using the --accuracy
> parameter (default is 1e-7). Be careful when changing this since you
> can remove important equations.
>
> rosen,
>
> 2010/9/8 Rosen Diankov <[hidden email]>:
>
>
> hi daniel,
>
> sure, sending just the xml file should be enough.
>
> rosen,
>
> 2010/9/8 Daniel Leidner <[hidden email]>:
>
>
> Hi Rosen,
>
> the latest openrave version works for the PR2. But our robot model is
> still busy. Last night it ended up in a memory error...
> Can i send you our model? Maybe its something wrong with my
> configuration or the robot model.
>
> ciao daniel
>
> Rosen Diankov wrote:
>
>
> hi daniel,
>
> I think this is a python version problem since I cannot reproduce it
> here. Can you try r1722?
>
> thanks,
> rosen,
>
>
> 2010/9/7 Daniel Leidner <[hidden email]>:
>
>
>
> hi rosen,
>
> its me again, in noticed some other bugs in the ikfast module:
> i tried to generate an ik for our robot justin, and it seems it will
> take all night long... ( right now it stopped by "attempting  j2  =  0"
> for an hour )
> however i tried the pr2 with your example code from the wiki:
>
> openrave.py --database inversekinematics
> --robot=robots/pr2-beta-static.robot.xml --manipname=rightarm
> --freejoint=r_shoulder_pan_joint --freeinc=0.01
>
> unfortunately even this command creates some errors:
>
> Generating inverse kinematics for manip rightarm : Transform6D [57, 58,
> 60, 61, 65, 66] (this might take ~10 min)
> generating inverse kinematics file
> /home/leid_da/.openrave/kinematics.30b0c746bc8e2c01a8b0478ad7acb287/ikfast10.Transform6D_57_58_60_61_65_66_f56.cpp
> moved translation  [0, 0, 0] to right end
> moved translation on intersecting axis
> [0.321000000000000007549516567451, 0, 0] to left
> attempting  j0  =  0
> attempting  j0  =  pi/2
> attempting  j0  =  pi
> attempting  j0  =  -pi/2
> attempting  None  =  None
> generating c++ code...
> Traceback (most recent call last):
>  File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
>    database.run(args=args)
>  File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 590, in run
>    InverseKinematicsModel.RunFromParser(*args,**kwargs)
>  File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 562, in RunFromParser
>
> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>  File
> "/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py", line
> 583, in RunFromParser
>    model.autogenerate(options=options)
>  File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 237, in autogenerate
>
> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
>  File
> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
> line 318, in generate
>    code =
> solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 551, in generateIkSolver
>    return self.generateIkSolverChain(chain,solvefn,lang=lang)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 571, in generateIkSolverChain
>    return CodeGenerators[lang]().generate(chaintree)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 226, in generate
>    code += solvertree.generate(self)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 190, in generate
>    return generator.generateChain(self)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 345, in generateChain
>    fcode += self.generateTree(node.jointtree)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 946, in generateTree
>    code += n.generate(self)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 145, in generate
>    return generator.generateBranchConds(self)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 838, in generateBranchConds
>    branchcode += n.generate(self)
>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
> 120, in generate
>    return generator.generateConditionedSolution(self)
>  File
> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
> line 791, in generateConditionedSolution
>    for i,j in combinations(range(allnumsolutions),2):
> ValueError: r cannot be bigger than the iterable
>
> daniel
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing
> http://p.sf.net/sfu/novell-sfdev2dev
>
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: more ikfast problems

Rosen Diankov
Administrator
Hi Daniel,

The errors are divided into two types:

1. solution not found
2. wrong solution

ikfast should *never* return wrong solutions, but changing the
precisions tolerances could affect that.

In order to decrease the "solution not found" cases, you can try using
a small discretization value, the default is 0.1 radians, which is
pretty large. You can try to change it with "--freeinc=0.02"

rosen,

2010/9/13 Daniel Leidner <[hidden email]>:

> hi rosen,
>
> i made 1000 runs for each arm at an accuracy of 1e-4. both of them
> reached a success rate of 0.989
> i think this is tolerable. compared to the pr2 which reached a success
> rate of 0.870 by an accuracy of 1e-7.
> actually i am not sure how these values are computed so i can not say if
> its that good...
>
> daniel
>
>
> Rosen Diankov wrote:
>> hi daniel,
>>
>> If you ever increase the accuracy threshold, you should test the ik
>> with "--usecached --numiktests=100". I don't think you'll get a
>> properly working ik with such high thresholds....
>>
>> rosen,
>>
>> 2010/9/13 Daniel Leidner <[hidden email]>:
>>
>>> hi rosen,
>>>
>>> i tried the 3rd sollution, but it just works with --accuracy=1e-4.
>>> 1e-5 and 1e-6 failed with this message at the end:  "ValueError: r cannot be
>>> bigger than the iterable"
>>>
>>> attempting  j2  =  0
>>> Traceback (most recent call last):
>>>   File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
>>>     database.run(args=args)
>>>   File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 590, in run
>>>     InverseKinematicsModel.RunFromParser(*args,**kwargs)
>>>   File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 562, in RunFromParser
>>>
>>> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>>>   File "/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py",
>>> line 583, in RunFromParser
>>>     model.autogenerate(options=options)
>>>   File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 237, in autogenerate
>>>
>>> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
>>>   File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 318, in generate
>>>     code =
>>> solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
>>>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 551,
>>> in generateIkSolver
>>>     return self.generateIkSolverChain(chain,solvefn,lang=lang)
>>>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 562,
>>> in generateIkSolverChain
>>>     chaintree = solvefn(self,chain, Tee)
>>>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 1366,
>>> in solveFullIK_6D
>>>     transtree =
>>> self.solveAllEquations(AllEquations,curvars=curtransvars,othersolvedvars =
>>> rotvars+freejointvars if solveRotationFirst else freejointvars,solsubs =
>>> solsubs,endbranchtree=endbranchtree)
>>>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 1706,
>>> in solveAllEquations
>>>     rawsolutions=self.solvePairVariables(raweqns,var0,var1)
>>>   File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line 2031,
>>> in solvePairVariables
>>>     for eqs in combinations(reduceeqns,4):
>>> ValueError: r cannot be bigger than the iterable
>>>
>>> daniel
>>>
>>> Rosen Diankov wrote:
>>>
>>> hi daniel,
>>>
>>> Thanks for the robot file, after doing some testing, it turns out that
>>> the problem might be due to numerical precision. Maybe because your
>>> robot arms are defined diagonally and you've approximated the
>>> positions of the links to 3 decimal digits instead of 7?
>>>
>>> In any case, there are several approaches to solve this:
>>>
>>> 1. check the precision of all the link transforms in your robot file,
>>> or make the arms along one of the major axes so that there are mostly
>>> 0s in the translations.
>>>
>>> 2. pick a different joint for the free parameter (like the base
>>> joint). You can specify this with the --freeparam argument
>>>
>>> 3. You can also increase the rounding accuracy using the --accuracy
>>> parameter (default is 1e-7). Be careful when changing this since you
>>> can remove important equations.
>>>
>>> rosen,
>>>
>>> 2010/9/8 Rosen Diankov <[hidden email]>:
>>>
>>>
>>> hi daniel,
>>>
>>> sure, sending just the xml file should be enough.
>>>
>>> rosen,
>>>
>>> 2010/9/8 Daniel Leidner <[hidden email]>:
>>>
>>>
>>> Hi Rosen,
>>>
>>> the latest openrave version works for the PR2. But our robot model is
>>> still busy. Last night it ended up in a memory error...
>>> Can i send you our model? Maybe its something wrong with my
>>> configuration or the robot model.
>>>
>>> ciao daniel
>>>
>>> Rosen Diankov wrote:
>>>
>>>
>>> hi daniel,
>>>
>>> I think this is a python version problem since I cannot reproduce it
>>> here. Can you try r1722?
>>>
>>> thanks,
>>> rosen,
>>>
>>>
>>> 2010/9/7 Daniel Leidner <[hidden email]>:
>>>
>>>
>>>
>>> hi rosen,
>>>
>>> its me again, in noticed some other bugs in the ikfast module:
>>> i tried to generate an ik for our robot justin, and it seems it will
>>> take all night long... ( right now it stopped by "attempting  j2  =  0"
>>> for an hour )
>>> however i tried the pr2 with your example code from the wiki:
>>>
>>> openrave.py --database inversekinematics
>>> --robot=robots/pr2-beta-static.robot.xml --manipname=rightarm
>>> --freejoint=r_shoulder_pan_joint --freeinc=0.01
>>>
>>> unfortunately even this command creates some errors:
>>>
>>> Generating inverse kinematics for manip rightarm : Transform6D [57, 58,
>>> 60, 61, 65, 66] (this might take ~10 min)
>>> generating inverse kinematics file
>>> /home/leid_da/.openrave/kinematics.30b0c746bc8e2c01a8b0478ad7acb287/ikfast10.Transform6D_57_58_60_61_65_66_f56.cpp
>>> moved translation  [0, 0, 0] to right end
>>> moved translation on intersecting axis
>>> [0.321000000000000007549516567451, 0, 0] to left
>>> attempting  j0  =  0
>>> attempting  j0  =  pi/2
>>> attempting  j0  =  pi
>>> attempting  j0  =  -pi/2
>>> attempting  None  =  None
>>> generating c++ code...
>>> Traceback (most recent call last):
>>>  File "/home/leid_da/local//bin/openrave.py", line 101, in <module>
>>>    database.run(args=args)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 590, in run
>>>    InverseKinematicsModel.RunFromParser(*args,**kwargs)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 562, in RunFromParser
>>>
>>> OpenRAVEModel.RunFromParser(Model=Model,parser=parser,args=args,**kwargs)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/openravepy_ext.py", line
>>> 583, in RunFromParser
>>>    model.autogenerate(options=options)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 237, in autogenerate
>>>
>>> self.generate(iktype=iktype,freejoints=freejoints,usedummyjoints=usedummyjoints,accuracy=accuracy,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/databases/inversekinematics.py",
>>> line 318, in generate
>>>    code =
>>> solver.generateIkSolver(self.manip.GetBase().GetIndex(),self.manip.GetEndEffector().GetIndex(),solvejoints=solvejoints,freeparams=freejointinds,usedummyjoints=usedummyjoints,solvefn=solvefn,lang=outputlang)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 551, in generateIkSolver
>>>    return self.generateIkSolverChain(chain,solvefn,lang=lang)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 571, in generateIkSolverChain
>>>    return CodeGenerators[lang]().generate(chaintree)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 226, in generate
>>>    code += solvertree.generate(self)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 190, in generate
>>>    return generator.generateChain(self)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 345, in generateChain
>>>    fcode += self.generateTree(node.jointtree)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 946, in generateTree
>>>    code += n.generate(self)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 145, in generate
>>>    return generator.generateBranchConds(self)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 838, in generateBranchConds
>>>    branchcode += n.generate(self)
>>>  File "/home/leid_da/local/share/openrave/openravepy/ikfast.py", line
>>> 120, in generate
>>>    return generator.generateConditionedSolution(self)
>>>  File
>>> "/home/leid_da/local/share/openrave/openravepy/ikfast_generator_cpp.py",
>>> line 791, in generateConditionedSolution
>>>    for i,j in combinations(range(allnumsolutions),2):
>>> ValueError: r cannot be bigger than the iterable
>>>
>>> daniel
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net Dev2Dev email is sponsored by:
>>>
>>> Show off your parallel programming skills.
>>> Enter the Intel(R) Threading Challenge 2010.
>>> http://p.sf.net/sfu/intel-thread-sfd
>>> _______________________________________________
>>> Openrave-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net Dev2Dev email is sponsored by:
>>>
>>> Show off your parallel programming skills.
>>> Enter the Intel(R) Threading Challenge 2010.
>>> http://p.sf.net/sfu/intel-thread-sfd
>>> _______________________________________________
>>> Openrave-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Start uncovering the many advantages of virtual appliances
>>> and start using them to simplify application deployment and
>>> accelerate your shift to cloud computing
>>> http://p.sf.net/sfu/novell-sfdev2dev
>>>
>>> _______________________________________________
>>> Openrave-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>
>>>
>>>
>
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users