2.1. ROS Installation

2.1.1. Installation Instruction

  • This Document assumes that the reader has installed Ubuntu 18.04 . However, if you haven’t installed Ubuntu 18.04 yet make sure to install it before proceeding. There are tons of resources available on the Internet to get this done.
  • You can download Ubuntu 18.04 ISO file from here.

2.1.2. ROS Melodic Installation

ROS (Robot Operating System) provides libraries and tools to help software developers create robot applications. It provides hardware abstraction, device drivers, libraries, visualizers, message-passing, package management, and more. ROS is licensed under an open source, BSD license.

Here the distribution compatible with Ubuntu 18.04 is the ROS Melodic Morenia. Follow the steps below to install ROS Melodic.

2.1.3. Installation Steps

  1. Setup your computer to accept software from packages.ros.org.

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

    sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
    
  3. Make sure your Debian package index is up-to-date.

    sudo apt update
    
  4. Installing the ROS recommended configuration.

    sudo apt install ros-melodic-desktop-full
    

2.1.4. Configuration Steps

  1. Adding environment variables: To Automatically add ROS environment variables to your bash session every time a new shell (terminal) is launched, enter the following commands (this step is similar as adding environmental variable in windows):

    echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
  2. Initialize rosdep: Before you can use many ROS tools, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.

    sudo apt install python-rosdep
    sudo rosdep init
    rosdep update
    

2.1.5. Additional packages to install

  • Catkin Tools

    sudo apt-get install ros-melodic-catkin python-catkin-tools
    
  • std_msg package

    sudo apt install ros-melodic-std-msgs