RoPod/Tutorials/ROS installation: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
mNo edit summary
 
(41 intermediate revisions by 6 users not shown)
Line 1: Line 1:
=Get familiar with ROS =
<div style="width: 40%; float: right;"><center>{{:RoPod_Table_Menu}}</center></div>
 
<div style="float: left; width:60%">
=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:
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 ROS =
=Install basic set of packages=  
ROS have several distributions (versions). Install ROS kinetic distribution, which is the one compatible with ubuntu 16.04. Follow the instructions on this webpage.


http://wiki.ros.org/kinetic/Installation/Ubuntu
<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>


(This is not valid/ to be checked)Then, install roslaunch, which will be useful when launching multiple ROS applications from packages.
=Install ROS=
ROS have several distributions (versions). Install ROS Noetic distribution, which is the one compatible with Ubuntu 20.04. Follow the instructions on this webpage. Install the Desktop-Full version. Make sure you follow '''at least steps 1.1-1.6 in the webpage.'''


<pre>sudo apt-get install python-roslaunch</pre>
http://wiki.ros.org/noetic/Installation/Ubuntu


Install SMACH tools that wuill be used to create state machines
Note: An alternative method would be to install Docker with pre-installed ROS: https://hub.docker.com/_/ros


<pre>sudo apt-get install ros-kinetic-smach*</pre>


To test the installation, run in a terminal the ROS core:
To test the installation, run in a terminal the ROS core:
Line 28: Line 44:
<pre>/rosout
<pre>/rosout
/rosout_agg</pre>
/rosout_agg</pre>
You can 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.
If you already [[ RoPod/Tutorials/Configuring GitHub | cloned the ropod-project-software]]  in your home directory, teh 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 dependencies by running
    cd ''_catkin_work_space_dir_''
    rosdep install --from-path . -i -y
   
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 next subsection.
'''ROPOD specific packages'''
    cd ''_catkin_work_space_dir_''/src
    wstool up
'''Zyre'''
Follow instructions for **master** branches: https://github.com/zeromq/zyre
At the moment of writing (Oct, 2017), those correspond to:
* libsodium 1.0.15
* libzmq 4.2.2
* 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 =
After installing the dependencies, then you should be able to compile the software now:
<pre>
cd ~/ropod-project-software/catkin_workspace
catkin_make
</pre>
In the next part of the tutorial we are going to see how [[ RoPod/Tutorials/Matlab and a ROS node interface | Matlab and ROS can communicate]].

Latest revision as of 13:58, 15 February 2023

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 Noetic distribution, which is the one compatible with Ubuntu 20.04. Follow the instructions on this webpage. Install the Desktop-Full version. Make sure you follow at least steps 1.1-1.6 in the webpage.

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

Note: An alternative method would be to install Docker with pre-installed ROS: https://hub.docker.com/_/ros


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