This page only list the old way to install and use hatpconsole, to get the current version of hatpconsole please see 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.
<<TableOfContents: execution failed [list index out of range] (see also the log)>> |
A quick setup guide (working with robotpkg) can be found 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 Appendix.
If you use robotpkg (see below and recommended solution) all dependencies are correctly tackled.
Install hatpconsole
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.
To install hatpconsole just do:
cd <robotpkg>/wip/hatpconsole make update
All missing dependencies will either :
- be reported if there are system dependencies
- or automatically installed if they exist in robotpkg.
2. 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-<version> mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=<some/install/path>] [-DCMAKE_MODULE_PATH=<install/prefix>] [-DmsgconnectorROOT=<msgconnector/root/directory>] [-DlibhatpROOT=<libhatp/directory>] 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=<path/to/qmake>
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}).
3. 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=<some/install/path>] [-DCMAKE_MODULE_PATH=<install/prefix>] [-DmsgconnectorROOT=<msgconnector/root/directory>] [-DlibhatpROOT=<libhatp/directory>] 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=<path/to/qmake>
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
1. Normal mode
To start hatpconsole you need MsgServer (from msgconnector package) running. See how to start MsgServer.
Then you can call:
hatpconsole [<server_address>] [<server_port>]
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:
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).
2. Minimal mode
To start hatpconsole you need MsgServer (from msgconnector package) running. See how to start MsgServer.
Then you can call:
hatpconsole [<server_address>] [<server_port>] --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:
The viewer shows the last computed plan and it is possible to zoom in and out.