(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

System Configuration

Description: Reviews your FlexBE installation and points out the most important components.

Tutorial Level: BEGINNER

Next Tutorial: Creating a New Behavior

The following tutorials assume you already installed FlexBE as, for example, explained here. However, let's make a step back and review what we have so far. This also helps you if you want to customize your installation. If you are fine with the default setup and just want to get things running, feel free to skip this tutorial for now and consider coming back later.

FlexBE Behavior Engine

Depending on what you decided to clone, there are several new repositories in your catkin workspace. The most important one is the FlexBE behavior engine itself. Of its contained ROS packages, especially two will be interesting for you. First, flexbe_states contains a set of generic basic states which you can use in your own behaviors. Second, the flexbe_testing package provides a testing framework tailored to state unit testing, explained in an advanced tutorial. Furthermore, flexbe_input provides an integrated way for data exchange from the operator to the robot and flexbe_widget holds some handy scripts such as a script for clearing temporary behaviors.

FlexBE App

The user interface of FlexBE provides a powerful behavior editor as well as runtime monitoring functionality. You can either run it in offline mode for just developing behaviors, e.g., by using a shortcut icon, or launch it via roslaunch in oder to access its full functionality. The following tutorials make use of the FlexBE App and help you with your first steps. There is also an advanced tutorial for more details about the user interface.

The FlexBE App is based on the NWJS framework. In addition to the source files in the repository, it needs a couple of NWJS binaries to run. These binaries are automatically downloaded to the repository folder when running catkin build, but can also be manually triggered by rosrun flexbe_app nwjs_install.

Behaviors Repository

The second repository is, per default, created by running the create_repo script located in flexbe_widget. This repository will be hosted by you along with your project and basically contains all custom content you develop for using FlexBE, mainly states and behaviors. Although being project specific, there are some common parts.

If you did not yet initialize a behaviors repository during installation, please do so before heading over to the next tutorials. Pick a name, e.g., "tutorial" and then run within the src folder of your catkin workspace:

rosrun flexbe_widget create_repo tutorial  # replace "tutorial" by your favorite name if you want

Most importantly, the ROS package tutorial_flexbe_behaviors (or similar name if you changed the above command) will be present in your repository and will be the point of reference for FlexBE in order to store your behaviors. It contains a folder called manifest, holding all the behavior manifests. A behavior manifest is an abstract interface declaration each behavior defines, stored as an XML file. This is how FlexBE knows about which behaviors are available, where to find them, and much more. Furthermore, if you need to store configuration files for your behaviors, tutorial_flexbe_behaviors is a good place for this purpose, too.

As already mentioned, your states and behaviors are the main content of this repository. For states, it is recommended to create packages similar to the generic state package flexbe_states and bundle states according to their purpose as you like. It is also very appreciated if you decide to make some of your states publicly available, for which you would store them in a separate, public repository. For behaviors, it is recommended to store them in a subdirectory of the repository. This is mainly to keep things organized and separate the, later likely large, amount of behaviors from the rest of the packages.

Creating a New Behavior

That's it! Ready to start creating a new behavior.

Wiki: flexbe/Tutorials/System Configuration (last edited 2018-12-01 13:00:01 by PhilippSchillinger)