Difference between revisions of "Custom IKFast for your Baxter"

From sdk-wiki
Jump to: navigation, search
(Install OpenRAVE)
(Install OpenRAVE)
Line 11: Line 11:
  
 
== Install OpenRAVE ==
 
== Install OpenRAVE ==
As of this writing, the [http://www.openrave.org/docs/latest_stable/install/#install instructions for adding the openrave PPA and installing openrave debians] does not work on Ubuntu Trusty since the [https://launchpad.net/~openrave/+archive/ubuntu/release latest release was created in 2012 for Precise]. That leaves installing from source as the only option. Please clone the [https://github.com/rdiankov/openrave OpenRAVE repo] and follow [http://www.openrave.org/docs/latest_stable/coreapihtml/installation_linux.html#Building_OpenRAVE this tutorial for building from source].
+
As of this writing, the [http://www.openrave.org/docs/latest_stable/install/#install instructions for adding the openrave PPA and installing openrave debians] does not work on Ubuntu Trusty since the [https://launchpad.net/~openrave/+archive/ubuntu/release latest release was created in 2012 for Precise]. That leaves installing from source as the only option. Please clone the [https://github.com/rdiankov/openrave OpenRAVE repo] and follow [http://www.openrave.org/docs/latest_stable/coreapihtml/installation_linux.html#Building_OpenRAVE this tutorial for building from source].<br/>
 
<code>git clone --branch latest_stable https://github.com/rdiankov/openrave.git</code>
 
<code>git clone --branch latest_stable https://github.com/rdiankov/openrave.git</code>
  

Revision as of 20:09, 17 June 2015

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. This is a fairly involved process, requiring many steps. 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!

Using Baxter's MoveIt! IKFast plugins

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

Generating Custom IKFast for Baxter

Install OpenRAVE

As of this writing, the instructions for adding the openrave PPA and installing openrave debians does not work on Ubuntu Trusty since the latest release was created in 2012 for Precise. That leaves installing from source as the only option. Please clone the OpenRAVE repo and follow this tutorial for building from source.
git clone --branch latest_stable https://github.com/rdiankov/openrave.git


Download baxter_arm.dae description located alongside this document. This Collada description of a single baxter_arm has been generated from a simplified baxter_arm urdf description (located alongside this document) using the moveit_ikfast tools: https://github.com/ros-planning/moveit_ikfast.git

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. This is an example of what you should expect if the robot description contains Baxter's custom joints:

<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>

Save these snippits of URDF for the next steps.


  • Note: If you see the following joint values, then you are using the generic URDF provided in baxter_description of the SDK. This can happen if the generic URDF is loaded to the param server via a roslaunch script (such as the one with MoveIt). Reboot your robot to clear the robot_description and try again:
    <joint name="left_torso_arm_mount" type="fixed">
        <origin rpy="0 0 0.7854" xyz="0.024645 0.219645 0.118588"/>
        <parent link="torso"/>
        <child link="left_arm_mount"/>
    </joint>
    <joint name="right_torso_arm_mount" type="fixed">
        <origin rpy="0 0 -0.7854" xyz="0.024645 -0.219645 0.118588"/>
        <parent link="torso"/>
        <child link="right_arm_mount"/>
    </joint>