Getting Started With ROS ( Robotic Operating System ).




Introduction: Getting Started With ROS ( Robotic Operating System ).

This tutorial is going to walk you through installing Ubuntu 10.10 and the Diamondback version of ROS. It assumes you are new to Ubuntu and ROS and is meant to be a dummies guide to installing and configuring a Multiple ROS Master System. Note there are newer versions of ROS available as well as Ubuntu which you can choose to install on your own.  

Step 1: What Is ROS ?

For those unfamiliar with ROS. It is a open source robotic operating system which provides standard operating system services such as hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management. It is based on a graph architecture where processing takes place in nodes that may receive, post and multiplex sensor, control, state, planning, actuator and other messages. In layman terms it connects hardware with software to allow for a advanced programming environment for controlling low-level hardware. Not to mention it also has powerful tools for running things in simulation along with 3d visualizations. 

Step 2: The Build ...

The list of components we are going to need are as follows:

1.   2 dual-core computers. 1.6ghz or higher with at least 2gb of ram is recommended. 
2.   A Turtlebot or Turtlebot compatible robot ( )
3.   Gyro power/board  - optional - ( )
3.   Wifi router
4.   And a 4gb usb flashdrive 

Step 3: Downloading Ubuntu and Universal USB Installer

There are many ways to install Ubuntu but I am only going to cover a full disk installation. Of coarse you can always install Ubuntu by partitioning the drive for multiple boot systems. But I would do some research on the subject before attempting it your first time, Youtube is a good place to start click -->>  HERE
*Warning* Understand if you are installing this on a computer with a operating system on it already, this is going to delete everything on your computer. So with that said lets begin by downloading the Ubuntu 10.10 iso. After you determine what type of bit system you have 32 or 64 bit computer. I suggest downloading these versions [ PC (Intel x86) desktop CD] , [ 64-bit PC (AMD64) desktop CD ].

32Bit --

64Bit --

Once you have the Ubuntu iso you will need to burn the image onto a usb flashdrive so that we can boot it from the computer. I suggest using Universal USB Installer for Windows.

The download file link is located near the bottom of their page. 

Step 4: Burning the Iso to USB

Once you have finished downloading. Run Universal USB Installer and select your Ubuntu 10.10 version within the program and the letter of the flashdrive to burn to. Make sure it is the correct drive letter, otherwise it will corrupt any other drive by writing on to it. Select the option to format the drive as Fat32 so we have no issues with any old data on the USB drive. Then click "create" to start burning the iso. Once the program has finished eject the usb. 

You can follow this Youtube tutorial if you are having trouble burinig the ISO.  Click -->> HERE

Step 5: Configure the Bios to Boot From USB

In order to run the Ubuntu Installer from USB we need to change the way the computer boots up. So we need to get into the Bios and change the settings to boot up from usb. Depending on your computer model you may or may not be able boot from usb. Unfortunately due to the many different ways manufacturers allow access into the BIOS on different  models and types of computers out there. I wont be able to cover this extensively. I suggest Googling how to get into the Bios on your type of computer and then select the usb drive to boot from. Once you have your machine configured to boot from usb, insert the usb with the burned iso and reboot your machine. 

Step 6: Installing Ubuntu on Both Computers

Now that your computer has booted from the usb you should see the Ubuntu install screen. In this guide we are going to dedicate the whole disk space for Ubuntu. So when you are prompted click " Erase and use the entire disk" otherwise this is the time to set the installation for a multiple boot configuration. Besides that, the Ubuntu install should be fairly straight forward. Once your Ubuntu installation is complete go ahead and do the same steps for the second computer.

I keep my user name and password short as typing in the password happens a lot for various tasks. I ended up using the same password on both computers, but this is totally up to you. Also its a good idea to name each computer separately such as Robot/Workspace, Turtlebot/Desktop, or Computer1/Computer2 etc ... so you can distinguish between the two, and make things easier later when networking.

Step 7: Getting Familiar With Ubuntu

Now that Ubuntu has been successfully installled on both computers this a good time to get familiar with the Operating System. Here is a good link to get you started ...

You are also going to need to have a good understanding of the terminal and its common commands in order to better utilize Ubuntu and ROS. 

Step 8: Installing ROS Diamondback

As ROS matures installation is becoming easier. Although we are installing a older version of ROS that is slightly more complicated. This may help you understand the installation process and make things easier for future installations.

This portion of the tutorial is taken from the ROS wiki. So you can reference that page or continue following this tutorial, which will try to walk you through the installation step by step and setup a ROS network.


ROS Network Setup -

Step 9: Configure Your Ubuntu Repositories

Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." 

Open Ubuntu software center and in the upper portion of the window you click edit, then click Software Sources.  Now make sure the boxes labeled universe, restricted and multiverse are checked then close out the window. 

Step 10: Installation Via Terminal

   Open the terminal and copy and paste this into the terminal 

sudo sh -c 'echo "deb maverick main" > /etc/apt/sources.list.d/ros-latest.list'

   Then copy and paste into terminal 

wget -O - | sudo apt-key add -

   Then copy and paste into terminal

sudo apt-get update

 Now we are going to install the full version of diamondback which is the most robust 

   Copy and paste into terminal

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

   This portion of the install may take some time so don't worry let it finish. After its complete 
   copy and paste into terminal

