Custom IKFast for your Baxter

From sdk-wiki
Revision as of 19:11, 17 June 2015 by Imcmahon (Talk | contribs)

Jump to: navigation, search

Overview

Every Baxter's URDF is slightly different. This tutorial will show you how to generate IKFast for use with MoveIt specific to your Baxter. For additional background information on the algorithm behind IKFast, please see Rosen Diankov's Doctoral thesis.

What is IKFast?

#ikfast IKFast provides analytical closed-form solutions for manipulator inverse kinematics. Part of the OpenRAVE robot architecture/software framework, IKFast has been used to provide closed-form solutions for Baxter's inverse kinematics. Advantages include order of magnitude faster IK solutions and the ability explore the manipulator's null space!


Extracting the Mount Joint Transform

The left and right arm mount joint's in Baxter's torso are hand-welded at manufacture time. These joints are carefully measured and the transforms are stored in your Baxter's torso joint board. Fortunately, we can see the transforms in your robot's URDF located in the /robot_description parameter on the param server. After a fresh boot (to ensure the custom URDF has not been overwritten), from a properly initialized Baxter environment, export the URDF from the /robot_description parameter on the ROS parameter server where it is stored, to a file of your choice (ex: baxter_urdf.xml):

$ rosparam get -p /robot_description | tail -n +2 > baxter_urdf.xml

The -p outputs the parameter using pretty print. The output urdf is piped through the tail command first to remove a dummy first line - an artifact of the pretty print.


Open baxter_urdf.xml in your favorite text editor, and search for torso_arm_mount to find the only joints that differ from Baxter to Baxter:

      <joint name="left_torso_arm_mount" type="fixed">
          <origin xyz="0.0229088 0.220982 0.106714" rpy="-0.0179406 0.0117677 0.786034" />
          <axis xyz="0 0 0" />
          <parent link="torso" />
          <child link="left_arm_mount" />
      </joint>

and

      <joint name="right_torso_arm_mount" type="fixed">
          <origin xyz="0.0245182 -0.218624 0.10866" rpy="-0.00321838 -0.00564277 -0.78571" />
          <axis xyz="0 0 0" />
          <parent link="torso" />
          <child link="right_arm_mount" />
      </joint>



Using Baxter's MoveIt! IKFast plugins

Please see MoveIt_Tutorial#IKFast for the exact commands required toenable IKFast in your baxter_moveit_config package.