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
Last revisionBoth sides next revision
doc:loading_files_and_ros_packages [2014/08/07 09:55] – [Loading files and ROS packages] admindoc:loading_files_and_ros_packages [2014/11/25 08:27] admin
Line 14: Line 14:
  owl_parse('path/to/file.owl').  owl_parse('path/to/file.owl').
 </code> </code>
 +
 +The OWL parser understands URLs of the form package:\/\/<pkg_name>/local/path/to/file.owl that are also used by the [[http://wiki.ros.org/resource_retriever|resource_retriever]] package in ROS and reference a file relative to a ROS package. You can use these URLs both for loading OWL files from Prolog and for imports in the head of an OWL file.
  
 =====  Loading Prolog modules  ===== =====  Loading Prolog modules  =====
Line 26: Line 28:
 KnowRob uses [[http://www.ros.org/wiki/rosprolog|rosprolog]] to interact with the ROS filesystem structure. This facilitates loading complex package structures since dependencies on other ROS packages with KnowRob components are automatically resolved and loaded. KnowRob uses [[http://www.ros.org/wiki/rosprolog|rosprolog]] to interact with the ROS filesystem structure. This facilitates loading complex package structures since dependencies on other ROS packages with KnowRob components are automatically resolved and loaded.
  
-In order to use this functionality, each ROS package containing KnowRob components needs to correctly define its dependencies on other packages (in the manifest.xml) and contain a file 'prolog/init.pl'. This file will be called by rosprolog in order to set up the package itself and to initialize all dependencies (again by calling their init.pl).+In order to use this functionality, each ROS package containing KnowRob components needs to correctly define its dependencies on other packages (in the package.xml) and has to contain a file 'prolog/init.pl'. This file will be called by rosprolog in order to set up the package itself and to initialize all dependencies (again by calling their respective init.pl).
  
 Each KnowRob ROS package can be loaded using the following predicate: Each KnowRob ROS package can be loaded using the following predicate:
Line 39: Line 41:
  
 =====  Exporting knowledge into OWL files  ===== =====  Exporting knowledge into OWL files  =====
-At some point, you may want to create OWL files. This can be done with the predicates in the 'owl_exportmodule in the 'knowrob_commonpackage:+At some point, you may want to create OWL files. This can be done with the predicates in the //owl_export// module in the //knowrob_common// package:
  
-<code>+<code prolog>
  % Export the perception of an object to an OWL file  % Export the perception of an object to an OWL file
  export_object(knowrob:'Drawer1', 'path/to/object.owl').  export_object(knowrob:'Drawer1', 'path/to/object.owl').