echo "source /opt/ros/diamondback/setup.bash" >> ~/.bashrc
. ~/.bashrc

   And lastly copy and paste into terminal 

 sudo apt-get install ros-diamondback-turtlebot-robot

Now you should have Ros installed on your system along with the turtlebot stacks. To verify you can browse the stacks folder at:


Step 11: Configuring the ROS Network

Now copy and paste in the terminal

sudo apt-get install chrony

And copy and paste into terminal

sudo ntpdate

We are also going to setup openssh. Helpful if in the future you want to utilize the terminal of one computer from another.

Copy and paste into terminal

sudo apt-get install openssh-server

These next steps are from the ROS wiki as well and have been simplified. So if you have any issues please refer to that page for help and a complete guide. Also this is a nice tutorial I found on the subject.

ROS/Network wiki -

Tutorial -

Now lets get started. First thing we need to to is connect both computers to the wifi router and then find out their IP addresses. Left click your wifi icon on your status bar located near the top of the screen. Then right click Connection Information , you should see window labeled Connection Information

The number you are looking for is IP Address. Write these numbers down for both machines.

Next is to edit a file that recognizes computers connected to a network. Copy and paste this into terminal of the first computer

sudo gedit /etc/hosts

You should be prompted to input your password. After passing the security check. The text editor window will show and you need to copy and paste the IP and computer name of computer2 ( example-- computer2 ) into the file and save it. And do the same thing to computer2 by imputing computer1's IP and name ( example-- computer1 ).

You can verify that things were successful by pinging both computer form each other. Copy and paste into computer1

ping (input computer2's name here)

And the same for computer2. Copy and paste

ping (input computer1's name here)

If things are going well you should see something like

PING computer1 ( 56 data bytes
64 bytes from icmp_seq=0 ttl=63 time=1.868 ms
64 bytes from icmp_seq=1 ttl=63 time=2.677 ms
64 bytes from icmp_seq=2 ttl=63 time=1.659 ms

If something is wrong I suggest checking you IP addresses again and make sure you are still connected to your wifi network.

The next step is going to be exporting the Host names into bash files of both machines so that ROS masters can recognize each other.

** NOTE that in my configuration my computer1-Turtlebot (ROBOT) - is the Master and computer2-Workstation(desktop) - is the Host.**

So in terminal of the computer1 copy and paste

gedit ~/.bashrc

Once again the text editor will appear and you will copy and paste this near the bottom of the file. But input the IP of your Robot in place of the one I have listed below for both MASTER and HOSTNAME.


Now on computer2 the steps are similar but in place of the HOSTNAME's IP you are going to use the IP of computer2 and MASTER IP is going to be the Robots IP. Copy and paste


So basically on the MASTER computer's bash file use its own IP for both lines. And on the Host machine you also input the MASTERS IP on the first line but on the second line input the Host machine's IP.


Step 12: Testing Our ROS Network

Now that we have configured the ROS network we are finished with the installation and configuration of our Ubuntu/ROS system. All thats left is to test our system. So for this I am going to start some necessary nodes for our turtlebot robot on computer1 and use computer2 to run a teleop node to control turtlebot over the wifi network.


Make sure that your turtlebot serial cable is plugged in to your create and computer, and the create is charged and powered on. Also if you are having trouble with the connection. Verify that your create is plugged into the corresponding port that is set in the located at [ /opt/ros/diamondback/stacks/turtlebot/turtlebot_node/nodes/ ] . You can check the port by going into the file location [ /dev] and looking for the port to disappear when you unplug the cable from the computer. And if the port set to the create is different than that in the file go ahead and edit it by using CHMOD
   Copy and paste

Sudo chmod 777 /opt/ros/diamondback/stacks/turtlebot/turtlebot_node/nodes/

Then right click the file and click open then click the option "display".  Now go ahead and change the file on line 78 so that it matches your corresponding port. 


   Lets launch ROS and turtlebot nodes on the turtlebot (computer1)
   Copy and paste in terminal


   Then copy and paste in terminal

roslaunch turtlebot_bringup minimal.launch

   Now we launch ROS on the desktop (computer2)
   Copy and paste in terminal


   Then we launch the teleop node
   Copy and paste in terminal

roslaunch turtlebot_teleop keyboard_teleop.launch

Now you should be able to use the arrow keys to control your robot from the second computer.

Step 13: Conclusion

 I hope that this tutorial has helped you in configuring your Ubuntu/ROS System. This is hopefully the first of many tutorials on Robotics and ROS. Please post any positive/negative comments about this tutorial so I may resolve anyone's related issues. Thanks and Welcome to the ROS community ...

Useful links  

Zagros --
ROS site --
ROS Users --
ROS Answers --

Be the First to Share


    • Eggs Challenge

      Eggs Challenge
    • Remote Control Contest

      Remote Control Contest
    • Sculpt & Carve Challenge

      Sculpt & Carve Challenge



    7 years ago on Step 11


    Your setting of ROS_HOSTNAME is wrong : it should be either a machine network name or its IP.

    Using your example produces the error message "invalid ROS_HOSTNAME (protocol should not be included)" when starting roscore.

    ROS official documentation on this point :

    Best regards



    8 years ago on Introduction

    Great tutorial, it only costs about $5000 to complete...

    There needs to be an arduino level 'robot operating system' or a 'robot simulator'.