Skip to content

ROS_Environment

Junichi Tokuda edited this page Mar 21, 2019 · 16 revisions

Setting Up ROS Environment for Tutorial

Prerequisite

In this tutorial, we will use ROS Kinetic, which supports Wily (Ubuntu 15.10), Xenial (Ubuntu 16.04) and Jessie (Debian 8) for Debian. See Installation page for detail.

[Option 1] Installing ROS on Dedicated ROS Computer

Please follow Installation page.

Then we install additional packages, including ROS-Industrial, MoveIt!, Universal Robot, and libvtk6-dev. From the terminal,

$ sudo rosdep update -y
$ sudo apt-get update -y
$ sudo apt-get dist-upgrade -y
$ sudo apt-get install -y ros-kinetic-industrial-core
$ sudo apt-get install -y ros-kinetic-universal-robot
$ sudo apt-get install -y ros-kinetic-moveit
$ sudo apt-get install libvtk6-dev

[Option 2] Installing ROS using Docker

Docker must be installed prior to the installation. To install the Docker image for the tutorial, open the terminal and run the following command:

$ docker pull docker pull rosmed/docker-ros-igtl
$ docker run -it --rm -p 6080:80 -p 28944:18944 rosmed/docker-ros-igtl

In this example, the HTTP port (port 80) and the OpenIGTLink port (port 18944) on the docker container are mapped to ports 6080 and 28944 on the host computer respectively. The '--rm' option will remove the container upon termination.

To access the desktop, open a web browser (compatible with HTML5) on the same computer, and type the following address in the address bar:

http://localhost:6080

If the Docker image container is successfully running, the browser should show the desktop screen.

This docker image includes all the software required for the tutorial. Please skip the following two steps ("Building OpenIGTLink" and "Installing ROS-IGTL-Bridge").

Building OpenIGTLink

ROS-IGTL-Bridge depends on the OpenIGTLink library. We install the source files of the libary under ~/igtl/OpenIGTLink and build files under ~/igtl/OpenIGTLink-build

$ cd ~
$ mkdir igtl
$ cd igtl
$ git clone https://github.com/openigtlink/OpenIGTLink.git
$ mkdir OpenIGTLink-build
$ cd OpenIGTLink-build
$ cmake -DBUILD_SHARED_LIBS:BOOL=ON ../OpenIGTLink
$ make

Installing ROS-IGTL-Bridge

First, set up catkin working directory (if it has not been set up):

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash

Then obtain the code from the github repository:

$ cd ~/catkin_ws/src
$ git clone https://github.com/openigtlink/ROS-IGTL-Bridge

To build the ROS-IGTL-Bridge, run

$ cd ~/catkin_ws/
$ catkin_make --cmake-args -DOpenIGTLink_DIR:PATH=<your OpenIGTLink directory>/OpenIGTLink-build

Clone this wiki locally