Differences

This shows you the differences between two versions of the page.

Link to this comparison view

doc:semantic_map_to_owl [2014/11/26 20:20] (current)
admin created
Line 1: Line 1:
 +====== The SemanticMapToOWL service ======
 +
 +
 +The SemanticMapToOWL node offers a service for generating an OWL representation of a semantic map from a SemMap message (see msg folder) which is a list of objects with their types, dimensions, poses, and parent objects. This representation is transformed into an OWL representation that is compatible to the files in the ias_semantic_map directory.
 +    ​
 +A test client is included that creates a map with a single cupboard including door, hinge and handle.
 +
 +  $ roslaunch mod_semantic_map mod_semantic_map.launch
 +  $ rosrun mod_semantic_map SemanticMapToOWLTestClient ​
 +
 +In general, you run the service like this:
 + 
 +  $ rosrun mod_semantic_map SemanticMapToOWL
 +
 +The service takes a header message and a list of objects as input and returns the generated map in OWL format as a string.
 +
 +Here is the service format:
 +  $ rossrv show mod_semantic_map/​GenerateSemanticMapOWL
 +  mod_semantic_map/​SemMap map
 +   ​Header header
 +     ​uint32 seq
 +     time stamp
 +     ​string frame_id
 +   ​mod_semantic_map/​SemMapObject[] objects
 +     int32 id
 +     ​string type
 +     ​float32 width
 +     ​float32 depth
 +     ​float32 height
 +     ​float32[] pose
 +     int32 partOf
 +  ---
 +  string owlmap
 +
 +You should provide a point in time at which the map was perceived, e.g. the current system time, and a namespace that is used for prefixing the map entries, e.g., '​http://​example.com/​my_map.owl#'​ by using the fields stamp and frame_id of the header message respectively.
 +
 +An object in the list should have a unique id, type, width, height, depth, pose (4x4 rotation matrix) and an id of another object of which the object is part of (partOf). If the object is not part of anything please provide a 0.
 +
 +All geometric information should be provided in meters.
 +
 +The type of the object can be one from the set of subclasses of the Knowrob concept SpatialThing-Localized. You can retrieve a list of all types by the following command:
 +
 +  $ rosrun mod_semantic_map SemanticMapToOWL list
 +  Handle
 +  Pitcher
 +  TopSide
 +  ManipulationPlace
 +  Sausage
 +  HeatSource
 +  FoodVessel
 +  GeographicalArea-Intangible
 +  DrinkingMug
 +  Oven
 +  Juice
 +  ...
 +
 +The encoding of type is case-insensitive,​ i.e. handle, Handle, HANDLE will work.
 +
 +===== Parameters =====
 +
 +The service uses the following parameters that set the base IRI of the generated OWL file and the address of the room that is described in the map. The latter is important if the map is to be exchanged via RoboEarth since the search for maps in the DB depends on the address being set. You can adapt the following parameter definitions in the launch file to your values:
 +
 +  <param name="​map_address_room_nr"​ type="​string"​ value="​3001"​ />
 +  <param name="​map_address_floor_nr"​ type="​string"​ value="​3"​ />
 +  <param name="​map_address_street_nr"​ type="​string"​ value="​45"​ />
 +  <param name="​map_address_street_name"​ type="​string"​ value="​Karlstrasse"​ />
 +  <param name="​map_address_city_name"​ type="​string"​ value="​Munich"​ />
 +