Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:reasoning_using_computables [2014/11/26 20:25] – [Qualitative spatial relations] admindoc:reasoning_using_computables [2016/04/27 13:54] (current) – [Qualitative spatial relations] daniel86
Line 1: Line 1:
 ====== Reason using computables ====== ====== Reason using computables ======
 +~~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/reasoning_using_computables?rev=1401968327|here]].^
 +\\
  
 Computables serve for //computing// relations during the reasoning process instead of asserting them manually. This can for instance be done by querying external sources of information, or by combining the information in the knowledge base in order to create new statements. Computables serve for //computing// relations during the reasoning process instead of asserting them manually. This can for instance be done by querying external sources of information, or by combining the information in the knowledge base in order to create new statements.
Line 17: Line 21:
 With computables, these relations can be computed when somebody queries for them based on the positions and dimensions of the objects involved. This way, information is stored only once, and different views (like these qualitative relations) are computed from it. With computables, these relations can be computed when somebody queries for them based on the positions and dimensions of the objects involved. This way, information is stored only once, and different views (like these qualitative relations) are computed from it.
 <code> <code>
- rosmake ias_semantic_map + rosrun rosprolog rosprolog knowrob_map_data 
- rosrun rosprolog rosprolog ias_semantic_map+ ?- owl_parse('package://knowrob_map_data/owl/ias_semantic_map.owl'), 
 +    rdf_db:rdf_register_ns(ias_map, 'http://knowrob.org/kb/ias_semantic_map.owl#',  [keep(true)]).
 </code> </code>
  
-In this example, we are loading the ias_semantic_map package that provides a set of object instances, namely pieces of furniture in a kitchen. It already references the package comp_spatial which provides the computables for qualitative spatial relations. The map only consists of typed object instances at different locations. We can query for all objects that are on top of another, or for all objects that are on top of a specific object using the following queries:+In this example, we are loading the //ias_semantic_map// OWL file from the //knowrob_map_data// package that provides a set of object instances, namely pieces of furniture in a kitchen. It automatically loads the package //comp_spatial// that provides the computables for qualitative spatial relations. The map only consists of typed object instances at different locations. We can query for all objects that are on top of another, or for all objects that are on top of a specific object using the following queries:
 <code> <code>
  rdf_triple(knowrob:'on-Physical', Top, Bottom).  rdf_triple(knowrob:'on-Physical', Top, Bottom).
  rdf_triple(knowrob:'on-Physical', Top, ias_map:cupboard7).  rdf_triple(knowrob:'on-Physical', Top, ias_map:cupboard7).
 </code> </code>
-The computation is performed by the predicate on_Physical that is defined in the file comp_spatial.pl in the package comp_spatial+The computation is performed by the predicate //on_Physical// that is defined in the file //comp_spatial.pl// in the package //comp_spatial//.
- +
-===== Reading information from external sources ===== +
-Examples for loading information from external sources, like other ROS nodes, are given in the following packages: +
-  * comp_cop for reading information from the CoP perception system +
-  * tf_prolog reads coordinate transformations from tf +
- +
-Depending on the kind of information to be included, these interfaces need to be adapted, but the general principle should stay the same.+