AUTh-ARL Core Stack  0.7
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Using MoveIt! packages

This page aims to provide a small tutorial for using MoveIt.

In order to use MoveIt! planning you should start an Asynchronous Spinner when you start your main in your executable, because otherwhise the function after planning will not return:

int main(int argc, char** argv)
{
ros::init(argc, argv, "autharl_moveit_example");
ros::NodeHandle n, nh("~");
ros::AsyncSpinner spinner(1);
spinner.start();
}

Create a new MoveIt! configuration package

For each different robot and URDF we need a custom MoveIt! configuration package which creates the SRDF for the robot. Follow the following steps in order to create a new config package:

  1. Source the workspace with source ./devel/setup.bash
  2. Run

    roslaunch moveit_setup_assistant setup_assistant.launch

  3. Select Create New MoveIt Configuration Package
  4. Select Browse and select a xacro from descriptions/robots
  5. Select Load Files
  6. In Self-Collisions click Regenerate Default Collision Matrix with the default settings.
  7. In Planning Groups select Add Group to add new groups. If you are replacing an existing moveit config probably first open the existing package to see what chains defines and do not forget to add them.
    1. Use as name the name of the xacro you selected with a subfix for multiple groups
    2. Select as kinematic solver: kdl_kinematics_plugin/KDLKinematicsPlugin
    3. Select Add Kin. Chain
    4. Select the base link and the tip link of the chain for this group. Clik Save
  8. Save the package in moveit directory with name XXX_moveit_config, where XXX the name of the xacro you selected.
  9. Change manually the name of the package name for the urdf from descriptions to lwr_description. MoveIt reads the name of the package from the name of the directory for some reason. Grep to find these:

    cd XXX_moveit_config grep -rnw descriptions