Robot Operating System (ROS) Installation


ROS Distribution Consideration

Top Left: Tiago, Top Right: Hector Quadcopter, Bottom Left: UR5 Robot Arm, Bottom Right: Turtlebot
Ubuntu 16.04 18.04 20.04
ROS Kinetic Melodic Noetic
Most of the simulation packages, such as hector quadrotor, ur, etc. are supported by Kinetic ROS only. So here I choose ubuntu 16.04. Don't choose install the latest version since not a lot of packages are updated.

Steps

  1. Setup your sources.list
    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  2. Setup your keys
    sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
  3. Installation
    sudo apt-get update
    then Desktop-Full Install
    sudo apt-get install ros-kineti-desktop-full
  4. Install any individual package
    sudo apt-get install ros-{version}-{package}
  5. Install any individual package
    sudo apt-get install ros-{version}-{package}
  6. Initialize rosdep
    sudo rosdep init
    Then
    rosdep update
  7. Environment setup
    source /opt/ros/kinetic/setup.bash
    Then
    echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
  8. Dependencies for building packages of python
    sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
    sudo apt-get install ros-kinetic-joy
    sudo apt-get install ros-kinetic-control-toolbox
    sudo apt-get install ros-kinetic-robot-controllers
    sudo apt-get install ros-kinetic-gazebo-ros
    sudo apt-get install ros-kinetic-gazebo-plugins 
    sudo apt-get install ros-kinetic-rgbd-launch
    
    Then reboot.

Test setup

  1. roscore
  2. rostopic list Show the ros topic
  3. roscd It will take you to /opt/ros/kinetic directory

References


  1. Gazebo ROS packages
  2. Ubuntu install of ROS Kinetic