## Set some parameters for the page #pragma section-numbers 2 #pragma keywords HATP, hatp, htn planning, hatpconsole, hatptester #pragma description HATP's install page = How to install HATP's core = || 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 ([[HATP#modules|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|Appendix section]] summarises it. || <>|| {i} '''A quick setup guide (working with robotpkg) can be found [[HATP/run#quick_setup|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 [[http://robotpkg.openrobots.org/install.html|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. === Using robotpkg (recommended) === `robotpkg` is a set of build and packaging tools, inspired by [[http://pkgsrc.se/|pkgsrc]], designed to build and install [[http://www.openrobots.org/wiki/OpenRobotsFrontPage|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]]. ==== Install hatponboard-lib ==== {{{ cd /wip/hatponboard-lib make update }}} ==== 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, [[HATP/libhatp|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 /etc/robotpkg.conf as follow. {{{ PKG_OPTIONS.msgconnector+= }}} The available options are `yarp`, `liboro`, `openprs` and `print-bridge`. The separator to specify several options is space ' '. {{{ cd /wip/msgconnector make update }}} === From archive === This method uses the tar.gz archive of the modules. ==== 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- mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=] make make install }}} ''N.B. You may need root privileges to do `make install` if you did not use the `-DCMAKE_INSTALL_PREFIX`'' ==== 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- mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=] [] make make install }}} ''N.B. You may need root privileges to do `make install` if you did not use the `-DCMAKE_INSTALL_PREFIX`'' === From the Git repository === As last solution you can prefer to install HATP from the Git repository to be up to date. ==== Install hatponboard-lib ==== {{{ git clone git://git.openrobots.org/robots/hatp/hatponboard-lib cd hatponboard-lib mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=] make make install }}} ''N.B. You may need root privileges to do `make install` if you did not use the `-DCMAKE_INSTALL_PREFIX`'' ==== 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=] [] 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=] or cmake .. [-DmsgconnectorROOT=] [-Dhatponboarb-libROOT=] }}} 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}`). {i} 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="/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 mkdir generated hatpparser 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] }}} means you have to call either: {{{ ls /home/username/ }}} or {{{ ls -R /home/username/ }}}