Creating IK solver for Meka robot Arms to use with Webots simulation

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

Creating IK solver for Meka robot Arms to use with Webots simulation

shaun85
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hey Guys,

I'm working with a custom humanoid robot from the company Meka (now owned by Google) in our lab. As part of simulation, we recently had the robot (named Rosie) modelled in Webots. We'd now like to have IK solver for the arms as we're planning on doing lots of experiments involving grasping objects. I came across Openrave's IKFast solver and thought I would give it a try. I cloned the master from Github from here and built it from source based on this tutorial. I am running 64-bit Ubuntu 14.04.

We were given a URDF file representing the robot which I have attached here rosie.urdf. Based on the this tutorial on ROS wiki I converted the URDF file to a DAE file that I attach here rosie.dae. Even though I had the STL files in the folder meka_description, it wasn't able to be loaded by the tutorial mentioned that IKFast only requires frame transforms, so I hoped it would matter much.

Anyway, following the tutorial I list all the links by using "openrave-robot.py rosie.dae --info links" and my output was this:
name                           index parents              
-----------------------------------------------------------
world                          0                          
base_link                      1     world                
dummy_1                        2     base_link            
dummy_2                        3     dummy_1              
dummy_3                        4     dummy_2              
zlift_link                     5     dummy_3              
upper                          6     zlift_link            
neck_pan                       7     upper                
shell                          8     neck_pan              
BB3                            9     shell                
primesense_cam                 10    shell                
primesense_depth_frame         11    primesense_cam        
primesense_depth_optical_frame 12    primesense_depth_frame
primesense_rgb_frame           13    primesense_cam        
primesense_rgb_optical_frame   14    primesense_rgb_frame  
shoulderupper_LEFT             15    upper                
shoulderpitch_LEFT             16    shoulderupper_LEFT    
bicep_LEFT                     17    shoulderpitch_LEFT    
elbowclevis_LEFT               18    bicep_LEFT            
wrist_LEFT                     19    elbowclevis_LEFT      
w_differential_LEFT            20    wrist_LEFT            
handmount_LEFT                 21    w_differential_LEFT  
l_palm                         22    handmount_LEFT        
l_thumb0                       23    l_palm                
l_thumb1                       24    l_thumb0              
l_thumb2                       25    l_thumb1              
l_index0                       26    l_palm                
l_index1                       27    l_index0              
l_index2                       28    l_index1              
l_ring0                        29    l_palm                
l_ring1                        30    l_ring0              
l_ring2                        31    l_ring1              
l_pinky0                       32    l_palm                
l_pinky1                       33    l_pinky0              
l_pinky2                       34    l_pinky1              
shoulderupper_RIGHT            35    upper                
shoulderpitch_RIGHT            36    shoulderupper_RIGHT  
bicep_RIGHT                    37    shoulderpitch_RIGHT  
elbowclevis_RIGHT              38    bicep_RIGHT          
wrist_RIGHT                    39    elbowclevis_RIGHT    
w_differential_RIGHT           40    wrist_RIGHT          
handmount_RIGHT                41    w_differential_RIGHT  
palm                           42    handmount_RIGHT      
thumb0                         43    palm                  
thumb1                         44    thumb0                
thumb2                         45    thumb1                
index0                         46    palm                  
index1                         47    index0                
index2                         48    index1                
ring0                          49    palm                  
ring1                          50    ring0                
ring2                          51    ring1                
pinky0                         52    palm                  
pinky1                         53    pinky0                
pinky2                         54    pinky1                
-----------------------------------------------------------
name                           index parents        

I wanted to create IK solver starting with the left arm first whose base link is shoulderupper_LEFT (15) and end link is handmount_LEFT (21). So I ran IKfast with those parameters: "python /usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py --robot=rosie.dae --iktype=transform6d --baselink=15 --eelink=21 --savefile=leftarm_ikfast.cpp". The process failed with the error "TypeError: symbolic boolean expression has no truth value." along with a lot of other output which I've attached as a file here output.txt.

I would appreciate any help in creating the IK solver for the arms for this robot. Please let me know if you need any more information.

Thanks,
Shaun.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Creating IK solver for Meka robot Arms to use with Webots simulation

shaun85
This post has NOT been accepted by the mailing list yet.
I was able to solve the problem I was having. The error "TypeError: symbolic boolean expression has no truth value." was apparently due to the version of sympy. According to this link, I uninstalled sympy and installed version 0.7.1 and was able to generate cpp files both the leftarm and the rightarm based on the indices given my previous post. In the ROS tutorial, it was mentioned that for 7-DOF arms, I need to include a freeindex parameter. I'm not sure what this is or which index to include. But I ended up just including the index next to the end link. So for both the arms I used the following commands:

"python /usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py --robot=rosie.dae --iktype=transform6d --baselink=15 --eelink=21 --savefile=leftarm_ikfast.cpp --freeindex=22"

"python /usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py --robot=rosie.dae --iktype=transform6d --baselink=35 --eelink=41 --savefile=rightarm_ikfast.cpp --freeindex=42"

This generated leftarm.cpp and rightarm.cpp. Following this tutorial, I used the following commands:

g++ -lstdc++ -I/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ -o leftarm_ikfast leftarm_ikfast.cpp -llapack

g++ -lstdc++ -I/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ -o rightarm_ikfast rightarm_ikfast.cpp -llapack

This worked and I now have two executables representing IK solver for the arms. The problem is I don't know what to do to test out and make sure what they output is right. Since the STL files were not read by the ROS collada conversion, I don't think I launch openrave's GUI to test these out. I would prefer Webots since I have the model running there.

Any suggestions?

Thanks,
Shaun.
Loading...