====== Create and load a semantic map ====== ~~NOTOC~~ \\ ^ This page describes the 'catkinized' version of KnowRob that uses the [[http://wiki.ros.org/catkin/|catkin buildsystem]] and the pure Java-based [[http://wiki.ros.org/rosjava|rosjava]]. The documentation for the older version, which was based on the rosbuild buildsystem and rosjava_jni, can be found [[/doc/create_and_load_a_semantic_map?rev=1401968329|here]].^ \\ Semantic maps are descriptions of an environment in terms of localized object instances and are stored in OWL files. Much of the environment- and object-related functionality in KnowRob depends of having a valid semantic map, so you may want to create one for your robot's environment. {{ :doc:map-with-joints.png?nolink&500 |}} ===== Create your semantic map ===== There are different ways how to create a semantic map in OWL: ==== Robot perception system ==== If you have [[/doc/writing_an_interface_to_your_perception_system|integrated a perception system]] with KnowRob, a kind of semantic map is automatically created by the objects the robot perceives. You can save the in-memory map to an OWL file using the methods in the [[/doc/loading_files_and_ros_packages#exporting_knowledge_into_owl_files|owl_export module]]. ==== Manual creation of the OWL file ==== In some cases, it may actually be the fastest to create the map manually in a good text editor in which you can copy and paste the object instances and their pose matrices. Especially if you would like to set many semantic object properties beyond their poses, this may be a good option. If you plan to do this, you should have well understood [[/doc/object_pose_representation|how object poses are represented in KnowRob]]. ===== Load the map into KnowRob ===== To make the map available for querying and inference in KnowRob, you just need to parse the OWL file. You can either do this manually after having started the KnowRob shell using the //owl_parse// predicate given below, or you can put that command into the init.pl of a [[/doc/create_your_own_knowrob_package|package you have created]]. $ rosrun rosprolog rosprolog ias_knowledge_base ?- owl_parse('path/to/file.owl', false, false, true).