Ontologenius launchers

Ontologenius consists of two executables: the kernel and a graphical interface (ontoloGUI). While the first is mandatory, the only purpose of the latter is to quickly see the effect of queries.

Ontologenius core

Parameters

The following parameters are accepted by the core executable. The first three are required; root, robot_file, and human_file are exclusive to multi mode (see summary table below).

Required:

  • language: the language used by Ontologenius when dealing with names in natural language. It could be for example "en". This value can be modified during execution but must still be defined at launch.
  • intern_file: the OWL file that will be used to store the ontology of all the concepts present in Ontologenius when you stop it. If the file does not exist, it will be automatically created. If the file path does not exist, it will NOT be created. To don't use an internal file, you have to set this parameter to "none".
  • files: a set of OWL files that will be loaded at the launch of Ontologenius. If intern_file is set and already exists, these files will not be taken into account. Additionally, if the files import other files, the latter will be automatically loaded too.

Imported files can be Github URL, Gitlab URL, raw URL or local path. In all cases, Ontologenius will try to identify a ROS package in the paths and will use your local package if it exists.

Optional (single and multi mode):

  • config_file: the configuration file that will be used to configure the reasoners. To use the default configuration, you have to set this parameter to "none". See the configuration page to setup your file.
  • display: a boolean ("true" or "false") to enable or disable the trees representing the content of the loaded files. By default this parameter is set to true.
  • feeder_rate: the rate at which the feeder will process the ontologies. By default this parameter is set to 20.

Optional (multi mode only):

  • root: the name of the default instance representing the robot. This name can be retrieved through a query. By default, this parameter is set to none and no ontology is automatically launched.
  • robot_file: a single OWL file loaded at startup for the instance whose name contains the word "robot", or for the root instance if a root has been defined. If intern_file is set and already exists, this file will not be taken into account.
  • human_file: a single OWL file loaded at startup for all non-root instances when a root has been defined. If intern_file is set and already exists, this file will not be taken into account.

Either for the robot file or the human file, Ontologenius will automatically load the related imported files if some exist.

Parameter CLI flag(s) Default single multi
language-l / --langen
intern_file-i / --intern_filenone
files(positional)
config_file-c / --confignone
display-d / --displaytrue
feeder_rate-f / --feeder_rate20
root--rootnone
robot_file-r / --robotnone
human_file-h / --humannone

Single mode

Use the ontologenius_single executable. The minimal launch file:


<launch>
  <arg name="language" default="en"/>
  <arg name="intern_file" default="$(find ontologenius)/file_intern/ontologenius.owl"/>
  <arg name="files" default="
    $(find ontologenius)/files/attribute.owl
    $(find ontologenius)/files/colors.owl
    $(find ontologenius)/files/positionProperty.owl
  "/>
  <node name="ontologenius_core" pkg="ontologenius" type="ontologenius_single" output="screen" args="-l $(arg language) -i $(arg intern_file) $(arg files)"> </node>
</launch> 
            

To understand the difference between the files and the internal file, we have to consider two scenarios. When you start Ontologenius for the first time with these parameters, you are in case a). This means that the internal file does not exist at the moment or is empty. In this case Ontologenius will load the files listed in the files parameter.

Once you stop Ontologenius, the current knowledge will be saved in the internal file. So, when you run Ontologenius again, the internal file will exist and will not be empty this time. You will then be in case b) where the files listed will no longer be taken into account and only the internal file will be loaded.

All the ontologies listed in the files parameter can be considered as the basic knowledge of your agent and the internal file as his personal memory.

parameters overview

Multi mode

Use the ontologenius_multi executable. The minimal configuration is identical to single mode; only the executable name changes:


<launch>
  <arg name="language" default="en"/>
  <arg name="intern_file" default="$(find ontologenius)/file_intern/ontologenius.owl"/>
  <arg name="files" default="
    $(find ontologenius)/files/attribute.owl
    $(find ontologenius)/files/colors.owl
    $(find ontologenius)/files/positionProperty.owl
  "/>
  <node name="ontologenius_core" pkg="ontologenius" type="ontologenius_multi" output="screen" args="-l $(arg language) -i $(arg intern_file) $(arg files)"> </node>
</launch>
            

Since you will be able to manage multiple agents, you will have several internal files. Taking the above parameters and creating two bob and max agents, Ontologenius will produce two internal files: ontologenius_bob.owl and ontologenius_max.owl

For the rest of the mechanism, it will work as in single mode. This means that the files listed can be considered the common ground of all agents. Every time a new agent is created, he will be charged with that common ground.

Here below is an example of a full multi-mode launch file using all parameters:


<launch>
  <arg name="language" default="en"/>
  <arg name="intern_file" default="$(find ontologenius)/file_intern/ontologenius.owl"/>
  <arg name="config_file" default="$(find ontologenius)/configuration/config_example.yaml"/>
  <arg name="display" default="true"/>
  <arg name="feeder_rate" default="20"/>
  <arg name="root" default="pr2"/>
  <arg name="robot_file" default="$(find ontologenius)/files/ontologenius_robot.owl"/>
  <arg name="human_file" default="$(find ontologenius)/files/ontologenius_human.owl"/>
  <arg name="files" default="
    $(find ontologenius)/files/attribute.owl
    $(find ontologenius)/files/colors.owl
    $(find ontologenius)/files/positionProperty.owl
  "/>
  <node name="ontologenius_core" pkg="ontologenius" type="ontologenius_multi" output="screen" args="--root $(arg root) -l $(arg language) -c $(arg config_file) -i $(arg intern_file) -d $(arg display) -f $(arg feeder_rate) -r $(arg robot_file) -h $(arg human_file) $(arg files)"> </node>
</launch>
            

OntoloGUI

OntoloGUI is the Ontologenius GUI. Its only purpose is to help you develop applications using Ontologenius. It is not necessarily necessary to launch it and is presented in more detail here.


  <node name="ontologenius_gui" pkg="ontologenius" type="ontoloGUI" output="screen"> </node>
              

Launch files

Several launch files are already available to you and could be overload to change the default parameters. All launch files are available in XML for ROS1 and ROS2 as well as Yaml and Python for ROS2.

  • ontologenius_empty : ontologenius_core(single)
  • ontologenius_full : ontologenius_core(single) & ontologenius_gui
  • ontologenius_multi_empty : ontologenius_core(multi)
  • ontologenius_multi_full : ontologenius_core(multi) & ontologenius_gui
  • ontologenius : ontologenius_core(single)

Advanced use for ROS1

All launch files have an additional argument called tcmalloc_path which is used to locally set the LD_PRELOAD env variable in order to use custom allocators. If you prefer other allocator than tcmalloc (like jemalloc) tou can use the same argument.