wiki:DeveloperGettingStartedGuide
Last modified 8 years ago Last modified on 17.08.2010 05:55:12

Getting Started with Fawkes as Developer

This document briefly describes how to clone the Fawkes source code repository and start developing with Fawkes. Additionally it is recommended to read the GettingStartedGuide for users afterwards to see how to run Fawkes.

Directory Layout

Fawkes supports complete in-tree development. This means that once the source code tree has been downloaded and unpacked you can work within this tree. Binaries and libraries will be created in this tree and prepared for execution in this tree. No system-wide installation is required, you can do everything in your own directory.

bin/
Binaries, created on first build
cfg/
Configuration files.
doc/
Documentation, also auto-generated documentation (make apidoc)
etc/
Additional files, especially build system
lib/
Libraries (binaries), created on first build
plugins/
Plugin binaries, created on first build
res/
Resources like GUI descriptions, images and icons
src/
Source code
src/firevision/
FireVision computer vision framework.
src/interfaces/
BlackBoard interface definitions and generated source code
src/libs/
Source code for Fawkes libraries like core, networking, configuration, or blackboard
src/lua/
Lua scripts for agents and skills
src/mainapp/
Fawkes main application (source)
src/plugins/
Source code of Fawkes plugins.
src/tools
Fawkes tools to interact with running Fawkes instances

Getting the Source Code

To get the source code you can either download the current release from the Fawkes download page or clone the git repository.

Using the Current Release Snapshot

Download the latest package from the Fawkes download page. We assume this to be version 0.4 for now, replace the version appropriately for later versions. Then unpack the tarball and enter the Fawkes directory.

wget http://www.fawkesrobotics.org/download/fawkes-0.4.tar.bz2
tar xfj fawkes-0.4.tar.bz2
cd fawkes-0.4

Cloning the Source Code Repository

You can also grab the very latest version from the git source code repository. We will immediately create our own "work" branch in which we will do our development. This is to make it easier to pull changes, for instance between your laptop and desktop machines.

git clone git://git.fawkesrobotics.org/fawkes.git
cd fawkes
git co -b work

Building the Software

The next step is to build the software. First make sure that your system fulfills the minimum requirements as described in FawkesDependencies (especially see the system specific notes at the end). You should at least install the required and recommended dependencies for useful operation. Once the requirements are met you can build the software by execution

make
make gui

The first line will cause the libraries and binaries to run Fawkes to be built. The second command will build the GUI applications to interact with Fawkes. During the build process you might see notes about features that have been omitted. As long as the build does not stop after the notice with an error this should not be a problem, as just optional code has been enabled. As long as you installed the required dependencies the compilation should not fail.

After building the software you should find the directories bin/, lib/ and plugins/ in the base directory. They contain the compiled binaries used for execution.

Running the Software

Now it is time to run Fawkes for the first time. We assume that you installed the required and recommended dependencies and additionally the Flite development package. We will start Fawkes, load the flite (speech synthesis) and the skiller (skill execution runtime) plugin and use the skillet console tool to execute a say skill to use the speech synthesis. Lines starting with $ are lines you enter at the prompt, lines starting with # are comments, just ignore them, lines not starting with any of those is text output that is expected that you should see, the +# is the prompt of the skillet tool.

cd bin
./fawkes
00:26:15.283694 FawkesMainThread: Default config value ADDED:   /fawkes/bbsync/check_interval (value: 5000)
# [...]
# dozens of those, the initial configuration is being created
00:26:18.814649 FawkesMainThread: No timed threads exist, waiting

The Fawkes process runs until you press Ctrl-C to interrupt it. Execute the following commands on a second console:

cd bin
# This should output "Flite speechsynth loaded" on your speakers
./ffplugin -l flite
./ffplugin -l skiller
./skillet
Connection established
+# say{text="Hello world"}
Executing: say{text="Hello world"}

Fawkes should now have synthesized "Hello world" on your speakers. Further information can be found in the GettingStartedGuide. Fawkes is running and you can now start developing.