Note: This tutorial assumes that you have completed the previous tutorials: Calibrating a Kinect to the TurtleBot Arm for Manipulation.
(!) Please ask about problems and questions regarding this tutorial on Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

TurtleBot Arm Block Manipulation Demo

Description: This tutorial will walk you through picking and placing blocks on a level surface using user input from rviz.

Tutorial Level: ADVANCED



You must have calibrated the camera (on-board or off-board) following the Kinect Calibration Tutorial.

You must also have the simple_arm_server running. If it isn't, use the following command to launch it on the TurtleBot:

roslaunch turtlebot_arm_bringup simple_arm_server.launch

Physical Set-up

This demo requires a level surface at a level that the arm can reach. For our testing, we used IKEA Lack Sidetables, but any level surface of around that height will work.

You also need some blocks to manipulate - we used wooden children's blocks that were 3 cm to a side, like these blocks on Amazon.

Running the Demo

If you're using the same physical set-up as we are (IKEA table or something of the same height, 3 cm blocks), you can simply use the demo launch file provided in the turtlebot_block_manipulation package.

roslaunch turtlebot_block_manipulation demo_actions.launch

Making your Own Launch File

If your blocks are a different size, or your table is at a considerably different height with respect to the /arm_base_link, you will need to create your own launch file.

Paste the following into a new launch file, and modify the parameters as necessary.


  <!-- Launch the camera drivers (take this out if the camera you're using is *on* the TurtleBot -->
  <include file="$(find openni_camera)/launch/openni_node.launch" />
  <!-- Launch all the actions. -->
  <include file="$(find turtlebot_block_manipulation)/launch/block_manipulation_old_kinect.launch" />

  <!-- Launch the server that calls all the actions. -->
  <node name="block_manipulation_action_demo" pkg="turtlebot_block_manipulation" type="block_manipulation_action_demo" output="screen">
    <param name="table_height" value="0.01" /> <!-- Height of the table (in m) relative to /arm_base_link -->
    <param name="block_size" value="0.03" /><!-- Side dimension of the blocks (in m) -->
    <param name="gripper_open" value="0.042" /><!-- Width (in m) to open the gripper to before grasping -->
    <param name="gripper_closed" value="0.024" /><!-- Width (in m) to close the gripper to while grasping -->
    <param name="z_up" value="0.12" /><!-- Height to raise the arm to (in m) relative to /arm_base_link -->

Using the Demo

If the parameters are set correctly, use the following commands to bring up rviz to interact with the markers.

roscd turtlebot_block_manipulation
rosrun rviz rviz -d demo/block_manipulation_rviz.vcg

Alternatively, you can add the Interactive Markers topic /block_controls/update to an existing instance of rviz.

Next, if the block detection algorithm detects any blocks, it will populate the interactive markers with gray blocks. Select the Interact tool from the tool menu in rviz to manipulate these. Now drag one to a new position and release to have the arm move it there. If there is no good IK solution, the arm will not move and the interactive markers will re-appear.



Wiki: turtlebot_block_manipulation/Tutorials/TurtleBotBlockManipulationDemo (last edited 2011-09-26 18:05:33 by HelenOleynikova)