Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
loading_files_and_ros_packages [2012/12/01 10:43] – [Loading OWL files] tenorth | loading_files_and_ros_packages [2012/12/01 10:44] – [Loading OWL/Prolog files in ROS packages] tenorth |
---|
OWL files need to be parsed to be [[http://www.swi-prolog.org/pldoc/package/semweb.html|internally represented as Prolog triples]]. Parsing is done using the [[http://www.semanticweb.gr/thea/index.html|Thea library (version 0.5)]]. The following command can be used to load an OWL file: | OWL files need to be parsed to be [[http://www.swi-prolog.org/pldoc/package/semweb.html|internally represented as Prolog triples]]. Parsing is done using the [[http://www.semanticweb.gr/thea/index.html|Thea library (version 0.5)]]. The following command can be used to load an OWL file: |
| |
<code prolog> | <code> |
owl_parse('path/to/file.owl', false, false, true). | owl_parse('path/to/file.owl', false, false, true). |
</code> | </code> |
===== Loading Prolog modules ===== | ===== Loading Prolog modules ===== |
Most functionality in KnowRob is contained in [[http://www.swi-prolog.org/pldoc/doc_for?object=section%281,%275%27,swi%28%27/doc/Manual/modules.html%27%29%29|Prolog modules]]. They can be loaded using the use_module directive. The module needs to be either somewhere in the Prolog 'library' path or be referenced relative to the current working directory: | Most functionality in KnowRob is contained in [[http://www.swi-prolog.org/pldoc/doc_for?object=section%281,%275%27,swi%28%27/doc/Manual/modules.html%27%29%29|Prolog modules]]. They can be loaded using the use_module directive. The module needs to be either somewhere in the Prolog 'library' path or be referenced relative to the current working directory: |
<code prolog> | <code> |
use_module(library('module-name')). | use_module(library('module-name')). |
use_module('path/to/module-name'). | use_module('path/to/module-name'). |
| |
Each KnowRob ROS package can be loaded using the following predicate: | Each KnowRob ROS package can be loaded using the following predicate: |
<code prolog> | <code> |
register_ros_package('pkg-name'). | register_ros_package('pkg-name'). |
</code> | </code> |