Edit on GitHub

[ROS 1] Manipulation

NOTE:

  • This instructions were tested on Ubuntu 16.04 and ROS Kinetic Kame.
  • If you want more specfic information about OpenMANIPULATOR, please refer to the OpenMANIPULATOR e-Manual.

The contents in e-Manual can be updated without a previous notice. Therefore, some video may differ from the contents in e-Manual.

TIP:

  • We are happy to announce a new ROS book: “ROS Robot Programming, A Handbook is written by TurtleBot3 Developers”. This book has been published in Korean, English, Chinese and Japanese. It contains the following:
    • ROS Kinetic Kame: Basic concept, instructions and tools
    • How to use sensor and actuator packages on ROS
    • Embedded board for ROS: OpenCR
    • SLAM & Navigation with TurtleBot3
    • How to program a delivery robot using ROS Java
    • OpenMANIPULATOR simulation using MoveIt! and Gazebo
  • Please refer to this book for more information on ROS, SLAM, and Navigation that are not covered in this e-manual. You can download the pdf of this book.

TIP: The terminal application can be found with the Ubuntu search icon on the top left corner of the screen. The shortcut key for running the terminal is Ctrl-Alt-T.

TurtleBot3 with OpenMANIPULATOR

The OpenMANIPULATOR by ROBOTIS is one of the manipulators that support ROS, and has the advantage of being able to easily manufacture at a low cost by using DYNAMIXEL actuators with 3D printed parts.

The OpenMANIPULATOR has the advantage of being compatible with TurtleBot3 Waffle and Waffle Pi. Through this compatibility can compensate for the lack of freedom and can have greater completeness as a service robot with the the SLAM and Navigation capabilities that the TurtleBot3 has. TurtleBot3 and OpenMANIPULATOR can be used as a mobile manipulator and can do things like the following videos.

The contents in e-Manual can be updated without a previous notice. Therefore, some video may differ from the contents in e-Manual.

Software Setup

NOTE: Before you install open_manipulator_with_tb3 packages, please make sure turtlebot3 and open_manipulator packages have been installed previously in RemotePC and setup Raspberry Pi 3.

  1. [RemotePC] Download and build the package using the following commands in order to use assembled OpenMANIPULATOR-X.
    $ cd ~/catkin_ws/src/
    $ git clone https://github.com/ROBOTIS-GIT/turtlebot3_manipulation.git
    $ git clone https://github.com/ROBOTIS-GIT/turtlebot3_manipulation_simulations.git
    $ cd ~/catkin_ws && catkin_make
    

Hardware Setup

OpenCR Setup

NOTE: To use OpenMANIPULATOR-X, you need to upload a firmware into OpenCR by using either shell script or Arduino IDE.

  1. Shell script is highly recommended to upload the firmware as it uses a pre-built binary file
  2. Arduino IDE, which builds the provided source code and uploads the generated binary file, can be used to modify TurtleBot3’s fimrware.

WARNING : Be sure to connect all DYNAMIXEL’s with OpenCR before OpenCR Setup. Otherwise, it may cause unexpected errors for Raspberry Pi.

After OpenMANIPULATOR is properly mounted on TurtleBot3, you need to update firmware inside the board to control all DYNAMIXEL’s using OpenCR board. Follow the provided instructions.

  1. [TurtleBot3 SBC] Upload a firmware into Raspberry Pi (SBC) with the following commands.
    $ export OPENCR_PORT=/dev/ttyACM0
    $ export OPENCR_MODEL=om_with_tb3
    $ rm -rf ./opencr_update.tar.bz2
    $ wget https://github.com/ROBOTIS-GIT/OpenCR-Binaries/raw/master/turtlebot3/ROS1/latest/opencr_update.tar.bz2 
    $ tar -xvf opencr_update.tar.bz2 
    $ cd ./opencr_update && ./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr && cd ..
    
  2. When the firmware is completely uploaded, you will see a text string at the terminal: jump_to_fw

WARNING: When the firmware is completely uploaded, OpenCR board will reboot, and the pose of OpenMANIPULATOR-X changes its pose to the initial pose. Thus, to avoid possible pysical damage by the robot, be sure to make the same pose of the robot as the one in the image before uploading the firmware to OpenCR.

Arduino IDE

Maintenance for Arduino IDE firmware upload is in progress.

Bringup

NOTE: Be sure that OpenCR port is properly assigned on PC. See turtlebot3_core.launch.

Run roscore

[Remote PC] Run roscore to use ROS 1.

$ roscore

Define TurtleBot3 Model

[TurtleBot3 SBC] Export TurtleBot3 model (Waffle PI) to .bashrc file using the following command.

$ export TURTLEBOT3_MODEL=waffle_pi

NOTE: TurtleBot3 Model may differ from the hardware configuration of TurtleBot3 such as burger or waffle.

Run Bringup

[TurtleBot3 SBC] Run Bringup node for TurtleBot3, and start rosserial and LDS sensor using following command.

$ roslaunch turtlebot3_bringup turtlebot3_robot.launch

Simulation

Simulate TurtleBot3 with OpenMANIPULATOR Using Gazebo by following this section.

Run Gazebo

[Remote PC] Bring TurtleBot3 with OpenMANIPULATOR into Gazebo world using the following command.

