(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Installing Ubuntu with ROS + TIAGo Base

Description: This tutorial describes the steps needed to get a proper Ubuntu and ROS installation to have a system up and running for the PMB-2 tutorials.

Tutorial Level: BEGINNER

Next Tutorial: Robots/PMB-2/Tutorials/Installation/PMB2Simulation Robots/PMB-2/Tutorials/Installation/PMB2_tutorial_docker

Author: Sai Kishor Kothakota < sai.kishor@pal-robotics.com >

Maintainer: Jordi Pages < jordi.pages@pal-robotics.com >

Source: https://github.com/pal-robotics/pmb2_tutorials.git

  Show EOL distros: 

  • Not supported. Currently supported ROS LTS: indigo, kinetic.

Ubuntu installation

In order to run the public simulation of PMB-2 it is preferable to get a fresh installation of Ubuntu 14.04.5 LTS as follows

  • wget http://releases.ubuntu.com/14.04/ubuntu-14.04.5-desktop-amd64.iso

Use this ISO to install a fresh Ubuntu OS in your development computer. Afterwards, you can proceed installing ROS as explained in the next section.

Specific system dependencies installation

We need to install the libopencv-nonfree-dev library which will be used in the tutorials for educational purposes. Open a terminal an run the following instructions

  • sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
    sudo apt-get update
    sudo apt-get install libopencv-nonfree-dev

ROS installation

Set up ROS packages sources

In order to install the required ROS packages for running PMB-2's simulation first, as explained in ROS Indigo installation, it is required to include packages.ros.org in the debian sources:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

The set up the required keys to access the debian sources:

  • sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

In case of getting a gpg: keyserver timed out error try the following:

  • sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

ROS packages installation

install use the following instruction

  • sudo apt-get update
    sudo apt-get install git python-rosinstall ros-indigo-desktop-full python-catkin-tools ros-indigo-joint-state-controller ros-indigo-twist-mux ros-indigo-ompl ros-indigo-controller-manager ros-indigo-moveit-core ros-indigo-moveit-ros-perception ros-indigo-moveit-ros-move-group ros-indigo-moveit-kinematics ros-indigo-moveit-ros-planning-interface ros-indigo-moveit-simple-controller-manager ros-indigo-moveit-planners-ompl ros-indigo-joy ros-indigo-joy-teleop ros-indigo-teleop-tools ros-indigo-control-toolbox ros-indigo-sound-play ros-indigo-navigation ros-indigo-eband-local-planner ros-indigo-depthimage-to-laserscan  ros-indigo-openslam-gmapping ros-indigo-gmapping ros-indigo-moveit-commander ros-indigo-geometry-experimental

Append the following command to ~/.bashrc to allow any console to use the catkin commands

  • source /opt/ros/indigo/setup.bash

This is a temporary way to install the PMB-2 simulation. Soon it will be available through ROS Indigo binary packages. These instructions assume that you are comfortable with ROS and the catkin build system. Please familiarize yourself using the ROS and catkin tutorials.

For a source-based installation, first create an empty workspace:

  • mkdir ~/pmb2_public_ws
    cd ~/pmb2_public_ws

Download the rosinstall and copy it in ~/pmb2_public_ws. In order to clone the required repositories do as follows:

  • cd ~/pmb2_public_ws
    rosinstall src /opt/ros/indigo pmb2_public.rosinstall

Then run this command to make sure that all dependencies are installed.

  • sudo rosdep init
    rosdep update
    rosdep install --from-paths src --ignore-src --rosdistro indigo --skip-keys "pal_gazebo_plugins speed_limit sensor_to_cloud"

Finally you can build the workspace and source it:

  • catkin build
    source ./devel/setup.bash

and it is ready to go!

Ubuntu installation

In order to run the public simulation of PMB-2 it is preferable to get a fresh installation of Ubuntu 16.04.4 LTS as follows

  • wget http://releases.ubuntu.com/16.04/ubuntu-16.04.5-desktop-amd64.iso

Use this ISO to install a fresh Ubuntu OS in your development computer. Afterwards, you can proceed installing ROS as explained in the next section.

ROS installation

Set up ROS packages sources

In order to install the required ROS packages for running PMB-2's simulation first, as explained in ROS Kinetic installation, it is required to include packages.ros.org in the debian sources:

  • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

The set up the required keys to access the debian sources:

  • sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

In case of getting a gpg: keyserver timed out error try the following:

  • sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

ROS packages installation

install use the following instruction

  • sudo apt-get update
    sudo apt-get install git python-rosinstall ros-kinetic-desktop-full python-catkin-tools ros-kinetic-joint-state-controller ros-kinetic-twist-mux ros-kinetic-ompl ros-kinetic-controller-manager ros-kinetic-moveit-core ros-kinetic-moveit-ros-perception ros-kinetic-moveit-ros-move-group ros-kinetic-moveit-kinematics ros-kinetic-moveit-ros-planning-interface ros-kinetic-moveit-simple-controller-manager ros-kinetic-moveit-planners-ompl ros-kinetic-joy ros-kinetic-joy-teleop ros-kinetic-teleop-tools ros-kinetic-control-toolbox ros-kinetic-sound-play ros-kinetic-navigation ros-kinetic-eband-local-planner ros-kinetic-depthimage-to-laserscan  ros-kinetic-openslam-gmapping ros-kinetic-gmapping ros-kinetic-moveit-commander

Append the following command to ~/.bashrc to allow any console to use the catkin commands

  • source /opt/ros/kinetic/setup.bash

Source-based installation

Currently source-based installation is provided.

These instructions assume that you are comfortable with ROS and the catkin build system. Please familiarize yourself using the ROS and catkin tutorials.

First of all open a terminal and create an empty workspace:

  • mkdir ~/pmb2_public_ws
    cd ~/pmb2_public_ws

Download the pmb2_public.rosinstall and copy it in ~/pmb2_public_ws. Then run the following instruction in order to clone all the required repositories within the workspace:

  • cd ~/pmb2_public_ws
    rosinstall src /opt/ros/kinetic pmb2_public.rosinstall

Then run this command to make sure that all dependencies are installed.

  • sudo rosdep init
    rosdep update

Then you may run the following instruction to make sure that all dependencies referenced in the workspace are installed

  • rosdep install --from-paths src --ignore-src --rosdistro kinetic --skip-keys "pal_gazebo_plugins speed_limit_node sensor_to_cloud pmb2_rgbd_sensors pal_vo_server pal_karto pal_usb_utils pal_local_planner pal_filters hokuyo_node rrbot_launch robot_pose pal_pcl rviz_plugin_covariance pal-orbbec-openni2 slam_toolbox"

Then, you may proceed building the workspace:

  • source /opt/ros/kinetic/setup.bash
    catkin build

Once you compiled all packages and source the environment (source ~/pmb2_public_ws/devel/setup.bash) and it's all ready to go.

  • Not supported. Currently supported ROS LTS: indigo, kinetic.

  • Not supported. Currently supported ROS LTS: indigo, kinetic.

Ubuntu installation

In order to run the public simulation of PMB-2 it is preferable to get a fresh installation of Ubuntu 18.04.2 LTS as follows

  • wget http://releases.ubuntu.com/18.04/ubuntu-18.04.2-desktop-amd64.iso

Use this ISO to install a fresh Ubuntu OS in your development computer. Afterwards, you can proceed installing ROS as explained in the next section.

ROS installation

Set up ROS packages sources

In order to install the required ROS packages for running PMB-2's simulation first, as explained in ROS Melodic installation, it is required to include packages.ros.org in the debian sources:

  • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

The set up the required keys to access the debian sources:

  • sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

In case of getting a gpg: keyserver timed out error try the following:

  • sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

ROS packages installation

install use the following instruction

  • sudo apt-get update
    sudo apt-get install git python-rosinstall ros-melodic-desktop-full python-catkin-tools ros-melodic-joint-state-controller ros-melodic-twist-mux ros-melodic-ompl ros-melodic-controller-manager ros-melodic-joy ros-melodic-joy-teleop ros-melodic-teleop-tools ros-melodic-control-toolbox ros-melodic-sound-play ros-melodic-navigation ros-melodic-eband-local-planner ros-melodic-depthimage-to-laserscan  ros-melodic-openslam-gmapping ros-melodic-gmapping ros-melodic-moveit-commander

Append the following command to ~/.bashrc to allow any console to use the catkin commands

  • source /opt/ros/melodic/setup.bash

Source-based installation

Currently source-based installation is provided.

These instructions assume that you are comfortable with ROS and the catkin build system. Please familiarize yourself using the ROS and catkin tutorials.

First of all open a terminal and create an empty workspace:

  • mkdir ~/pmb2_public_ws
    cd ~/pmb2_public_ws

Then run the following instruction in order to download pmb2_public.rosinstall and to clone all the required repositories within the workspace:

  • wget https://raw.githubusercontent.com/pal-robotics/pmb2_tutorials/kinetic-devel/pmb2_public-melodic.rosinstall
    rosinstall src /opt/ros/melodic pmb2_public.rosinstall

Then run this command to make sure that all dependencies are installed.

  • sudo rosdep init
    rosdep update

Then you may run the following instruction to make sure that all dependencies referenced in the workspace are installed

  • rosdep install --from-paths src --ignore-src --rosdistro melodic --skip-keys "pal_gazebo_plugins speed_limit_node sensor_to_cloud pmb2_rgbd_sensors pal_vo_server pal_karto pal_usb_utils pal_local_planner pal_filters hokuyo_node rrbot_launch robot_pose pal_pcl rviz_plugin_covariance pal-orbbec-openni2 slam_toolbox"

Then, you may proceed building the workspace:

  • source /opt/ros/melodic/setup.bash
    catkin build -DCATKIN_ENABLE_TESTING=0 -j $(expr `nproc` / 2)

Once you compiled all packages and source the environment (source ~/pmb2_public_ws/devel/setup.bash) and it's all ready to go.

  • Not supported. Currently supported ROS LTS: kinetic, melodic.

Wiki: Robots/PMB-2/Tutorials/Installation/InstallUbuntuAndROS (last edited 2022-09-08 08:00:17 by thomaspeyrucain)