Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
21 views9 pages

How To Install ROS

This document provides a step-by-step tutorial on how to install the Robot Operating System (ROS) Kinetic Kame on a Linux-based OS, specifically Ubuntu 16.04, using VirtualBox. It includes detailed instructions for setting up VirtualBox, installing Ubuntu, installing ROS, and configuring the Arduino IDE to work with ROS. Additionally, it covers troubleshooting common issues related to resolution in VirtualBox and how to set up a ROS workspace.

Uploaded by

Othniel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views9 pages

How To Install ROS

This document provides a step-by-step tutorial on how to install the Robot Operating System (ROS) Kinetic Kame on a Linux-based OS, specifically Ubuntu 16.04, using VirtualBox. It includes detailed instructions for setting up VirtualBox, installing Ubuntu, installing ROS, and configuring the Arduino IDE to work with ROS. Additionally, it covers troubleshooting common issues related to resolution in VirtualBox and how to set up a ROS workspace.

Uploaded by

Othniel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

instructables

How to Install ROS

by Robottronic

In this tutorial you'll learn how to install ROS.

Robot Operating System (ROS) is open-source robotics middleware and you'll be using it to control your Arduino. If
you are interested in learning more visit: http://wiki.ros.org/ROS/Introduction

Supplies:

1. Linux based OS - Ubuntu 16.04 (Xenial) installed as main OS or on VirtualBox


2. VirtualBox (any version)
3. ROS Kinetic Kame
4. Arduino IDE

Step 1: Install VirtualBox

1. Go to www.virtualbox.org and download the newest version of VirtualBox for OS you're using

2. Install VirtualBox

3. Download Ubuntu 16.04 (Xenial) as ISO le - https://releases.ubuntu.com/16.04/

Re co m m e nde d PC Re quire m e nt :

2GHz dual core processor or better


2GB system memory
How to Install ROS: Page 1
25GB of free hard drive space

4 . Run VirtualBox and create a new VM (Virtual Machine)

5. Name the Guest OS - Ubuntu (version) > click Next [Im a g e 1 ]

6 . Allocate RAM for Guest OS - preferable half the size of RAM you have on your PC (e.g. for 16GB of RAM you will
set 8,192 MB) > click Next [Im a g e 2 ]

7. Create a Virtual Hard Disk [Im a g e 3 ]

8 . Select VDI > click Next [Im a g e 4 ]

9 . Con gurating the Type of VD (Virtual Disk) > Select a Fixed size storage > click Next [ Im a g e 5 ]

