ROS Robotic operation system

Installation of ROS Fuerte

Binary installation of Fuerte for Ubuntu 12.04 or older or debian

sudo sh -c 'echo "deb precise main" > /etc/apt/sources.list.d/ros-latest.list'
wget -O - | sudo apt-key add -
sudo apt-get update
# full install (currently always needed)
sudo apt-get install ros-fuerte-desktop
echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc

Restart the console so that the changes to .bashrc become active.

Installation from source:

mkdir $HOME/rosstacks
echo "export ROS_PACKAGE_PATH=\$ROS_PACKAGE_PATH:\$HOME/rosstacks" >> ~/.bashrc

Restart the console so that the changes to .bashrc become active.

sudo apt-get install libreadline-dev omniorb omniidl omniorb-nameserver libomniorb4-1 libomniorb4-dev libomnithread3-dev libomnithread3c2 gccxml antlr libantlr-dev libxslt1-dev liblua5.1-0-dev ruby1.8-dev libruby1.8 rubygems1.8 rake ruby-facets ruby-rvm
gem install nokogiri -v '1.5.2' -- --with-xml2-lib=/usr/lib/i386-linux-gnu --with-xml2-include=/usr/include/libxml2 --with-xslt-lib=/usr/lib/i386-linux-gnu --with-xslt-include=/usr/include/libxslt

cd $HOME/rosstacks
git clone
git clone
git clone
git clone
git clone
cd orocos_toolchain
git checkout orocos_toolchain-2.6.0-2
git submodule init
git submodule update
rosmake orocos_toolchain rtt_ros_integration rtt_ros_comm rtt_common_msgs rtt_geometry

The tools from the binary installation (roscd and rosmake) are needed for the source installation, therefore do the binary installation first.

SOEM drivers

They are needed to interface Ethercat I/O- modules.

They can be optained from:

Installation of SOEM drivers for ROS Fuerte

cd ~/rosstacks
git clone
rosmake soem

Than follow the description given here: .

Running the "Hello world" example of OROCOS

First, add the generated script to the .bashrc file in your home directory:
Append "source ~/rosstacks/orocos_toolchain/" -- without the quotes -- to the end of your .bashrc file.

Restart the console so that the changes to .bashrc become active.

Now enter:

cd rosstacks
rosrun ocl orocreate-pkg HelloWorld
cd HelloWorld

This should build the HelloWorld package.

Testing the "Hello world" example

Write a script "helloworld.ops" with the following content:

print.ln("Script imported HelloWorld package:")
loadComponent("Hello", "HelloWorld") 
print.ln("Script created Hello Component with period: " + Hello.getPeriod() )

Execute the script with the command:

deployer-gnulinux -s helloworld.ops -linfo

Now you should be able to follow the "Hello World" tutorial of the following document: orocos-components-manual.pdf

Adding the QT libraries


First step: Add the following lines to the CMakeLists.txt file:

find_package(Qt4 REQUIRED)

All changes for including the a library with the name utils.cpp:

##### FOR QT 01 of 04 #####
find_package(Qt4 REQUIRED)

##### FOR QT 02 of 04 #####

# Creates a component library libSensorTask-<target>.so
# and installs in the directory lib/orocos/SensorTask/
orocos_component(SensorTask src/SensorTask-component.hpp src/SensorTask-component.cpp

##### FOR QT 03 of 04 #####
../../00AssetLib/Utils/utils.cpp) # may add multiple source files

##### FOR QT 04 of 04 #####

In this example the preprocessor is not invoked, because the Utils class is not derived from QObject.

Adding other libraries

Have a look at:

Create a folder named cmake/Modules/ under your project root, and in the root CMakeLists.txt, include the following code:


At ASSET, TU Delft we use the following line instead:

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../00AssetLib/ROS/cmake/Modules)

Adding ZeroMQ

Download the file FindZeroMQ.cmake (from here) and put it into the folder cmake/Modules.

Now add the following to your CMakeLists.txt file:

find_package(ZeroMQ REQUIRED)

In addition LIBS must be added to TARGET_LINK_LIBRARIES:


Adding Google Protocol Buffers

Downlad the file FindProtobuf.cmake (from here) and put it into the folder cmake/Modules.

Now add an adapted version of the following example to your CMakeLists.txt file:

#  Example:
#   find_package(ProtocolBuffer REQUIRED)
#   include_directories(${PROTOBUF_INCLUDE_DIRS})
#   include_directories(${CMAKE_CURRENT_BINARY_DIR})
#   SET(args 
#       PROTOFILES foo.proto 
#   )
#   add_executable(bar ${PROTO_SRCS} ${PROTO_HDRS})
#   target_link_libraries(bar ${PROTOBUF_LIBRARY})
# NOTE: You may need to link against pthreads, depending
# on the platform.


Using Qt creator to develop OROCOS packages

Install QT creator 2.5.2 on 32 bit Linux

cd ~
chmod +x qt-creator-linux-x86-opensource-2.5.2.bin
sudo ./qt-creator-linux-x86-opensource-2.5.2.bin

Edit the start script

cd /opt/qtcreator-2.5.2/bin
sudo joe

Add the following lines at the beginning and remove the old #!/bin/sh line at the top:

source /opt/ros/fuerte/setup.bash
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$HOME/rosstacks:$HOME/00QT-Software/WinchController
source $HOME/rosstacks/orocos_toolchain/

Add the following bash script to your project (here: SensorTask):

deployer-gnulinux -s runTasks.ops

Add this script as "Run" target to your project in QT-Creator. Also set the execution directory to match the main directory of your orocos component, e.g. $HOME/00QT-Software/WinchController/SensorTask

Add the following OROCOS script to your project (here: SensorTask):

loadComponent("Sensor", "SensorTask")
print.ln("Script created Sensor Component with period: " + Sensor.getPeriod() )

This needs to be adapted to match the needs of your project.

Add a "Run" target to your project in QT-Creator.

Back to FrontPage

KielTech: ROS (last edited 2012-12-20 19:40:51 by UweFechner)