RoPod/Tutorials/ROS installation: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
The Robot Operating System (ROS) is a framework for writing robot software. ROS uses concepts like nodes, topics, messages, etc. Get familiar with them by searching on the web. You can start reading at:
The Robot Operating System (ROS) is a framework for writing robot software. ROS uses concepts like nodes, topics, messages, etc. Get familiar with them by searching on the web. You can start reading at:
http://wiki.ros.org/ROS/Concepts
http://wiki.ros.org/ROS/Concepts
= Install basic set of packages =
<pre>sudo apt-get -y update && apt-get install -y \
nano \
vim \
git \
mercurial \
cmake \
build-essential \
automake \
libtool \
libtool-bin \
pkg-config \
wget \
curl \
unzip \
libjsoncpp-dev</pre>


=Install ROS =
=Install ROS =
Line 32: Line 50:


= Install ROPOD Software =
= Install ROPOD Software =
<pre>echo "source ~/ropod-project-software/catkin_workspace/src/platform/setup.bash"  >> ~/.bashrc
echo "source ~/ropod-project-software/catkin_workspace/src/platform/robot_common/setup.bash" >> ~/.bashrc</pre>


If you already [[ RoPod/Tutorials/Configuring GitHub | cloned the ropod-project-software]]  in your home directory, the next step is to install the software dependencies, i.e. non standard packages and third party software:
If you already [[ RoPod/Tutorials/Configuring GitHub | cloned the ropod-project-software]]  in your home directory, the next step is to install the software dependencies, i.e. non standard packages and third party software:
Line 42: Line 63:
Then, install all ROS dependencies by running
Then, install all ROS dependencies by running
     cd ''_catkin_workspace_dir_''
     cd ''_catkin_workspace_dir_''
    sudo rosdep init
    rosdep update
     rosdep install --from-path . -i -y  
     rosdep install --from-path . -i -y  


Line 54: Line 77:
'''ROPOD specific packages'''
'''ROPOD specific packages'''
     cd ''_catkin_workspace_dir_''/src
     cd ''_catkin_workspace_dir_''/src
    wstool init
     wstool up
     wstool up


Line 59: Line 83:
'''Zyre'''
'''Zyre'''


Follow instructions for **master** branches: https://github.com/zeromq/zyre
On the git-page of Sebastian Blumenthal, a bash script can be found to install the zyre-dependencies:
 
     cd ~
At the moment of writing (Oct, 2017), those correspond to:
     wget https://raw.githubusercontent.com/blumenthal/ropod-base-cpp/master/install_deps.sh
* libsodium 1.0.15
     chmod 755 install_deps.sh
* libzmq 4.2.2
     ./install_deps.sh --workspace-path=/opt --install-path=/usr/local
* czmq 4.0.2
* zyre 2.0.0
 
 
    git clone --depth 1 -b stable https://github.com/jedisct1/libsodium.git
     cd libsodium
     ./autogen.sh && ./configure && make check
    sudo make install
    cd ..
 
    git clone git://github.com/zeromq/libzmq.git
     cd libzmq
     ./autogen.sh
    # do not specify "--with-libsodium" if you prefer to use internal tweetnacl
    # security implementation (recommended for development)
    ./configure --with-libsodium
    make check
    sudo make install
    sudo ldconfig
    cd ..
 
    git clone git://github.com/zeromq/czmq.git
    cd czmq
    ./autogen.sh && ./configure && make check
    sudo make install
    sudo ldconfig
    cd ..
 
    git clone git://github.com/zeromq/zyre.git
    cd zyre
    ./autogen.sh && ./configure && make check
    sudo make install
    sudo ldconfig
    cd ..
 
 
'''JSONCPP'''
 
  apt-get install libjsoncpp-dev


= Compile Software =
= Compile Software =

Revision as of 16:20, 16 April 2018

Get familiar with ROS

The Robot Operating System (ROS) is a framework for writing robot software. ROS uses concepts like nodes, topics, messages, etc. Get familiar with them by searching on the web. You can start reading at: http://wiki.ros.org/ROS/Concepts

Install basic set of packages

sudo apt-get -y update && apt-get install -y \
	nano \
	vim \
	git \
	mercurial \
	cmake \
	build-essential \
	automake \
	libtool \
	libtool-bin \
	pkg-config \
	wget \
	curl \
	unzip \
	libjsoncpp-dev

Install ROS

ROS have several distributions (versions). Install ROS kinetic distribution, which is the one compatible with ubuntu 16.04. Follow the instructions on this webpage. Install the Desktop-Full version. Make sure you follow at least steps 1.1-1.7 in the webpage .

http://wiki.ros.org/kinetic/Installation/Ubuntu

To test the installation, run in a terminal the ROS core:

roscore

Then in another terminal you can type:

rostopic list

You should be able to see at least the following:

/rosout
/rosout_agg

Follow basic tutorials for ROS

Get familiar with ROS using the tutorials for beginners available at http://wiki.ros.org/ROS/Tutorials.

Get familiar with catkin workspaces, which will allow you to build a ROS node in the future. Moreover, get familiar on how to run a ros node.


Install ROPOD Software

echo "source ~/ropod-project-software/catkin_workspace/src/platform/setup.bash"  >> ~/.bashrc
echo "source ~/ropod-project-software/catkin_workspace/src/platform/robot_common/setup.bash" >> ~/.bashrc

If you already cloned the ropod-project-software in your home directory, the next step is to install the software dependencies, i.e. non standard packages and third party software:

Install Dependencies

First, make sure your system is up-to-date:

   sudo apt-get update
   sudo apt-get upgrade

Then, install all ROS dependencies by running

   cd _catkin_workspace_dir_
   sudo rosdep init
   rosdep update
   rosdep install --from-path . -i -y 

Install other 3-rd party dependencies by running

   sudo apt-get install libbullet-dev libsdl-image1.2-dev libsdl-dev


Next, only of you are a contributor to the private ROPOD repository (you should have already been informed by your coach if you are), install the following packages, otherwise jump to "Compile Software" section.


ROPOD specific packages

   cd _catkin_workspace_dir_/src
   wstool init
   wstool up


Zyre

On the git-page of Sebastian Blumenthal, a bash script can be found to install the zyre-dependencies:

   cd ~
   wget https://raw.githubusercontent.com/blumenthal/ropod-base-cpp/master/install_deps.sh
   chmod 755 install_deps.sh
   ./install_deps.sh --workspace-path=/opt --install-path=/usr/local

Compile Software

The first time you install the files in your computer be sure that the folders ‘build’ and ‘devel’ are removed, as well as the file src/Cmakelists.txt

Then, on the main directory level, run a cmake command to generate the executable files

catkin_make

You can run the alias

 clean_build

to do all these actions at once. However a clean build is only necessary twice each time you want to add functionality. AT the very beginning after updating the repository and at the end before commiting changes to the repository.

In the next part of the tutorial we are going to see how Matlab and ROS can communicate.