Getting Started with Robot Operating System

ROS?

 
ROS or Robot Operating System is a framework for writing Robot Software.
 
Why did I start with ROS?
 
ROS is a framework that has a long vision and industry pundits are putting a lot of money and backing into it. There is a lot of hidden agenda that ROS powers lots of IoT based projects that include robots or any form of Robotics in it.
 
Why ROS is useful?
 
Nowadays we find it very difficult to find a way to program robots in all sorts of manner. Our primary concern is cost reduction. To start with where do we go now..."OPEN SOURCE".
 
While I was planning my next project with my teammate Pooja Baraskar who always has a keen awareness to know new things and suggests some innovative solutions, she came up with an idea to dig in deep with Robotics with IoT. I went further and together we found that ROS is very helpful.
 
Reasons
  1. Ubuntu----"Open Source".
  2. C++ ---- "Fast Compilation".
  3. Easily extendable.
  4. Libraries such as Open CV and others.
Now here's a list of what the article will consist of:
  1. Creation Virtual Machine
    Ubuntu 14.04.3
  2. Install ROS
  3. Setup it
Creation of VM
 
I will start with VMWare Workstation to design my first VM:
 
 
Then choose the image Ubuntu 14.04.3.
 
 
I allocated 2GB of virtual ram.
 
 
Let's Start when OS is fired up.
 
Log in with your credentials.
 
Open Terminal and a browser
 
Go to http://wiki.ros.org/ROS/Installation
 
 
Generally from here on the installation becomes tricky because you will face a lot of errors. I will just guide you through.
 
I used the Singapore mirror as I found it easier from the other ones (those who failed)
  1. sudo sh -c '. /etc/lsb-release && echo "deb http://mirror-ap.packages.ros.org/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'  
Put this in the terminal, in the next step it will ask for your root password.
 
This helps in setting your sources list.
 
Now comes the scenario where we need to set up keys.
  1. sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116 
There can be errors.
 
GPG errors.
 
 
Redo the command once again and you will be good to go.
 
 
To check package indexing is complete.
 
sudo apt-get update
 
Here is a catch, generally I saw that there is an issue when you directly install the full desktop version. Now the best way would be:
  • Go to the ROS-Base that is Barebones
  • sudo apt-get install ros-jade-ros-base
  • And then the full desktop version.
  • sudo apt-get install ros-jade-desktop-full
 
 
The OpenCV package gets installed and you see why it is useful as we can use different camera options, integrating gestures into your robot and can start an interaction with sensors in it.
 
Now we need to get rid of the dependencies for ROS, so we need to use this command.
 
sudo rosdep init
 
 
It will automatically prompt you for the next command.
 
rosdep update
 
 
 
As you can see at the bottom you will find there are distros added such as Groovy, Hydro, Indigo, and Jade.
 
These are different versions of ROS Jade being the latest.
 
Getting your Environment right:
 
As Linux is for bash we need to setup that as we initiate a shell whenever we open it.
  1. echo "source /opt/ros/jade/setup.bash" >> ~/.bashrc  
  2.    
  3. source ~/.bashrc
 
This is a start to ROS which is the next big bet in IoT and with this glimpse I hope everybody will be able to start afresh. This article is dedicated to Pooja Barskar who is just like a livewire in IoT and it's because of her effort I was able to discover this wonderful Robot Operating System meant for IoT. Hope you will like it.
 
References
 
http://wiki.ros.org/