Generating ik model for BarrettWAM4 robot

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

Generating ik model for BarrettWAM4 robot

Kim Jackson
Hi,

I would like to be able to use inverse kinematics with the barret wam 4 robot, and this doesn't seem to have an auto-generated model. According to http://openrave.programmingvision.com/index.php/Databases:InverseKinematics , I should be able to generate a model using the inversekinematics.py file. However, When I run
 'python inversekinematics.py --robot=robots/barrettwam4.robot.xml --force --debug=2', I get the following:

/usr/local/share/openrave/openravepy/metaclass.py:22: DeprecationWarning: object.__new__() takes no parameters
  self = super(InstanceTracker, cls).__new__(*args, **kwargs)
Generating inverse kinematics for manip arm : Translation3D [0, 1, 3] (this might take ~10 min)
generating inverse kinematics file /home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.arm.Translation3D_0_1_3_f2.cpp
moved translation  [0, 0, 0] to left end
moved translation on intersecting axis  [0, 0, 0] to left
attempting  j2  =  0
attempting  j2  =  pi/2
attempting  j2  =  pi
attempting  j2  =  -pi/2
attempting  None  =  None
destroying environment

(Gets to this point and quits after ~1 min)

Am I doing something wrong? Is it generating a file that I just can't find? I guess I'm a bit unclear about what I'd do with the file once it was created anyway.

Alternately, has someone already generated this ik file?

Thanks again,

Kim

--
Kim Jackson

MIT Class of 2010
Department of Aeronautics and Astronautics
[hidden email]

------------------------------------------------------------------------------


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

Re: Generating ik model for BarrettWAM4 robot

Rosen Diankov
Administrator
Dear Kim,

since the robot has only 4 DOF, the only IK you can generate for it is
the 3D translation of the end effector, with one free parameter. for
you, the file should be generated in:

/home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.arm.Translation3D_0_1_3_f2.cpp

this file is actually compiled and loaded automatically by openrave
(see the previous posts on this list about inversekinematics.py).

You can test that the IK works using:

python inversekinematics.py --robot=robots/barrettwam4.robot.xml
--translation3donly --numiktests=100

> testing the success rate of robot  robots/barrettwam4.robot.xml
> success rate is:  1.0

Basically, inversekinematics.py will set the IKSolver inside the
robot's manipulator structure. You can then call this IK solver using
FindIKSolution(s)

rosen,


2010/5/10 Kim Jackson <[hidden email]>:

> Hi,
>
> I would like to be able to use inverse kinematics with the barret wam 4
> robot, and this doesn't seem to have an auto-generated model. According to
> http://openrave.programmingvision.com/index.php/Databases:InverseKinematics
> , I should be able to generate a model using the inversekinematics.py file.
> However, When I run
>  'python inversekinematics.py --robot=robots/barrettwam4.robot.xml --force
> --debug=2', I get the following:
>
> /usr/local/share/openrave/openravepy/metaclass.py:22: DeprecationWarning:
> object.__new__() takes no parameters
>   self = super(InstanceTracker, cls).__new__(*args, **kwargs)
> Generating inverse kinematics for manip arm : Translation3D [0, 1, 3] (this
> might take ~10 min)
> generating inverse kinematics file
> /home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.arm.Translation3D_0_1_3_f2.cpp
> moved translation  [0, 0, 0] to left end
> moved translation on intersecting axis  [0, 0, 0] to left
> attempting  j2  =  0
> attempting  j2  =  pi/2
> attempting  j2  =  pi
> attempting  j2  =  -pi/2
> attempting  None  =  None
> destroying environment
>
> (Gets to this point and quits after ~1 min)
>
> Am I doing something wrong? Is it generating a file that I just can't find?
> I guess I'm a bit unclear about what I'd do with the file once it was
> created anyway.
>
> Alternately, has someone already generated this ik file?
>
> Thanks again,
>
> Kim
>
> --
> Kim Jackson
>
> MIT Class of 2010
> Department of Aeronautics and Astronautics
> [hidden email]
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>

------------------------------------------------------------------------------

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

Re: Generating ik model for BarrettWAM4 robot

Kim Jackson
I see. Since I'm doing my scripting from within Matlab, is there anything special I need to do to make sure Matlab can find this IKSolver? Calling orRobotGetManipulators(robot.id) still results in a cell struct with an empty iksolvername field.

Thanks for the quick response!

Kim

