Skip to content

createmoveit

Salvo Virga edited this page Jul 25, 2017 · 11 revisions

Create a MoveIt! package with the new robot definition

We are going to create an ROS package that uses MoveIt! to control an IIWA equipped with the tool described HERE.
The final result is available HERE.

You can follow the same for any other tool previously defined in a URDF macro. Change all the name with the appropriate tool name, here is just "tool".

Start the MoveIt! setup assistant :
roslaunch moveit_setup_assistant setup_assistant.launch
Hit "Create New Moveit Configuration Package".
Load the urdf.xacro that describe the robot with a tool attached, HERE is how to define one.
Generate the self-collision matrix.
In the section Planning Groups, click "Add Group" and select the following:

Then advance into "Add Kin. Chain" and select the following as base and tip links :

Go to "Author Information" and fill in your details, then go to "Configuration Files" and generate the package into the appropriate folder (e.g. {your_ros_workspace}/iiwa_{yourtool}_moveit).

Go to "Configuration Files" and generate the package into the appropriate folder (name it iiwa_tool_moveit, with the appropriate tool name)

You have already the package there, but some minor changes needed to be done.
Go to the launch folder of the package :
roscd iiwa_tool_moveit/launch

  1. Open planning_context.launch.
    Copy the content of the file with the same name in iiwa_moveit/launch into this one.
    Replace iiwa_description with iiwa_tool_description.
    Replace iiwa_moveit with iiwa_tool_moveit.
    Line 15, modify the file name "$(arg model)_tool_upload.launch" to match the one of the launch file you created for this robot description
    (e.g. $(arg model)_gripper_upload.launch)
    Line 22, modify the file name "$(arg model)_tool.srdf" to match the one corresponding to the name of your robotic description
    (e.g. $(arg model)_gripper.srdf)

  2. Open demo.launch
    Copy the content of the file with the same name in iiwa_moveit/launch into this one.
    Replace iiwa_moveit with iiwa_tool_moveit

  3. Open move_group.launch Copy the content of the file with the same name in iiwa_moveit/launch into this one.
    Replace iiwa_moveit with iiwa_tool_moveit EXCEPT FOR LINES 39 and 47.

  4. Copy the file moveit_planning_execution.launch from iiwa_moveit/launch to this folder.
    Replace iiwa_moveit with iiwa_tool_moveit

Build your workspace, source it and try :
roslaunch iiwa_tool_moveit moveit_planning_execution.launch sim:=false

RViZ - the ROS visualization tool - should pop up with the robot loaded in and MoveIt! ready to be used.

Clone this wiki locally