This page describes the 'catkinized' version of KnowRob that uses the catkin buildsystem and the pure Java-based rosjava. The documentation for the older version, which was based on the rosbuild buildsystem and rosjava_jni, can be found here. |
---|
The manual creation of an action recipe can be tedious task that is prone to errors like incorrect transition specifications or wrong action arguments. The graphical editor for action recipes is intended to speed up the creation and update of action recipes. It further serves as compact visualization of an action recipe and as supervision interface during task execution.
The following image gives an overview of its interface. In the top row, there are buttons for loading and saving recipes. The bottom left area visualizes the task specification, i.e. the single actions, their respective properties, and the transitions between them (whose type is visualized by different colors — green for ‘OK’, red for ‘ERROR’). The two groups of form elements on the right-hand side describe properties of the recipe as a whole. The base IRI defines the name space of the OWL elements that are part of the recipe; the default value can be kept here. The other forms are described below.
The action recipe editor is part of the knowrob_gui repository that you can checkout from
git clone https://github.com/knowrob/knowrob_gui.git
The knowrob_gui directory needs to be in your catkin workspace. Please compile it using 'catkin_make' after checking out the repository. Knowrob_gui depends on the knowrob stack and its dependencies. Please have a look at the installation instructions if you haven't installed knowrob yet. You can then start the editor with the following command:
rosrun knowrob_gui KnowRobGUI
There are some important properties of action recipes that should be known to understand the editor and execution system:
Before you can start to add actions, you need to create the recipe itself. The main information that is needed here are a unique identifier, usually written in CapitalizedCamelCaseFormat, and an arbitrary natural-language label. After entering this information, click on "create’. A box with the natural-language label will appear in the top left corner, indicating the recipe you are currently editing.
Now you can start to add actions to the recipe. A click on the “Add new action to recipe” button on the right opens the following editor window. You can use TAB/SHIFT-TAB to jump forward/backward through the form fields.
The following information is required:<br />
The class selector wizard contains the hierarchy of action classes defined in the KnowRob ontology. You can navigate through the classes with the mouse (shift the view around with the right mouse button pressed if the window becomes too small). If you know approximately how the desired class is called, it is more convenient to search for it using the text field. The search is full-text in both the class IRI (its ‘official name’) and its natural-language label. If you enter text, hit TAB to search and ENTER to use the currently selected class in the action editor.
Action transitions are visualized as arrows between the action blocks. Each action has two ports, an incoming port at the top and an outgoing port at the bottom. Each port can accommodate multiple connections, though each outgoing transition needs to be of different type. The transition types are visualized by different colors:<br />
To add a connection between two actions, left-click on the outgoing port of the first action. A gray arrow will appear that leads from that port to your mouse pointer. By clicking anywhere on the target action, you create a connection between them. By default, the connection has the type ‘OK’. To change it, double-click on the arrow and select the desired transition type from the transition properties window below.
In order to execute this action graph, the start- and end-actions need to be set so that the system knows where the task starts and when it is finished. The respective form fields are in the upper right block. To select an action, click on the “select” button and then click on the action; it will automatically be entered into the form field.
The import and export from/to RoboEarth is deprecated since the RoboEarth project has ended and the availability of the server infrastructure is not guaranteed any more.