On Mon, May 10, 2010 at 2:21 AM, Rosen Diankov <[hidden email]> wrote:
Dear Kim,

since the robot has only 4 DOF, the only IK you can generate for it is
the 3D translation of the end effector, with one free parameter. for
you, the file should be generated in:

/home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.arm.Translation3D_0_1_3_f2.cpp

this file is actually compiled and loaded automatically by openrave
(see the previous posts on this list about inversekinematics.py).

You can test that the IK works using:

python inversekinematics.py --robot=robots/barrettwam4.robot.xml
--translation3donly --numiktests=100

> testing the success rate of robot  robots/barrettwam4.robot.xml
> success rate is:  1.0

Basically, inversekinematics.py will set the IKSolver inside the
robot's manipulator structure. You can then call this IK solver using
FindIKSolution(s)

rosen,


2010/5/10 Kim Jackson <[hidden email]>:
> Hi,
>
> I would like to be able to use inverse kinematics with the barret wam 4
> robot, and this doesn't seem to have an auto-generated model. According to
> http://openrave.programmingvision.com/index.php/Databases:InverseKinematics
> , I should be able to generate a model using the inversekinematics.py file.
> However, When I run
>  'python inversekinematics.py --robot=robots/barrettwam4.robot.xml --force
> --debug=2', I get the following:
>
> /usr/local/share/openrave/openravepy/metaclass.py:22: DeprecationWarning:
> object.__new__() takes no parameters
>   self = super(InstanceTracker, cls).__new__(*args, **kwargs)
> Generating inverse kinematics for manip arm : Translation3D [0, 1, 3] (this
> might take ~10 min)
> generating inverse kinematics file
> /home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.arm.Translation3D_0_1_3_f2.cpp
> moved translation  [0, 0, 0] to left end
> moved translation on intersecting axis  [0, 0, 0] to left
> attempting  j2  =  0
> attempting  j2  =  pi/2
> attempting  j2  =  pi
> attempting  j2  =  -pi/2
> attempting  None  =  None
> destroying environment
>
> (Gets to this point and quits after ~1 min)
>
> Am I doing something wrong? Is it generating a file that I just can't find?
> I guess I'm a bit unclear about what I'd do with the file once it was
> created anyway.
>
> Alternately, has someone already generated this ik file?
>
> Thanks again,
>
> Kim
>
> --
> Kim Jackson
>
> MIT Class of 2010
> Department of Aeronautics and Astronautics
> [hidden email]
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>



--
Kim Jackson

MIT Class of 2010
Department of Aeronautics and Astronautics
[hidden email]

------------------------------------------------------------------------------


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

regarding contact points

Jong Eun Kim
In reply to this post by Kim Jackson
Hello Rosen,
I am still working on my project.

I have a few questions on it.

I think that if I using selfCollision test ( check collision with robot,
not with robot and target object), I have no way to find the contact point
from that function. I wonder there is any way that I can find it.

Second questions is related with the contact point.

After using orEnvCollisionCheck, I got the contact point data 7 by 6 matrix .
The data is below:

1.71185000000000e-05 1.70716000000000e-05 1.71422000000000e-05
1.70485000000000e-05 1.71422000000000e-05 1.70485000000000e-05

0 0 9.63633000000000e-06 1.24117000000000e-07 1.96363000000000e-05 1.01241000000000e-05


-6.03000000000000e-05 -6.03000000000000e-05 -6.03000000000000e-05 -6.03000000000000e-05 -6.03000000000000e-05 -6.03000000000000e-05


0 0 0 0 0 0
0 0 0 0 0 0
-1 -1 -1 -1 -1 -1
0 0 0 0 0 0

I am not sure that which data represent the correct contact points and
normal vector. One of my data even gave me the 7 by 12 matrix. In
addition, I just want to make sure that I am doing right. from this
function, [collision, colbodyid, contacts] =
orEnvCheckCollision(bodyid,excludeid,getcontacts), I put the bodyid and
excludedid for the robot.id and getcontact for 1 or true. I am not sure
what excludedid means becausea after I put the target.id into excludeid,
it does not correct check the collision with body and object. So I just
put the robot.id for both excludedid and body.id Last question, in order
to check the right position of contact point and the normal direction, I
might need to plot them into openrave, I wonder that there is any way that
I can plot those data into openrave??

Thanks!!


On Mon, May 10, 2010 2:21 am, Rosen Diankov wrote:

