-
Configure the Ubuntu repositories. There are four repositories in Ubuntu: Main, Universe, Restricted and Multiverse. To install ROS we should enable access to the entire repositories.
-
Set up your source.list. It adds the ROS repository informatino where the binaries are stored. Just execute the following commands in a terminal:
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
-
Add the keys. The following is the command to add the keys:
$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
-
Update the Ubuntu package list.
$ sudo apt-get update
-
Install ROS Kinetic packages.
$ sudo apt-get install ros-kinetic-desktop-full
-
Initialize rosdep. It is used for installing the dependent packages of a ROS package.
$ sudo rosdep init
$ rosdep update
-
Set the ROS environment. To access the ROS packages and command-line tools we have to set up the ROS environment. The following command adds a line in the .bashrc file (this file is in home folder), which sets the ROS environment in every new terminal.
$ echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
The .bashrc file runs in every new terminal so the following command sets the environment in the current terminal:
$ source ~/.bashrc
-
Set up dependencies for building the package.
$ sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
-
Install rosbridge. Use the following command:
$ sudo apt-get install ros-kinetic-rosbridge-server
-
Install PostgreSQL.
-
Open the PostgreSQL console:
$ sudo -u postgres psql postgres
-
Create and set up a new user.
create user user_name with password 'password';
alter role user_name set client_encoding to 'utf8';
alter role user_name set timezone to 'UTC';
alter role user_name createdb;
-
Create database.
create database django_db owner user_name;
-
Set up django settings with your postgres.