This is an old revision of the document!
KnowRob installation
KnowRob is available as part of the ROS robot middleware and has been included in the official ROS distribution since ROS Diamondback. Before installing KnowRob, you will need install ROS following the instructions at http://www.ros.org/wiki/ROS/Installation.
Installation from binary packages on Ubuntu Linux
There are pre-built .deb packages for Ubuntu Linux in the ROS repository. They are normally built only once per ROS distribution and are therefore stable, but not the most up-to-date version.
After adding the ROS repository to your sources.list as described here, you can install KnowRob using
sudo apt-get install ros-fuerte-knowrob
For future releases, replace 'groovy' with the respective distribution code name (e.g. 'hydro'). All dependencies are automatically resolved and installed by the Ubuntu package manager.
Installation from source
If you are not using Ubuntu or would like to use the latest KnowRob version, you can install the system from source. We have prepared different .rosinstall setup files that you can add to your ROS workspace as described here.
Basic KnowRob installation
rosws merge https://raw.github.com/knowrob/knowrob/master/rosinstall/knowrob-base.rosinstall rosws update rosdep install knowrob rosmake knowrob
KnowRob system including tutorials
rosws merge https://raw.github.com/knowrob/knowrob/master/rosinstall/knowrob-tutorial.rosinstall rosws update rosdep install knowrob rosmake knowrob
Complete system including add-on packages
rosws merge https://raw.github.com/knowrob/knowrob/master/rosinstall/knowrob-all.rosinstall rosws update rosdep install knowrob rosmake knowrob
Developer setup (requires access to private repositories)
rosws merge https://raw.github.com/knowrob/knowrob/master/rosinstall/knowrob-dev.rosinstall rosws update rosdep install knowrob rosmake knowrob
You are now done with the KnowRob installation. Have a look at the Getting started guide for some hints how to proceed.
Installation on other platforms
Ubuntu Linux is the only officially supported platform, though installation from source should work without problems on other Linux distributions. If there are no rosdep rules for your platform, have a look at the rosdep.yaml file in the knowrob folder to see a list of programs that need to be installed and install the packages yourself.
In principle, installation in MacOS and Windows should also be possible (at least all dependencies are available), but there is no support. If you succeed in installing the system on one of these platforms, please notify the KnowRob developers.
Workspace setup
It is recommended to add the following to your ~/.plrc file to get a global command history for the Prolog shell:
rl_write_history :- expand_file_name("~/.pl-history", [File|_]), rl_write_history(File). :- ( current_prolog_flag(readline, true) -> expand_file_name("~/.pl-history", [File|_]), (exists_file(File) -> rl_read_history(File); true), at_halt(rl_write_history) ; true ).
If you use Java code (which several KnowRob packages do), you may need to set the JAVA_HOME and SWI_HOME_DIR environment variables, e.g. by adding these lines to your ~/.bashrc file:
export JAVA_HOME=/usr/lib/jvm/default-java export SWI_HOME_DIR=/usr/lib/swi-prolog
Add-on packages
Several tools and additional packages exist that extend the core KnowRob stack with different kinds of functionality. While we try to keep the core stack as small and general-purpose as possible, the packages listed in the following sections provide more specific functionality. They are all part of the 'knowrob-all' installation.
KnowRob tutorials
There are tutorials for different parts of the system in the documentation section. The corresponding source code can be found here:
git clone https://github.com/knowrob/knowrob_tutorials.git
Semantic Map editor
This graphical editor facilitates the creation and modification of semantic maps. Users can easily create, delete and modify object instances.
git clone https://github.com/knowrob/knowrob_gui.git
Import of natural-language Web instructions
The package comp_ehow provides methods for converting natural-language task instructions into the format used in KnowRob. It employs a combination of statistical parsing, disambiguation and ontological concept resolution.
git clone https://github.com/knowrob/knowrob_addons.git
Simple dialog system
The mod_dialog package realizes a simple dialog system that allows interaction with the knowledge base using simplified natural language. Each question type is handled by a Java class that translates a natural-language string into a Prolog query and generates some natural-language output from the result. The package further contains a simple speech recognition node implemented using the Sphinx speech recognizer.
git clone https://github.com/knowrob/knowrob_addons.git
Tools for analyzing observations of human activities
A few tools for the analysis of observations (motion tracking data) of human activities can be found in the knowrob_human repository. While not as generally usable as the main KnowRob stack, it may be useful for some people.
git clone https://github.com/knowrob/knowrob_human.git
Related software
CRAM
The Cognitive Robot Abstract Machine (CRAM) is a software toolbox for the design, the implementation, and the deployment of cognition-enabled autonomous robots performing everyday manipulation activities. KnowRob is used as knowledge base that provides the robot executive with question-answering capabilities.
RoboEarth
RoboEarth is a European research project that investigates how robots can exchange knowledge via a web-based platform, similar to the way humans exchange knowledge via Wikipedia. KnowRob serves as local knowledge base on the robots, and representations from KnowRob are used for describing the exchanged information.
ProbCog: statistical relational learning library
ProbCog is a statistical relational learning and reasoning system that supports efficient learning and inference in relational domains. It provides an extensive set of open-source tools for both undirected and directed statistical relational models. ProbCog can read evidence from KnowRob, and can be called from KnowRob via Prolog predicates. Have a look at the mod_probcog package for details on the interface.
Labeling tool for human activities
This GUI program facilitates the annotation of observations of human actions. It can load videos and sequences as still images and offers different options for creating annotations. As output, it can generate different annotation file formats that describe what the observed subject is doing.
git clone https://github.com/knowrob/data_labeling_tool.git