Difference between revisions of "Proj-2013-2014-RobAIR-2/getStarted"

From air
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
  +
 
= Requirement =
 
= Requirement =
   
Line 7: Line 9:
 
= ROS installation =
 
= ROS installation =
   
First of all, you need to install ROS =
+
First of all, you need to install ROS.
  +
IMPORTANT : This tutorial is based on the Hydro version of ROS. If the version is different, you have to adapt the following commands !
 
 
== Set up your sources.list ==
 
== Set up your sources.list ==
   
Line 70: Line 72:
 
| align=left | <code><nowiki></nowiki>
 
| align=left | <code><nowiki></nowiki>
 
sudo rosdep init
 
sudo rosdep init
  +
<nowiki></nowiki></code>
  +
|}
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
 
rosdep update
 
rosdep update
 
<nowiki></nowiki></code>
 
<nowiki></nowiki></code>
 
|}
 
|}
   
  +
== Set up your environment ==
  +
This way, the ROS environment variables are automatically added to your bash session every time a new shell is launched :
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
echo "source /opt/ros/hydro/setup.bash" >> ~/.bashrc
  +
<nowiki></nowiki></code>
  +
|}
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
source ~/.bashrc
  +
<nowiki></nowiki></code>
  +
|}
  +
  +
If you just want to change the environment of your current shell, you can type :
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
source /opt/ros/hydro/setup.bash
  +
<nowiki></nowiki></code>
  +
|}
  +
  +
== Install Rosinstall ==
  +
Rosinstall is frequently used for installing specific package and download specific code :
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
sudo apt-get install python-rosinstall
  +
<nowiki></nowiki></code>
  +
|}
   
   
 
= Run a ROS package =
 
= Run a ROS package =
  +
  +
== Creation of ROS Workspace ==
  +
  +
Create a directory and link it to ROS environment :
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
rosws init ~/hydro_workspace /opt/ros/hydro
  +
<nowiki></nowiki></code>
  +
|}
  +
  +
== Packages for RobAIR ==
  +
  +
Download one of the following package (order by date) :
  +
  +
* 2013-2014 Github (POLYTECH) https://github.com/DavidLevayer/robAIR
  +
* 2012-2013 Github (ENSIMAG) https://github.com/belluzj/RobAir
  +
* 2012-2013 Github (POLYTECH) https://github.com/NicolasAfonso/RobAir
  +
  +
Unzip the archive into your ROS workspace (~/hydro_workspace) and rename the directory "robair_demo"
  +
  +
== Build package ==
  +
  +
Add the directory to the ROS environment :
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
cd ~/hydro_workspace/
  +
<nowiki></nowiki></code>
  +
|}
  +
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
rosws set robair_demo
  +
<nowiki></nowiki></code>
  +
|}
  +
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
source setup.bash
  +
<nowiki></nowiki></code>
  +
|}
  +
  +
Make your dream come true :
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
rosmake robair_demo
  +
<nowiki></nowiki></code>
  +
|}
  +
  +
Run the compiled package :
  +
{| class="wikitable centre" width="80%"
  +
|-
  +
| align=left | <code><nowiki></nowiki>
  +
./robair_demo/toutLancer.sh
  +
<nowiki></nowiki></code>
  +
|}
  +
  +
= ROS bugs =
  +
  +
== RT-Library missing ==
  +
  +
sudo gedit /opt/ros/hydro/share/catkin/cmake/tools/rt.cmake
  +
  +
if(NOT (APPLE OR WIN32 OR MINGW OR ANDROID))
  +
  +
become
  +
  +
if(NOT (APPLE OR WIN32 OR MINGW OR ANDROID OR UNIX))
  +
  +
== Include could not find rostoolchain ==
  +
  +
The following command install several ROS packages, including old version of rostoolchain (fuerte)
  +
  +
