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 editor is designed as a simple graphical tool to facilitate the creation and debugging of semantic maps. It can load and export OWL descriptions of semantic environment maps and allows to create, delete, and modify the objects therein. Its main features are
Semantic maps form a structured, semantic environment representation that consists of a collection of objects that are described as instances of object classes in an ontology. Each object instance inherits the properties of its class (e.g. the refrigerator inherits the property ‘storage place for perishable items’, or the oven the property ‘can be used for heating food’). In addition, instance-specific properties like the weight of an object can be specified.
There are two kinds of hierarchies related to the object representation: On the one hand, there is the specialization hierarchy of object classes that describes e.g. a Refrigerator as a specialization of ElectricalHouseholdAppliance as a specialization of ElectricalAppliance and Device. On the other hand, there is a component hierarchy (part-of hierarchy) that describes the composition of objects from parts, including the respective 6D poses of the components as well as articulated joints (prismatic and rotational).
CAD models (COLLADA files, PLY, etc) can be attached to an object class or instance to describe its geometry in more detail (and to get nicer visualizations).
The format in which the maps are described is the same OWL language that is also used for action recipes — though of course using different classes. This allows joint inference about actions and objects, for example to query for all objects that are part of a recipe in order to check if the robot has an object recognition model for each of them, or to check if the positions of all objects in the recipe are known, i.e. if there is an instance of the respective class.
The semantic map 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
After starting the program, you can load a map from a local OWL file. If you click on “load map from file”, a file selection dialog will open in which you can select an OWL file to be opened. If you want to start with an empty map, just click on 'cancel'. If you have selected a map, it will be loaded and visualized.
The left part of the program visualizes the semantic map. Pieces of furniture are drawn in different shades of grey, doors in yellow, rotational hinges as blue cylinders (z-axis pointing along the cylinder towards the block marker), and prismatic joints as green cylinders. If the objects in the map have been linked to CAD models, these are shown instead of the generic block-based visualization.
Clicking on an object loads it into the form fields on the right side. There are three synchronized tabs for entering the object information in different ways: First, there is a simple form, allowing to set the position of the object and to rotate it around the axes by 90 degrees. Second, there is a matrix form to enter the 4×4 homography matrix that supports rotation, position, scaling, and shearing. Third, there is a position+quaternion input method to set the position and orientation. Data entered into either tab is being updated in the other ones when switching the tab.
The form fields have the following meaning:
Switching between the text fields can be done using TAB and SHIFT-TAB. For all textfields with numbers, the value can be increased and decreased using PAGE_UP and PAGE_DOWN when the field is selected. This can be used for easily moving object instances along the axes.
The interface was implemented using Processing and the controlP5 library.
The following steps describe how to create a map of three cupboards, one of which has a door with a hinge.
The resulting map should look like this: http://ias.cs.tum.edu/kb/demo-map.owl
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.