|
Introducing ORO, the OpenRobots Ontology cognitive kernel
oro-server (or, in short, ORO) is a Java-based knowledge base for cognitive robotic applications. It is developped at the LAAS-CNRS, France and IAS-Technische Universität München, Germany by Séverin Lemaignan (<mailto:severin DOT lemaignan AT laas DOT fr>)
This page introduces the OpenRobots Ontology server ideas and features. The complete, up-to-date developers' documentation of oro-server can be found here]. Informations on this page are based on oro-server 0.7.2, as of February 2010.
Summary
What is ORO
Introducing a cognitive layer
Robots interacting with complex, human-inhabited, environments are expected to exhibit advanced cognitive skills: objects recognition, natural language interactions, task planning with possible dynamic replanning, ability to cooperate with other robots or humans, etc.
These functions, while being scientific challenges partially independent from each other, need to communicate, and thus to share a common representation of concepts of the world, to be effectively combined in a complete, autonomous, robotic system.
The oro-server project focuses precisely on the implementation of such a common description framework, along with a library of basic, reusable cognitive functions. This so-called cognitive kernel is actually build as a server that maps cognitive service to a ontology-based backend.
Amongst other features, these base cognitive functions include:
Easy addition or removal of statements on the world (ie, truths for the robot's model): add [aibo sees green_bottle],
Arbitrary complex queries, based on SPARQL]: find robots [?robots sees ?object, ?object hasShape cylinder] [?robot hasWeight > 100],
Classification, rules application, first logic order reasonning on the set of statements, through the Pellet] library.
Possibility to assign to statements memory profiles that cause the robot to forget such facts after a predefinied amount of time,
- Event system that triggers subscribed listeners, for instance when a fact becomes a true or a new object is discovered,
- Categorization skills to find similarities or differences between concepts,
- Explicit representation of other agents own world models (a bottle can be half full for the robot and half empty for another agent)
oro_architecture.png In practical terms, oro-server does mainly two things:
- it registers and connects a set of services (presumably related to robotic cognition) to a socket interface,
- it runs in the background several tasks to maintain the knowledge base.
It relies on RDF/OWL ontologies to represent an store knowledge and runs several active processes that offer, amongst other things, reasonning facilities, support for bio-inspired memory models, concepts of "cognitive events", categorization and explicit modeling of other agents.
Planned features include reinforcement learning, pro-active "curiosity" and mechanisms to handle cognitive conflicts (ie inconsistent chuncks of knowledge).
What can it be used for?
Upon these bricks, it possible to build semantic-aware layers and applications.
At the system level, such a cognitive kernel allows:
to formally and explicitely represent the "knowledge" of the robot. The concepts present at any time in the cognitive kernel define the close set of what the robot can make sense of (noting that this set can of course grow and evolve during an experiment lifetime).
to check on real time the logical consistency of this knowledge, and to determine possible sources of inconsistencies,
it provides inference mechanisms, such as inheritance of concept properties,
it offers a system-wide and exhaustive concept naming scheme that participates in overcoming the grounding issue by enabling heterogeneous components to share a common symbolic model,
it eases as well the process of matching and making sense of natural language interactions. First because the underlying backend ontology is rooted into human language (cf Wordnet, OpenCyc) and can associate human-intelligible labels to concept, then because it is possible to automatically retrieve synonyms (ie alternate labels) for the concepts known by the robot, which is useful to overcome expression difference when interacting with humans.
laas_current_semantic_scenarii.png At the application level, ORO enables to built semantic and context-aware components. Example of applications include:
[LIST TO BE UPDATED]
- link symbols to representation
- semantic projection
- spy game
Installation
Via `robotpkg`
The supported way to install oro-server is through robotpkg:
Robotpkg is a package management system for robotics module we use at the LAAS. It handles dependencies and compilation automatically. If you don't know it, have].
Once installed, you can add the oro-server package very easily:
> cd $ROBOTPKG_BASE/knowledge/oro-server > make update
- You're done!
From the sources
You can grab a snapshot of the sources on the public FTP: ftp://softs.laas.fr/pub/openrobots/oro-server/
Or, to get the latest version of oro-server, you can check-out the sources with GIT:
> git clone http://softs.laas.fr/git/robots/oro-server.git
To run the ontology server, you'll need Java JRE >= 1.6. The two only dependencies of oro-server are on Jena] >= 2.6.2 and Pellet] >=2.0.
By default, the Makefile expect following paths for these library:
$PREFIX/java/jena/lib $PREFIX/java/pellet/lib
You can override these defaults by setting the $JENA_LIBS and $PELLET_LIBS with your custom paths.
You can then compile it with:
> cd oro-server > make PREFIX=[your prefix] install > make PREFIX=[your prefix] install-doc
If everything went fine, a executable script called oro-server should have been created in $PREFIX/bin.
Before starting the server, you can tune the options in $PREFIX/etc/oro-server/oro.conf. In particular, check the path to the ontology you want to load is correctly set up. If you don't have yet any ontology to play with, grab a fresh] or check the OpenRobotsOntology] page on my Wiki.
The OpenRobots Common Sense ontology
The knowledge that the robot acquires need to be somehow connected to other chunks of knowledge to become actually useful (enabling inference, contextualisation, efficient querying, etc.). This requires a common-denominator for the overall knowledge structure: users of the knowledge base must agree on common identifiers to symbolize identical concepts. This is provided by a "upper" common-sense ontology that can be loaded at the server startup.
The common-sense ontology has its own page: OpenRobots Common Sense ontology.
`oro-server` features
The server features the complete range of basic knowledge management (like adding, removing or querying facts. Check [#index_of_available_methods]).
It supports as well a set of more advanced cognitive-related functions:
Alterite module
- The "Alterit�" (from French "otherness") module allows explicit representation of other agents with independant models of the world.
Categorization module
The "Categorization" module provides methods to extract similarities, differences and categories from a set of concepts. Several methods are offered, like discriminate that returns a list of properties that helps to differentiate individuals. For instance, let consider the following ontology, with four instances (plant1, animal1, animal2, animal3) :
+-------+ | Thing | +--,'.--+ .-' `-. ,' `. ,' `-. .-' `. +----+--+ +--+-----+ | Plant | | Animal | +---+---+ +--+++---+ | _,-" | `--.._ | .-' | ``--.. plant1 animal1 animal2 animal3 | | / `. \ | | / `-. \ hasColor eats eats hasColor hasColor | | | | | | | | | | green banana grass blue red
If the robot wants to answer an ambigious order like Give me the thing!, it needs a way to disambiguate the different possible individuals in the Thing class.
The discriminate method would return the most effective property to divide the set of instance (in this case, the robot may first ask for the type, and next, depending on the type, for the color or what it eats).
More details on the Categorization module and its algorithms here].
Events module
This module allows the registration of cognitive events that are triggered when some fact becomes true, or some new object appears.
Events are triggered by so-called Watchers
A watcher stores the type of event (cf below) along with the pattern (the form of the pattern depends on the type of event).
- Following type of events are currently implemented:
`FACT_CHECKING`
The watch pattern must be a partial statement. If, when evaluated, it returns true (ie, at least one asserted or inferred statement match the pattern), the event is fired.
`NEW_INSTANCE`
The event pattern for this type of event is first a variable and then a set of partial statement. The event is triggered when a new statement matches this set. The server return the list of instance bound to the variable.
Example
- Registration:
> registerEvent > NEW_INSTANCE > ON_TRUE > b > [?a desires ?b, ?a rdf:type Human]
- Add some facts:
> add > [ramses rdf:type Human, pyramidInauguration rdf:type StaticSituation, ramses desires pyramidInauguration]
- This would fire the event and return:
> event > [pyramidInauguration]
`NEW_CLASS_INSTANCE`
The event is triggered when a new instance of the class returned by the watch pattern is added. When the event is fired, the server send to the client the list of the new instances. This kind of event is a special, optimized version of NEW_INSTANCE for class instances.
Memory module
- The "Memory module" provides a memory management system that allows the robot to forget about facts after a while. Reinforcement learning is planned but not yet implemented as of December 2009.
Interfacing with ORO
ORO offers numerous way to interface, either through direct socket connection, language-specific bindings or robotics middleware abstractions.
The documentation is available on this page: Interfacing with ORO.
Extending ORO
Since version 0.7.2, it's very easy to extend ORO with you own plugins.
A complete tutorial is available on this page: Writing plugins for ORO.