10 . As said it is recommended minimum 25GB of free space (I recommend at least 30GB just to be sure that you'll
have enough space for all the programs you'll be using) > click Next [Im a g e 6 ]

11. Create the Virtual Machine

How to Install ROS: Page 2


Step 2: Configurating the VirtualMachine

How to Install ROS: Page 3


1. Go to Settings [Im a g e 1 ] 6 . Con gure the System settings > navigate to the
System option on the left
2. Navigate to the Storage options on the left
7. Set Processor(s) in Processor tab to half of the
3. Select Controller:IDE and insert downloaded existing ones > click OK [Im a g e 4 ]
Ubuntu image (ISO) > click OK [Im a g e 2 ]
O PT IO NAL: Con gure the Shared Folder > navigate
4 . Con gure the video con guration > navigate to to the Shared Folder option on the left > click Add
the Display option on the left Folder on the right side of the window > select Folder
you want to use > click OK [Im a g e 5 ]
5. Set Video Memory in screen tab on maximum >
click OK [Im a g e 3 ] 8 . You're now ready to launch your VirtualMachine!

How to Install ROS: Page 4


Step 3: Booting and Installing Ubuntu on VirtualBox

1. When the VirtualMachine boots up, you'll get a window which asks you to Try Ubuntu or Install Ubuntu

2. Select Install Ubuntu

3. After selecting Ins t a ll Ubunt u you'll get the next window which asks you to Download updates while installing
Ubuntu or to Install third-party software. Considering you're using Virt ua lB ox , you can ig no re t ha t or select
rs t o pt io n > click Continue

4 . Selecting the installation type > The rst option, Era se d isk a n d in st a ll Ub un t u , is ok because you installed
Ubuntu on VirtualBox > click Continue

5. Set the time zone

6 . Set the keyboard layout

7. Set the login information (Your name, Username, Password etc.)

8 . Ubuntu will now install

9 . After rebooting, you'll be ready to use it!

GO O D T O KNO W :
Sometimes there is a common problem with Ubuntu and VirtualBox resolution. Here is instruction how to x that:

Open Terminal > Type:

sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11

How to Install ROS: Page 5


If that doesn't x the problem try this:

VirtualBox tab bar > Devices > Insert Guest Additions CD image... [Im a g e 1 ]

Inside the window holding your virtual machine you can go to one of the menu options and select to install guest
additions. It will mount a CD in the virtual machine where you will be able to run the installation scripts from. Once
the installation is done and Ubuntu is restarted, Ubuntu will be able to detect your host OS' screen resolution and
adjust automatically.

Step 4: Install ROS Kinetic Kame

As discussed, ROS is not an operating system, but it needs a host operating system to work. Ubuntu Linux is the
most preferred OS for installing ROS.

1. Go to http://wiki.ros.org/ROS/Installation

2. Select the ROS Kinetic Kame

3. Select your Platform (Ubuntu)

4 . You'll be transferred to http://wiki.ros.org/kinetic/Installation/Ubuntu

5. All you need to do is to open a Terminal and follow installation steps on the site

O R YO U C AN FO LLO W INS T RUC T IO N FRO M HERE:

1. Open Terminal

2. Setup your computer to accept software from packages.ros.org:

sudo sh -c 'echo "deb <a href="http://packages.ros.org/ros/ubuntu" rel="nofollow"> http://packages.ros.org/ros/ubuntu </a> $(lsb_release -sc) main" > /etc/apt/sources.list
.d/ros-latest.list'

3. Set up your keys:

How to Install ROS: Page 6


sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

4 . Make sure your Debian package index is up-to-date:

sudo apt-get update

5. Desktop-Full Install:

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

6 . Environment setup:

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

7. To install tools and other dependencies for building ROS packages, run:

sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential

8 . Before you can use many ROS tools, you will need to initialize rosdep:

sudo apt install python-rosdep

sudo rosdep init

rosdep update

Step 5: Install Arduino IDE

1. Download the latest Arduino software on your Ubuntu > https://www.arduino.cc/en/Main/Software

2. I would recommend downloading Linux 32bit s because 64bits can sometimes cause trouble installing on
VirtualBox Ubuntu

3. The le is compressed and you have to extract it in a suitable folder, remembering that it will be executed from
there. (Preferable extract it in your Download folder)

4 . Open the arduino-1.x.x folder just created by the extraction process and spot the install.sh le > right click on it
and choose Run in Terminal from the contextual menu.

5. The installation process will quickly end and you should nd a new icon on your desktop

6 . If you don’t nd the option to run the script from the contextual menu, you have to open a Terminal window
and move into the arduino-1.x.x folder

ls

cd Downloads

How to Install ROS: Page 7


cd arduino-1.x.x // x.x. is your version of Arduino

7. Type the command

./install.sh

8 . Wait for the process to nish.

9 . You should nd a new icon on your desktop

Step 6: Including ROS Library

1. You must rst create a ROS workspace folder (Normally, this is in the Ubuntu home folder)

mkdir -p ~/catkin_ws/src

2. Now switch to /src folder

cd catkin_ws/src

3. Initialize a new ROS workspace

catkin_init_workspace

4 . After initializing catkin workspace, you can build the workspace, switch from /src folder to catkin_ws folder

~/catkin_ws/src cd ..

5. Build the space

~/catkin_ws catkin_make

6 . Now you can see a few folders in addition to the src les in your catkin_ws folder (src folder is where our
packages are kept)

7. At a Terminal, switch to the home folder and select .bashrc le

cd ~

gedit .bashrc

8 . Add the folowing line at the end of .bashrc le (after the last line "source /opt/ros/kinetic/setup.bash")

<strong>source ~/catkin_ws/devel/setup.bash</strong>

9 . We source this le in Terminal (copy this same line and paste it in a Terminal)

How to Install ROS: Page 8


10 . Now when we use any terminal, we can access the package inside this workspace

11. After building the target executable locally, run the following command to install the executable:

catkin_make install

12. You can install rosserial for Arduino by running:

sudo apt-get install ros-kinetic-rosserial-arduino

sudo apt-get install ros-kinetic-rosserial<br>

13. In the steps below, is the directory where the Linux Arduino environment saves your sketches. Typically this is a
directory called sketchbook or Arduino in your home directory. e.g cd ~/Arduino/libraries

cd /libraries

rm -rf ros_lib

rosrun rosserial_arduino make_libraries.py .

14 . After restarting your IDE, you should see ros_lib listed under examples

How to Install ROS: Page 9

You might also like