This page only list the old way to install hatponboard. |
This page describe how to install the main modules of HATP. To install the other modules please refer to their respective page (list here).
To produce HTN plans, HATP needs its core (called HATPOnboard) which in turn needs a library (called hatponboard-lib). To send plan requests to HATP and receive its answers the communication module is needed (called msgconnector).
This page uses the common way to give commands, the Appendix section summarises it.
<<TableOfContents: execution failed [list index out of range] (see also the log)>> |
A quick setup guide (working with robotpkg) can be found here.
Dependencies
HATP has external dependencies on:
- CMake
- boost
- pthread (or equivalent)
- Antlr 2.7.7
- (optionnaly) Doxygen
Those can be found on most package managers, alternatively they can be installed using robotpkg.
HATPOnboard, the core, depends on some HATP's main modules, namely:
- hatponboard-lib
- msgconnector
In order to install HATP's core it is important to first install those modules.
Prepare the main modules
There are three different ways to install HATP's main modules. The first uses robotpkg and is recommended since it makes everything easier. The second allows to install from archive (.tar.gz). And the last, from git repository, is for those who want to modify/improve it.
1. Using robotpkg (recommended)
robotpkg is a set of build and packaging tools, inspired by pkgsrc, designed to build and install OpenRobots packages.
To get complete documentation on how-to use robotpkg please refer to: http://robotpkg.openrobots.org/install.html.
As of now (March 2014) HATP's main modules are in robotpkg/wip: see http://robotpkg.openrobots.org/robotpkg-wip.html.
1.1. Install hatponboard-lib
cd <robotpkg>/wip/hatponboard-lib make update
1.2. Install msgconnector
This module is automatically installed if you install hatponboard-lib using robotpkg
The module responsilbe for communication, msgconnector, offers some bridges to other middleware:
- print-bridge : a simple text viewer (receiver)
openprs bridge: to communicate with the supervisor SHARY (needs mp-oprs, boost, libhatp)
- oro bridge: to communicate with the ontology server ORO (needs liboro, boost)
- yarp bridge: to communicate with a YARP module (needs yarp libs) [not tested]
To install one of those bridge alongside msgconnector, edit the file <openrobots>/etc/robotpkg.conf as follow.
PKG_OPTIONS.msgconnector+= <options>
The available options are yarp, liboro, openprs and print-bridge. The separator to specify several options is space ' '.
cd <robotpkg>/wip/msgconnector make update
2. From archive
This method uses the tar.gz archive of the modules.
2.1. Install hatponboard-lib
The archive is available at : http://www.openrobots.org/distfiles/hatponboard-lib/hatponboard-lib-LAST.tar.gz
tar -xzf hatponboard-lib-LAST.tar.gz cd hatponboard-<version_number> mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=<some/install/path>] make make install
N.B. You may need root privileges to do make install if you did not use the -DCMAKE_INSTALL_PREFIX
2.2. Install msgconnector
The archive is available at : http://www.openrobots.org/distfiles/msgconnector/msgconnector-LAST.tar.gz
To use one of the aforementioned bridge you must give it as option to CMake :
-DCOMPILE_BRIDGE_PRINT=ON to compile the print bridge
-DCOMPILE_BRIDGE_OPENPRS=ON to compile the openprs bridge
-DCOMPILE_BRIDGE_ORO=ON to compile the oro bridge
-DCOMPILE_BRIDGE_YARP=ON to compile the yarp bridge
tar -xzf msgconnector-LAST.tar.gz cd msgconnector-<version_number> mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=<some/install/path>] [<bridge_options>] make make install
N.B. You may need root privileges to do make install if you did not use the -DCMAKE_INSTALL_PREFIX
3. From the Git repository
As last solution you can prefer to install HATP from the Git repository to be up to date.
3.1. Install hatponboard-lib
git clone git://git.openrobots.org/robots/hatp/hatponboard-lib cd hatponboard-lib mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=<some/install/path>] make make install
N.B. You may need root privileges to do make install if you did not use the -DCMAKE_INSTALL_PREFIX
3.2. Install msgconnector
For the options about the msgconnector's bridges please see above.
git clone git://git.openrobots.org/robots/hatp/msgconnector cd msgconnector mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=<some/install/path>] [<bridge_options>] make make install
N.B. You may need root privileges to do make install if you did not use the -DCMAKE_INSTALL_PREFIX
Install HATPOnboard
Once both msgconnector and hatponboard-lib are installed it is possible to install the core, HATPOnboard.
git clone git://git.openrobots.org/robots/hatp/hatponboard cd hatponboard mkdir generated mkdir build cd build cmake .. [-DCMAKE_MODULE_PATH=<install/prefix>] or cmake .. [-DmsgconnectorROOT=<path/to/msgconnector/root>] [-Dhatponboarb-libROOT=<path/to/hatponboard-lib/root>]
If msgconnector and hatponboard-lib have been using robotpkg, you can then use the variable : -DCMAKE_MODULE_PATH and set it to the folder ${ROBOTPKG_BASE}/share/cmake/Modules.
The -DmsgconnectorROOT (resp. -Dhatponboard-libROOT) specifies the folder where CMake can find the files (header files and libraries) for msgconnector (resp. hatponboard-lib). It can be the Openrobots install directory (environment variable : ${ROBOTPKG_BASE}).
It is advised to install the two GUI tools: HATP/hatpconsole and HATP/hatptester.
To finish to set the environment, set the environment variable HATP_BASE. Can be done in your ~/.bashrc or by hand:
export HATP_BASE="<path/to/hatp>/hatponboard"
Once everything is setup up you should try to compile a domain to verify that your installation is correct. There are two options, (1) fully automatic using the parse script, (2) fully manual run. To run automatically, simply use:
./parse
and provide a domain and cost file when prompted.
To manually parse a domain you have to call:
cd <hatponboard> mkdir generated hatpparser <domain_file> <cost_file> generated/ cd build make [-j]
Appendix
The commands use the following rules:
things in [ ] are options you can use
things in < > must be replaced by the value that suits your configuration
For instance:
ls [-R] <some/path>
means you have to call either:
ls /home/username/
or
ls -R /home/username/