## Set some parameters for the page #pragma section-numbers 2 #pragma keywords HATP, hatp, htn planning, hatpconsole, hatptester #pragma description Homepage for HATP software, an open-source HTN task planner = hatpconsole, the plan dispalyer - OLD VERSION = || This page only list the old way to install and use hatpconsole, to get the current version of hatpconsole please see [[HATP/hatpconsole|here]] || This page presents hatpconsole, a module of HATP to display the plan found to a request. /!\ There are several methods to install hatpconsole, we advise you to use the robotpkg method. || <>|| {i} '''A quick setup guide (working with robotpkg) can be found [[HATP/run#quick_setup|here]].''' == Prepare dependencies == hatpconsole depends on: * '''qt4''' * '''boost''' (thread, system and regex) * '''libgvc''' (provided by the package libgraphviz-dev on most of common linux distributions) * '''msgconnector''' (available in robotpkg, otherwise go to [[HATP/msgconnector]] page to see how to install it) * '''libhatp''' (available in robotpkg, otherwise go to [[HATP/libhatp]] page to see how to install it) ''If you are not used to install via commands, see the short summary in this [[HATP/install#appendix|Appendix]].'' If you use robotpkg (see below and recommended solution) all dependencies are correctly tackled. == Install hatpconsole == === 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]]. To install hatpconsole just do: {{{ cd /wip/hatpconsole make update }}} All missing dependencies will either : * be reported if there are system dependencies * or automatically installed if they exist in robotpkg. === From archive package === Install hatpconsole with archive package The archive is available at : http://www.openrobots.org/distfiles/hatpconsole/hatpconsole-LAST.tar.gz {{{ tar -xzf hatpconsole-LAST.tar.gz cd hatpconsole- mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=] [-DCMAKE_MODULE_PATH=] [-DmsgconnectorROOT=] [-DlibhatpROOT=] make make install }}} ''N.B. You may need root privileges to do make install if you did not use the `-DCMAKE_INSTALL_PREFIX`'' ''N.B. If you encounter problems with Qt4 not being found, it is most likely due to QMake. You can specify its location using `-DQT_QMAKE_EXECUTABLE=`'' If you used '''robotpkg''' to install all HATP modules (libhatp and msgconnector), you can directly use '''`-DCMAKE_MODULE_PATH`''' and set it to '''${ROBOTPKG_BASE}/share/cmake/Modules'''. If the modules are in different folders then use separate variable. The `-DmsgconnectorROOT` (resp. `-DlibhatpROOT`) specifies the folder where CMake can find the files (header files and libraries) for msgconnector (resp. libhatp). It can be the Openrobots install directory (environment variable : ${ROBOTPKG_BASE}). === From GIT === You might want to improve the hatpconsole then get it from GIT: {{{ git clone git://git.openrobots.org/robots/hatp/hatpconsole.git cd hatpconsole mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=] [-DCMAKE_MODULE_PATH=] [-DmsgconnectorROOT=] [-DlibhatpROOT=] make make install }}} ''N.B. You may need root privileges to do make install if you did not use the `-DCMAKE_INSTALL_PREFIX`'' ''N.B. If you encounter problems with Qt4 not being found, it is most likely due to QMake. You can specify its location using `-DQT_QMAKE_EXECUTABLE=`'' If you used '''robotpkg''' to install all HATP modules (libhatp and msgconnector), you can directly use '''`-DCMAKE_MODULE_PATH`''' and set it to '''${ROBOTPKG_BASE}/share/cmake/Modules'''. If the modules are in different folders then use separate variable. The `-DmsgconnectorROOT` (resp. `-DlibhatpROOT`) specifies the folder where CMake can find the files (header files and libraries) for msgconnector (resp. libhatp). It can be the Openrobots install directory (environment variable : ${ROBOTPKG_BASE}). == Use hatpconsole == === Normal mode === To start hatpconsole you need !MsgServer (from msgconnector package) running. See [[HATP#startMsgServer|how to start MsgServer]]. Then you can call: {{{ hatpconsole [] [] }}} For instance the default call is: {{{ hatpconsole }}} ''N.B. The default value for the server address and port are respectively `localhost` and `5500`.'' hatpconsole looks like: . {{attachment:HATP/hatpconsole/hatpconsole.png|position=middle|width="700"}} The left panel is dedicated to the ontology requests, it displays all the value from the ontology server. The top-right panel, called "System messages" displays several informations from HATP. Like: * Invalid requests * The planning process to answer a plan request * ... Finally the bottom-right panel, "Plan result", is composed of three tabs: * The "Plan" tab shows the text plan almost as it is sent to the program that did the request. * The "Streams" tab displays all streams of the plan, affected to every agent of the system. Each colour represent a different agent. * The "Tree" tab gives the tree decomposition of the plan. The last two tabs use vectorial pictures where it is possible to zoom in and out to get more details. To have a better view over the plan you can get its content from the folder where you are running the hatpconsole. There should be two files: planStreams.svg and planTree.svg. The files are svg files (.dat extension for old version of hatpconsole) so you can display them with viewer programs (for instance Inkscape). === Minimal mode === To start hatpconsole you need !MsgServer (from msgconnector package) running. See [[HATP#startMsgServer|how to start MsgServer]]. Then you can call: {{{ hatpconsole [] [] --minimal }}} For instance the default call is: {{{ hatpconsole --minimal }}} ''N.B. The default value for the server address and port are respectively `localhost` and `5500`.'' The minimal mode outputs: . {{attachment:HATP/hatpconsole/hatpconsole_minimal.png|position=middle|width="700"}} The viewer shows the last computed plan and it is possible to zoom in and out.