sudo apt-get install ros-fuerte-orocos-toolchain ros-fuerte-rtt-ros-integration ros-fuerte-rtt-geometry ros-fuerte-rtt-ros-comm ros-fuerte-rtt-common-msgs
  +
  +
== Could not open port : permission denied [Errno 13] ==
  +
  +
Ensure you are in the 'dialout' group:
  +
  +
groups
  +
  +
If not, you have to ;)
  +
  +
sudo usermod -a -G dialout username
  +
  +
Log out then back in to apply the changes.
  +
  +
= Useful ROS commands =
  +
  +
Coming soon...
   
 
= Related information and sources =
 
= Related information and sources =
  +
* Tutorial from RICM4 2012-2013 : http://air.imag.fr/index.php/Robot_Operating_System
  +
* Notes from ENSIMAG Fablab : http://fablab.ensimag.fr/index.php/RobAIR/Pilotage_Automatique_du_Robot
  +
* ROS website : http://wiki.ros.org/ROS/Installation

Latest revision as of 17:04, 5 February 2014


Requirement

  • Ubuntu OS, but ONLY one of the following version : 12.04 (LTS The Precise Pangolin), 12.10 (The Quantal Quetzal) or 13.04 (The Raring Ringtail)
  • An Internet connection
  • Patience and terminal skills

ROS installation

First of all, you need to install ROS. IMPORTANT : This tutorial is based on the Hydro version of ROS. If the version is different, you have to adapt the following commands !

Set up your sources.list

Proceed as follow (depending of your version) :

  • 12.04 (LTS The Precise Pangolin

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'

  • 12.10 (The Quantal Quetzal)

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu quantal main" > /etc/apt/sources.list.d/ros-latest.list'

  • 13.04 (The Raring Ringtail)

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu raring main" > /etc/apt/sources.list.d/ros-latest.list'

Set up your key

wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

Installation

Make sure everything is up-to-date :

sudo apt-get update

Then install the most complete ROS installation :

sudo apt-get install ros-hydro-desktop-full

Now take a break and watch your computer working.

Initialize rosdep

Rosdep is used to easily install system dependencies :

sudo rosdep init

rosdep update

Set up your environment

This way, the ROS environment variables are automatically added to your bash session every time a new shell is launched :

echo "source /opt/ros/hydro/setup.bash" >> ~/.bashrc

source ~/.bashrc

If you just want to change the environment of your current shell, you can type :

source /opt/ros/hydro/setup.bash

Install Rosinstall

Rosinstall is frequently used for installing specific package and download specific code :

sudo apt-get install python-rosinstall


Run a ROS package

Creation of ROS Workspace

Create a directory and link it to ROS environment :

rosws init ~/hydro_workspace /opt/ros/hydro

Packages for RobAIR

Download one of the following package (order by date) :

Unzip the archive into your ROS workspace (~/hydro_workspace) and rename the directory "robair_demo"

Build package

Add the directory to the ROS environment :

cd ~/hydro_workspace/

rosws set robair_demo

source setup.bash

Make your dream come true :

rosmake robair_demo

Run the compiled package :

./robair_demo/toutLancer.sh

ROS bugs

RT-Library missing

sudo gedit /opt/ros/hydro/share/catkin/cmake/tools/rt.cmake

if(NOT (APPLE OR WIN32 OR MINGW OR ANDROID))

become

if(NOT (APPLE OR WIN32 OR MINGW OR ANDROID OR UNIX))

Include could not find rostoolchain

The following command install several ROS packages, including old version of rostoolchain (fuerte)

sudo apt-get install ros-fuerte-orocos-toolchain ros-fuerte-rtt-ros-integration ros-fuerte-rtt-geometry ros-fuerte-rtt-ros-comm ros-fuerte-rtt-common-msgs

Could not open port : permission denied [Errno 13]

Ensure you are in the 'dialout' group:

groups

If not, you have to ;)

sudo usermod -a -G dialout username

Log out then back in to apply the changes.

Useful ROS commands

Coming soon...

Related information and sources