-
Notifications
You must be signed in to change notification settings - Fork 0
2.1 Installization
To install ros you can follow official tutorial or below instruction.
Add the sources and set the key
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
Update and install
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
It may take some time to install it. Be patient!!
After installing run the below commend one by one.
apt-cache search ros-kinetic
sudo rosdep init
rosdep update
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
Now you source the ROS environment. Launch your ".bashrc" with superuser privilege
sudo gedit ~/.bashrc
then add following line to the bottom of the document.
source /opt/ros/kinetic/setup.bash
save and close the .bashrc and source your .bashrc
source ~/.bashrc
To test ros installization, launch a terminal and run "roscore".
If you get the output in the following figure, the installization is successful.

Gazebo simulation environment comes with ROS. To launch Gazebo, launch a terminal and run "gazebo".

By installing ROS, you have already installed catkin_make, an early ros_build system. However there is a newer version with more advance functionalities. To install it, first copy following to the your terminal.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add
Then install catkin tools using below script.
sudo apt-get update
sudo apt-get install python-catkin-tools
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
Terminator is an advance terminal interface, which make it easy to work with multiple tabs. To install
sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminatorAtom is an open source text editor. It has directory tree and syntax highlighting. To download
sudo add-apt-repository ppa:webupd8team/atom
sudo apt update
sudo apt install atomUpdate your system and install required packages
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libgtk2.0-dev libgtk-3-dev
sudo apt-get install libatlas-base-dev gfortran
sudo apt-get install python2.7-dev python3-dev
Download OpenCV source file to your home directory and then unzip
cd ~
wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.3.0.zip
unzip opencv.zip
and also download opencv_contrib
wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/3.3.0.zip
unzip opencv_contrib.zip
Then go into the unzipped opencv folder and build using following
cd ~/opencv-3.3.0/
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.3.0/modules \
-D BUILD_EXAMPLES=ON ..
make -j4
sudo make install
Now launch a terminal. Run "python" and type
import cv2
cv2.__version__
if you get no error and you see '3.3.1-dev' as output, you are done. Go top