$ roslaunch turtlebot3_manipulation_gazebo turtlebot3_manipulation_gazebo.launch

Run move_group Node

[Remote PC] In order to use Moveit feature, launch move_group node. If you press [▶] button in Gazebo to start simulation, use the following command. Later, the following message will be printed: You can start planning now!.

$ roslaunch turtlebot3_manipulation_moveit_config move_group.launch

Run RViz

[Remote PC] Use Moveit feature in RViz by reading moveit.rviz file where Moveit enviroment data is configured. You can control the mounted manipulator using Interactive Marker, and simulate the motion of goal position, which feature can prevent a pysical crash by simulating the movement in advance.

$ roslaunch turtlebot3_manipulation_moveit_config moveit_rviz.launch

Run ROBOTIS GUI Controller

[Remote PC] You can use ROBOTIS GUI, but not RViz, to control robot arm with Gazebo. The GUI supports Task Space Control and Joint Space Control. Use one of ways according to your preference.

$ roslaunch turtlebot3_manipulation_gui turtlebot3_manipulation_gui.launch

Operate the Actual OpenMANIPULATOR

Follow the given instruction to operate your robot.

Run roscore

[Remote PC] Run roscore to use ROS 1.

$ roscore

Run Bringup

  1. [TurtleBot3 SBC] Run Bringup node for TurtleBot3, and start rosserial and LDS sensor using following command.
    $ roslaunch turtlebot3_bringup turtlebot3_robot.launch
    
  2. [Remote PC] Run Bringup node for OpenMANIPULATOR on TurtleBot3
    $ roslaunch turtlebot3_manipulation_bringup turtlebot3_manipulation_bringup.launch
    

Run move_group Node

$ roslaunch turtlebot3_manipulation_moveit_config move_group.launch

Run RViz

[Remote PC] Run Rviz to visualize data and to use the interactive marker.

$ roslaunch turtlebot3_manipulation_moveit_config moveit_rviz.launch

Run ROBOTIS GUI Controller

[Remote PC] OpenMANIPULATOR can be controlled with using ROBOTIS GUI controller instead of RVIz tool.

$ roslaunch turtlebot3_manipulation_gui turtlebot3_manipulation_gui.launch

SLAM

Use SLAM feature to update an unknown map with TurtleBot3 and OpenMANIPULATOR

;

Run roscore

[Remote PC] Run roscore to use ROS 1.

$ roscore

Run Bringup

[TurtleBot3 SBC] Run Bringup node for TurtleBot3, and start rosserial and LDS sensor using following command.

roslaunch turtlebot3_bringup turtlebot3_robot.launch

NOTE: As OpenMANIPULATOR on TurtleBot3 is not neccessory for SLAM, move_group and bringup nodes, which are the parameters to control OpenMANIPULATOR, are not important to use

Run SLAM Node

[Remote PC] Run SLAM node for updating an unknown map with TurtleBot3. This node utilizes gmapping package.

$ roslaunch turtlebot3_manipulation_slam slam.launch

Run turtlebot3_teleop_key Node

  1. [Remote PC] Update the map where TurtleBot3 will navigate using turtlebot3_teleop_key node.
    $ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
    
  2. [Remote PC] Once the map is completely updated, run the map_saver node to save the updated map.
    $ rosrun map_server map_saver -f ~/map
    

Send TurtleBot3 with OpenMANIPULATOR to the desired position in the map using Navigation node.

Run roscore

[Remote PC] Run roscore to use ROS 1.

$ roscore

Run Bringup

[TurtleBot3 SBC] Run Bringup node for TurtleBot3, and start rosserial and LDS sensor using following command.

$ roslaunch turtlebot3_bringup turtlebot3_robot.launch

Run Navigation Node

[Remote PC] Run Navigation node with the following command, which will call Unified Robot Description Format (urdf) and configuration data of RViz to set GUI enviroment, parmeters for Navigation and updated map.

$ roslaunch turtlebot3_manipulation_navigation navigation.launch

How to Control OpenMANIPULATOR with Navigation

You can run this node to control OpenMANIPULATOR on TurtleBot3 when TurtleBot3 is approaching to a goal position when Navigation node is running. However, when TurtleBot3 is in motion, the movement of OpenMANIPULATOR will be unstable by external influences, such as center of gravity, or vibration; so that it is recommended for the manipulator to be used when TurtleBot3 is not driving.

Run Bringup node for OpenMANIPULATOR

[Remote PC] Run turtlebot3_manipulation_bringup node just as use of single OpenMANIPULATOR. This node contains arm_controller and gripper_controller.

$ roslaunch turtlebot3_manipulation_bringup turtlebot3_manipulation_bringup.launch

Run move_group Node

move_group node supports two interfaces to control OpenMANIPULATOR; Moveit! and ROBOTIS GUI. Choose either of them according to your preference. In this section, GUI Controller is introduced only.

$ roslaunch turtlebot3_manipulation_moveit_config move_group.launch

NOTE: For more information on Moveit!, see Moveit!.

Run GUI Controller

Using this interface, you can control OpenMANIPULATOR on TurtleBot3 [Remote PC]

$ roslaunch turtlebot3_manipulation_gui turtlebot3_manipulation_gui.launch