Getting Started Guide

Table of Contents

In this document you will get a short guide how to get started using and hacking on the Fawkes software.

Requirements

Fawkes focuses on development for ​Linux-based systems in general, and ​Fedora Linux and ​CentOS/​Red Hat Enterprise Linux in particular. Other distributions like ​Ubuntu and ​Debian have been used successfully, but may require a little more work. The Fawkes Development team maintains many required packages within Fedora, and therefore coverage is best there. Fawkes can also be compiled and used on ​FreeBSD, but some hardware plugins may not be available.

Fawkes needs a few other software libraries that have to be installed on the development system. It is our declared goal to minimize this set of libraries, but libraries allow for extending Fawkes' functionality without reinventing the wheel and lowering the amount of code to write, verify, and maintain. We do not package any 3rd party libraries in the Fawkes source tree, but rely on the target system to provide those libraries. This way the source tree remains sleek and we exploit the working force of the fine people packaging software for their favorite operating system.

See FawkesDependencies for tools and libraries that are required or recommended for operation.

Getting Fawkes

There are three ways of getting Fawkes that we describe here.

System-wide binary installation

This method is currently supported on Fedora. Fawkes has been accepted as a Fedora package and can be installed either via the graphical package install utility or via yum on the command line. Install the fawkes package to get a useful base system. To do this on the command line execute as root:

dnf install fawkes

Note: If you plan to compile Fawkes from source, this method can be used to get the largest set of dependencies available on Fawkes by installing the fawkes-devenv package instead of fawkes. As its dependencies this package will pull in everything required and recommended to build Fawkes.

Git Checkout

Especially if you plan to work on Fawkes and contribute code like bug fixes or plugins, you should consider using this method. First, you need to clone the repository, and then we strongly recommend to create a branch on which you will start doing your work. This can be achieved with the following commands:

Of course you can choose any other branch name. Continue below at Compiling Fawkes.

Compiling Fawkes

Make sure you have installed at least the minimum requirements, better even the recommended dependencies or as much as possible listed at FawkesDependencies. On Fedora read in the section system-wide binary installation about the fawkes-devenv package to achieve this easily, without having a full binary installation otherwise. We additionally recommend using ​ccache, a tool that will create an object cache and which can tremendously speedup consecutive compilation runs during development.

Afterwards go to your Fawkes source directory, named either fawkes-1.0.1 (for tarball installation, version may differ, of course) or fawkes (for git checkout). Then execute the following make command:

make -j`nproc` clean all gui

This will build everything that can be built. The -j`nproc` parameter runs a parallel compilation that uses all your available cores, nproc gives you the number of cores. If you're on a dual-core machine, this is equivalent to -j2.

The Fawkes build system distinguishes building the base system and console tools (the all target) and GUI applications (the gui target). This is done for efficiency, especially when working on the robot. The clean target will ensure that the source tree is clean. It is not strictly required on the first run, but if you repeat this step, e.g. after installing more dependencies, this comes handy.

Running Fawkes

The following will assume a source-tree based installation. If you have used the system-wide setup, simply remove the ./ prefix of the commands. Otherwise we assume that you are in the bin directory of the source tree after successful compilation. Lines starting with ">" denote output by the process.

Fawkes runs as a modular monolithic system, which loads and runs plugins within the same process. Every task within this process is executed in a thread. A plugin may have one or more threads. These properties, run-time plugin support and a multi-threaded paradigm, make Fawkes a very dynamic and flexible application. Fawkes is instructed by tools that communicate with Fawkes over the network. Even if you instruct it on the same machine, it will open a local connection. Read more about Fawkes' characteristics on the about page.

To run Fawkes, we first start the main application which provides the infrastructure for plugins:

Fawkes has been started successfully, but since no threads have been registered for the main loop it simply waits. As a first test, turn up the sound volume and load the flite plugin, which will make your machine speak "Speech synth loaded". Use the following command:

This will load the flite plugin. As its initialization routine it will output the sentence. The main application will print:

> 15:36:07.550514 PluginNetworkHandler: Loading plugin flite

You are now ready to start your journey into the Fawkes universe.

Bash Completion

Starting with the 1.0 release, Fawkes also supports bash completion. To enable bash completion in a source-tree installation, add the following to your bashrc (or directly run the command from your terminal to enable bash completion temporarily):

source $FAWKESBASEDIR/etc/bash/fawkes_completion.bash

where $FAWKESBASEDIR is the base directory of your Fawkes source tree. After you enabled bash completion, you can auto-complete all options and also the plugins to load during startup, e.g.

./bin/fawkes <TAB>

will list all available plugins, and

./bin/fawkes -<TAB>

will list all available optional parameters.

Note that loading plugins with -p still works but is not supported by auto completion.