wiki:ROSIntegration
Last modified 8 years ago Last modified on 25.05.2011 15:19:14

Integrating Fawkes and ROS

Both, Fawkes and ROS have some unique features that make it worthwhile to pursue both approaches. To combine the two frameworks and make it possible to use ROS features from Fawkes and Fawkes features and libraries from ROS, two ways for integrating the two exist. The first way integrates Fawkes into ROS as a ROS package and provides a specialized main application suitable for easy integration of Fawkes into an existing ROS ecosystem. The second way implements a set of Fawkes plugins, which register a Fawkes instance as a ROS node and provide some services to ROS. In the following the two ways are described in more detail assuming that ROS has been installed already (cf. ROS installation instructions).

Integrating Fawkes into a ROS ecosystem

When coming from an existing ROS system it makes sense to integrate Fawkes in a subsidiary fashion. This approach will copy a package onto your machine which includes the whole Fawkes system, and a ROS-specific main application to run Fawkes. You will be able to use all Fawkes libraries from ROS code.

First, you need to clone and build the code, make sure you do this in a directory that is in your ROS_PACKAGE_PATH or add it. Install at least the mandatory dependencies of Fawkes. See the installation instructions for information about specific platforms.

git clone git://git.fawkesrobotics.org/rosfawkes.git
cd rosfawkes
make all gui

You can now already run Fawkes as a ROS node by using

rosrun rosfawkes rosfawkes

It will run a Fawkes instance encapsulated in a ROS node with ready-to-use ROS integration.

Using ROS from Fawkes

In a Fawkes ecosystem when you want to call ROS services or communicate via ROS topics with other nodes it is most useful to use the ROS plugin family for Fawkes. This way you can keep the Fawkes development environment but still benefit from the plethora of modules available for ROS.

The code is currently in a development stage and up for review. Therefore you need to checkout a specific branch of the source code. To get the code do:

git clone git://git.fawkesrobotics.org/fawkes.git
cd fawkes
git checkout -b rosplugins origin/timn/rosplugins
make all gui

Afterwards Fawkes can be run as usual (cf. GettingStartedGuide). The ros plugin will provide an aspect to gain access to the ROS node handle that can be used to advertise and request services, and to publish and subscribe topics from a Fawkes plugin.

Additional integration plugins

There is an additional ros-webview plugin that allows ROS nodes to extend Fawkes' webview web interface by registering ROS services which are called to process requests to specific URLs. A ros-talkerpub plugin will write to the /chatter topic and can be used in combination with the ROS topic tutorials (or using rostopic echo /chatter).