Basic Tools & ROS Installation 

Installation of ROS on Ubuntu

After setting up the ubuntu operating system on your pc, following commands has to be run on your command prompt to upgrade and download the requirements on your ubuntu os for the ROS.

Updating Ubuntu

To update your operating system to the better version, the following command has to be run in the command prompt.

sudo apt-get update && sudo apt-get upgrade

Clock time setting

After dual booting the pc, you will encounter the problems with your time and date configurations. Run the following command to rectify and overcome the issue.

timedatectl set-local-rtc 1 –adjust-system-clock

Terminator

Now, the following commands have to be run to install the terminator on to the Ubuntu operating system. The terminator is used to open the multiple commands prompts to run the multiple nodes in the ROS programming.

sudo add-apt-repository ppa:gnome-terminator

sudo apt-get install terminator

Sublime Text

Now, the following commands will help you to download the ide to run your codes on the ROS ecosystem. These commands will install the Sublime Text IDE.

wget -qO – https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add –

echo “deb https://download.sublimetext.com/ apt/stable/” | sudo tee /etc/apt/sources.list.d/sublime-text.list

sudo apt-get update

sudo apt-get install sublime-text

subl

Linux Packages

Now, with the following command, you can install the most necessary Linux packages like compilers to run your future codes.

sudo apt-get install libavcodec-dev libsdl1.2-dev xsltproc libbullet-dev libsdl1.2-dev libgoogle-glog-dev protobuf-compiler python-wstool

Gazebo

You need to install the Gazebo7 package. This package will provide the simulation required in the ROS ecosystem.

To, install Gazebo in Ubuntu 16.04 execute the following command

sudo apt-get install gazebo7 libgazebo7-*

Arduino IDE

To install the Arduino IDE in the ubuntu run the following command

sudo ./install.sh

GIT

Now, the last step to install is the git by running the following command

sudo apt-get install git

ROS Installation Requirements

Now, the installation of the ROS packages has to be done along with the ROS Kinetic.

Run the following command in the command prompt to install the setup sources required for ROS

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

Now run the following command to add the key

sudo apt-key adv –keyserver ‘hkp://keyserver.ubuntu.com:80’ –recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

Now the following command has to be used to update the packages

sudo apt-get update

ROS Kinetic

Now, install the ROS Kinetic full version by running the below command

sudo apt-get install ros-kinetic-desktop-full

Now the ROS dependencies has to be enabled with the following set of commands

sudo rosdep init

rosdep update

The ROS environment has to be setup with the following commands

printf “source /opt/ros/kinetic/setup.bash” >> ~/.bashrc

source ~/.bashrc

Packages

Now, the following set of commands has to be run to install Python and other ROS packages

sudo apt-get install python-rosinstall

sudo apt install python-catkin-tools

sudo apt-get install ros-kinetic-tf-*

sudo apt-get install ros-kinetic-pcl-msgs ros-kinetic-mav-msgs ros-kinetic-mavros ros-kinetic-octomap-* ros-kinetic-geographic-msgs libgeographic-dev

Catkin

The final step of creating the Catkin Workspace

mkdir catkin_ws

cd catkin_ws

mkdir -p src

cd src

catkin_init_workspace

printf “source ~/catkin_ws/devel/setup.bash” >> ~/.bashrc

cd ~/catkin_ws

catkin_make

source ~/catkin_ws/devel/setup.bash

This completes the basic setup of the ROS packages and installations required to get started with the ROS Simulations.

Spread knowledge

3 thoughts on “Basic Tools & ROS Installation”

  1. i am getting an error when i am running this cmd:-

    Linux Packages

    Now, with the following command, you can install the most necessary Linux packages like compilers to run your future codes.

    sudo apt-get install libavcodec-dev libsdl1.2-dev xsltproc libbullet-dev libsdl1.2-dev libgoogle-glog-dev protobuf-compiler python-wstool

    the error is :-
    pradeep@pradeep-VivoBook-ASUSLaptop-X509FA-X509FA:~$ sudo apt-get install libavcodec-dev libsdl1.2-dev xsltproc libbullet-dev libsdl1.2-dev libgoogle-glog-dev protobuf-compiler python-wstool
    E: Could not get lock /var/lib/dpkg/lock-frontend – open (11: Resource temporarily unavailable)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

    can u pls help me out

    1. roboticelectronics

      Can I know are you running your ubuntu os on virtual machine or dual booted your pc. The error is completely related to your operating system but not ros. Let me know the answer

Leave a Comment

Your email address will not be published. Required fields are marked *