> Dear Kim,
>
>
> since the robot has only 4 DOF, the only IK you can generate for it is the
> 3D translation of the end effector, with one free parameter. for
> you, the file should be generated in:
>
> /home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.ar
> m.Translation3D_0_1_3_f2.cpp
>
> this file is actually compiled and loaded automatically by openrave (see
> the previous posts on this list about inversekinematics.py).
>
> You can test that the IK works using:
>
>
> python inversekinematics.py --robot=robots/barrettwam4.robot.xml
> --translation3donly --numiktests=100
>
>
>> testing the success rate of robot  robots/barrettwam4.robot.xml success
>> rate is:  1.0
>
> Basically, inversekinematics.py will set the IKSolver inside the
> robot's manipulator structure. You can then call this IK solver using
> FindIKSolution(s)
>
>
> rosen,
>
>
> 2010/5/10 Kim Jackson <[hidden email]>:
>
>> Hi,
>>
>>
>> I would like to be able to use inverse kinematics with the barret wam 4
>>  robot, and this doesn't seem to have an auto-generated model.
>> According to
>> http://openrave.programmingvision.com/index.php/Databases:InverseKinemat
>> ics , I should be able to generate a model using the
>> inversekinematics.py file. However, When I run
>>  'python inversekinematics.py --robot=robots/barrettwam4.robot.xml
>> --force
>> --debug=2', I get the following:
>>
>>
>> /usr/local/share/openrave/openravepy/metaclass.py:22:
>> DeprecationWarning:
>> object.__new__() takes no parameters   self = super(InstanceTracker,
>> cls).__new__(*args, **kwargs) Generating inverse kinematics for manip
>> arm : Translation3D [0, 1, 3] (this might take ~10 min) generating
>> inverse kinematics file
>> /home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.
>> arm.Translation3D_0_1_3_f2.cpp moved translation  [0, 0, 0] to left end
>> moved translation on intersecting axis  [0, 0, 0] to left attempting 
>> j2  =  0 attempting  j2  =  pi/2 attempting  j2  =  pi attempting  j2  = 
>> -pi/2
>> attempting  None  =  None destroying environment
>>
>> (Gets to this point and quits after ~1 min)
>>
>>
>> Am I doing something wrong? Is it generating a file that I just can't
>> find? I guess I'm a bit unclear about what I'd do with the file once it
>> was created anyway.
>>
>> Alternately, has someone already generated this ik file?
>>
>>
>> Thanks again,
>>
>>
>> Kim
>>
>>
>> --
>> Kim Jackson
>>
>>
>> MIT Class of 2010
>> Department of Aeronautics and Astronautics
>> [hidden email]
>>
>> -----------------------------------------------------------------------
>> -------
>>
>>
>>
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>>
>>
>
> -------------------------------------------------------------------------
> -----
>
>
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>
>
>



------------------------------------------------------------------------------

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

Re: regarding contact points

Rosen Diankov
Administrator
hi jong eun,

the contacts matrix is 7xN where first 3 rows are position, next 3
rows are normal vector, and last row is penetration depth

excludedid means you want to 'exclude' this particular object from
collision consideration. please set it to [] if you are confused by
its usage.

there is an orEnvPlot function which you can use to plot graphs in
openrave. I recommend looking at the
share/openrave/octave/examples/testplotting.m on how to use this
function

please explain in detail why you need contact points for
self-collision checking.

rosen,

2010/5/10 Jong Eun Kim <[hidden email]>:

