Installing ROS Hydro on Ubuntu
Prerequisites:
- Ubuntu 12.04 installed as a dual-boot system or in a virtual machine
- Wired internet connection
Adding additional software sources
First, we have to tell Ubuntu to look for software in a few additional places.
- Open the Ubuntu Software Center
- Open the Edit menu
- From the Edit menu select Software Sources
- You will have to enter your password to change settings in this window.
- You should see the a window similar to the one shown below
- Make sure the checkboxes next to the following are checked:
- Community-maintained Open Source software - (universe)
- Proprietary drivers for devices (restricted)
- Software restricted by copyright or legal issues (multiverse)
- Your Software Sources window should look like the one below
- Select Close to save your changes. A dialog box may appear, asking whether you'd like to update the list of repositories. Select "Reload" to update the list.
- You have successfully added additional software resources to your Ubuntu installation!
Adding ROS as a software source
These steps tell Ubuntu where to download and install ROS from.
- First we have to open a Terminal window. You can do this with the keyboard shortcut Ctrl + Alt + T
- For much more information about the Terminal, you can refer to the Ubuntu help page for Using the Terminal
- You should see a window similar to the one below
- Copy and Paste the following into the terminal. You will probably have to use
Shift + Insert to paste into the terminal. As you type your password nothing will show up.
This is normal, simply hit enter after you have typed it.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' |
- Leave the terminal open after this command has completed running, we will be using it in the following steps.
Allowing ROS to install software
Now, we have to tell Ubuntu to allow software from ROS to be installed.
- Copy and Paste the following into the terminal. You will probably have to use
Shift + Insert to paste into the terminal. As you type your password nothing will show up.
This is normal, simply hit enter after you have typed it.
wget http://packages.ros.org/ros.key -O - | sudo apt-key add - |
- Leave the terminal open after this command has completed running, we will be using it in the following steps.
Installing ROS
This part of the guide actually downloads and installs ROS onto Ubuntu.
- Copy and Paste the following into the terminal. You will probably have to use
Shift + Insert to paste into the terminal. As you type your password nothing will show up. This is normal, simply hit enter after you have typed it.
- This command will update Ubuntu, it may take a long time to run.
- Once it has finished running, Copy and Paste the following into the terminal. You will probably have to use Shift + Insert to paste into the terminal. This step downloads and installs the full ROS software suite. It may take some time for it to complete.
sudo apt-get install ros-hydro-desktop-full |
- Once that has finished running, Copy and Paste the following into the terminal. You will probably have to use Shift + Insert to paste into the terminal.
- Once this has finished running, Copy and Paste the following into the terminal. You will probably have to use Shift + Insert to paste into the terminal
- After it has finished running, Copy and Paste the following into the terminal. You will probably have to use Shift + Insert to paste into the terminal. This step makes sure that ROS will be set up everytime you start a new Terminal.
echo "source /opt/ros/hydro/setup.bash" >> ~/.bashrc |
- After it has finished running, Copy and Paste the following into the terminal. You will probably have to use Shift + Insert to paste into the terminal. This step makes sure that ROS is set up in the current Terminal that you have open.
- After it has finished running, Copy and Paste the following into the terminal. You will probably have to use Shift + Insert to paste into the terminal. This step downloads and installs the ROS installer, it will enable you to install additional ROS tools.
sudo apt-get install python-rosinstall |
- After this command finishes running you may close the Terminal.
Congratulations, You have successfully installed ROS in Ubuntu!