> Hello Rosen,
> I am still working on my project.
>
> I have a few questions on it.
>
> I think that if I using selfCollision test ( check collision with robot,
> not with robot and target object), I have no way to find the contact point
> from that function. I wonder there is any way that I can find it.
>
> Second questions is related with the contact point.
>
> After using orEnvCollisionCheck, I got the contact point data 7 by 6 matrix .
> The data is below:
>
> 1.71185000000000e-05    1.70716000000000e-05    1.71422000000000e-05
> 1.70485000000000e-05    1.71422000000000e-05    1.70485000000000e-05
>
> 0       0       9.63633000000000e-06    1.24117000000000e-07    1.96363000000000e-05    1.01241000000000e-05
>
>
> -6.03000000000000e-05   -6.03000000000000e-05   -6.03000000000000e-05   -6.03000000000000e-05   -6.03000000000000e-05   -6.03000000000000e-05
>
>
> 0       0       0       0       0       0
> 0       0       0       0       0       0
> -1      -1      -1      -1      -1      -1
> 0       0       0       0       0       0
>
> I am not sure that which data represent the correct contact points and
> normal vector. One of my data even gave me the 7 by 12 matrix. In
> addition, I just want to make sure that I am doing right. from this
> function, [collision, colbodyid, contacts] =
> orEnvCheckCollision(bodyid,excludeid,getcontacts), I put the bodyid and
> excludedid for the robot.id and getcontact for 1 or true. I am not sure
> what excludedid means becausea after I put the target.id into excludeid,
> it does not correct check the collision with body and object. So I just
> put the robot.id for both excludedid and body.id Last question, in order
> to check the right position of contact point and the normal direction, I
> might need to plot them into openrave, I wonder that there is any way that
> I can plot those data into openrave??
>
> Thanks!!
>
>
> On Mon, May 10, 2010 2:21 am, Rosen Diankov wrote:
>> Dear Kim,
>>
>>
>> since the robot has only 4 DOF, the only IK you can generate for it is the
>> 3D translation of the end effector, with one free parameter. for
>> you, the file should be generated in:
>>
>> /home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.ar
>> m.Translation3D_0_1_3_f2.cpp
>>
>> this file is actually compiled and loaded automatically by openrave (see
>> the previous posts on this list about inversekinematics.py).
>>
>> You can test that the IK works using:
>>
>>
>> python inversekinematics.py --robot=robots/barrettwam4.robot.xml
>> --translation3donly --numiktests=100
>>
>>
>>> testing the success rate of robot  robots/barrettwam4.robot.xml success
>>> rate is:  1.0
>>
>> Basically, inversekinematics.py will set the IKSolver inside the
>> robot's manipulator structure. You can then call this IK solver using
>> FindIKSolution(s)
>>
>>
>> rosen,
>>
>>
>> 2010/5/10 Kim Jackson <[hidden email]>:
>>
>>> Hi,
>>>
>>>
>>> I would like to be able to use inverse kinematics with the barret wam 4
>>>  robot, and this doesn't seem to have an auto-generated model.
>>> According to
>>> http://openrave.programmingvision.com/index.php/Databases:InverseKinemat
>>> ics , I should be able to generate a model using the
>>> inversekinematics.py file. However, When I run
>>>  'python inversekinematics.py --robot=robots/barrettwam4.robot.xml
>>> --force
>>> --debug=2', I get the following:
>>>
>>>
>>> /usr/local/share/openrave/openravepy/metaclass.py:22:
>>> DeprecationWarning:
>>> object.__new__() takes no parameters   self = super(InstanceTracker,
>>> cls).__new__(*args, **kwargs) Generating inverse kinematics for manip
>>> arm : Translation3D [0, 1, 3] (this might take ~10 min) generating
>>> inverse kinematics file
>>> /home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.
>>> arm.Translation3D_0_1_3_f2.cpp moved translation  [0, 0, 0] to left end
>>> moved translation on intersecting axis  [0, 0, 0] to left attempting
>>> j2  =  0 attempting  j2  =  pi/2 attempting  j2  =  pi attempting  j2  =
>>> -pi/2
>>> attempting  None  =  None destroying environment
>>>
>>> (Gets to this point and quits after ~1 min)
>>>
>>>
>>> Am I doing something wrong? Is it generating a file that I just can't
>>> find? I guess I'm a bit unclear about what I'd do with the file once it
>>> was created anyway.
>>>
>>> Alternately, has someone already generated this ik file?
>>>
>>>
>>> Thanks again,
>>>
>>>
>>> Kim
>>>
>>>
>>> --
>>> Kim Jackson
>>>
>>>
>>> MIT Class of 2010
>>> Department of Aeronautics and Astronautics
>>> [hidden email]
>>>
>>> -----------------------------------------------------------------------
>>> -------
>>>
>>>
>>>
>>> _______________________________________________
>>> Openrave-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>
>>>
>>>
>>
>> -------------------------------------------------------------------------
>> -----
>>
>>
>> _______________________________________________
>> Openrave-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openrave-users
>>
>>
>>
>
>
>

------------------------------------------------------------------------------

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

Re: Generating ik model for BarrettWAM4 robot

Rosen Diankov
Administrator
In reply to this post by Kim Jackson
hi kim,

yes there is a way, although it is not officially recommended since
Matlab does not support the full openrave function set (and most
likely never will). In either case, you should find a shared object in
this folder (or whatever folder the inverse kinematiics were
generated)

/home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5

for me it is called ikfast.arm.Translation3D.i686.so (in windows it
would be a dll)

inside your <manipulator> tag in your robot XML file, add:

<iksolver>/home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.arm.Translation3D.i686.so</iksolver>

please note that once you change your robot, the hash will change, so
you would have to update things.

If you want to automated this procedure, you can do what python is
doing in a c++ plugin and have matlab load that. I recommend taking a
look at the setrobot function in inversekinematics.py (basically it
loads the IKFast problem and calls its AddIkLibrary command)

rosen,

2010/5/10 Kim Jackson <[hidden email]>:

> I see. Since I'm doing my scripting from within Matlab, is there anything
> special I need to do to make sure Matlab can find this IKSolver? Calling
> orRobotGetManipulators(robot.id) still results in a cell struct with an
> empty iksolvername field.
>
> Thanks for the quick response!
>
> Kim
>
> On Mon, May 10, 2010 at 2:21 AM, Rosen Diankov <[hidden email]>
> wrote:
>>
>> Dear Kim,
>>
>> since the robot has only 4 DOF, the only IK you can generate for it is
>> the 3D translation of the end effector, with one free parameter. for
>> you, the file should be generated in:
>>
>>
>> /home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.arm.Translation3D_0_1_3_f2.cpp
>>
>> this file is actually compiled and loaded automatically by openrave
>> (see the previous posts on this list about inversekinematics.py).
>>
>> You can test that the IK works using:
>>
>> python inversekinematics.py --robot=robots/barrettwam4.robot.xml
>> --translation3donly --numiktests=100
>>
>> > testing the success rate of robot  robots/barrettwam4.robot.xml
>> > success rate is:  1.0
>>
>> Basically, inversekinematics.py will set the IKSolver inside the
>> robot's manipulator structure. You can then call this IK solver using
>> FindIKSolution(s)
>>
>> rosen,
>>
>>
>> 2010/5/10 Kim Jackson <[hidden email]>:
>> > Hi,
>> >
>> > I would like to be able to use inverse kinematics with the barret wam 4
>> > robot, and this doesn't seem to have an auto-generated model. According
>> > to
>> >
>> > http://openrave.programmingvision.com/index.php/Databases:InverseKinematics
>> > , I should be able to generate a model using the inversekinematics.py
>> > file.
>> > However, When I run
>> >  'python inversekinematics.py --robot=robots/barrettwam4.robot.xml
>> > --force
>> > --debug=2', I get the following:
>> >
>> > /usr/local/share/openrave/openravepy/metaclass.py:22:
>> > DeprecationWarning:
>> > object.__new__() takes no parameters
>> >   self = super(InstanceTracker, cls).__new__(*args, **kwargs)
>> > Generating inverse kinematics for manip arm : Translation3D [0, 1, 3]
>> > (this
>> > might take ~10 min)
>> > generating inverse kinematics file
>> >
>> > /home/kjackson/.openrave/robot.811c96bfa1b9444953763310418ca2a5/ikfast.arm.Translation3D_0_1_3_f2.cpp
>> > moved translation  [0, 0, 0] to left end
>> > moved translation on intersecting axis  [0, 0, 0] to left
>> > attempting  j2  =  0
>> > attempting  j2  =  pi/2
>> > attempting  j2  =  pi
>> > attempting  j2  =  -pi/2
>> > attempting  None  =  None
>> > destroying environment
>> >
>> > (Gets to this point and quits after ~1 min)
>> >
>> > Am I doing something wrong? Is it generating a file that I just can't
>> > find?
>> > I guess I'm a bit unclear about what I'd do with the file once it was
>> > created anyway.
>> >
>> > Alternately, has someone already generated this ik file?
>> >
>> > Thanks again,
>> >
>> > Kim
>> >
>> > --
>> > Kim Jackson
>> >
>> > MIT Class of 2010
>> > Department of Aeronautics and Astronautics
>> > [hidden email]
>> >
>> >
>> > ------------------------------------------------------------------------------
>> >
>> >
>> > _______________________________________________
>> > Openrave-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/openrave-users
>> >
>> >
>
>
>
> --
> Kim Jackson
>
> MIT Class of 2010
> Department of Aeronautics and Astronautics
> [hidden email]
>

------------------------------------------------------------------------------

_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users