This page only list the old way to install and use hatptester, to get the current version of hatptester please see here |
<<TableOfContents: execution failed [list index out of range] (see also the log)>> |
Install hatptester
1. Prepare dependencies
hatptester depends on:
qt4
boost (thread, system and regex, log if enabled)
msgconnector (available in robotpkg, otherwise go to HATP/msgconnector 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.
2. Using robotpkg (recommended)
To install hatptester just do:
cd <robotpkg>/wip/hatptester make update
All missing dependencies will either :
- be reported if there are system dependencies
- or automatically installed if they exist in robotpkg.
hatptester logs many information in a log file if the option is selected, to do so add the following line to your ${ROBOTPKG_BASE}/etc/robotpkg.conf:
PKG_OPTIONS.hatptester+= enable-logger
3. From archive package
Install hatptester with archive package
The archive is available at : http://www.openrobots.org/distfiles/hatptester/hatptester-LAST.tar.gz
tar -xzf hatptester-LAST.tar.gz cd hatptester-<version> mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=<some/install/path>] [-DCMAKE_MODULE_PATH=<install/prefix>] [-DmsgconnectorROOT=<msgconnector/root/directory>] [-DENABLE_LOGGER=ON [-Dboost-logROOT=<boost-log/root/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 (msgconnector), you can directly use -DCMAKE_MODULE_PATH and set it to ${ROBOTPKG_BASE}/share/cmake/Modules.
If msgconnector is in a different folder then use the designated variable. The -DmsgconnectorROOT specifies the folder where CMake can find the files (header files and libraries) for msgconnector, it should be its root install directory. It can be the Openrobots install directory (environment variable : ${ROBOTPKG_BASE}).
The option ENABLE_LOGGER will activate the logging facility of hatptester. This allows to have a lot of information on its internal state. It depends on boost-log v1.1 to be installed, and may require that you provide the path the its install directory (note: it exists in robotpkg/devel/boost-log and is installed in ${ROBOTPKG_BASE}).
4. From GIT
You might want to improve the hatptester then get it from GIT:
git clone git://git.openrobots.org/robots/hatp/hatptester.git cd hatptester mkdir build cd build cmake .. [-DCMAKE_INSTALL_PREFIX=<some/install/path>] [-DCMAKE_MODULE_PATH=<install/prefix>] [-DmsgconnectorROOT=<msgconnector/root/directory>] [-DENABLE_LOGGER=ON [-Dboost-logROOT=<boost-log/root/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 (msgconnector), you can directly use -DCMAKE_MODULE_PATH and set it to ${ROBOTPKG_BASE}/share/cmake/Modules.
If msgconnector is in a different folder then use the designated variable. The -DmsgconnectorROOT specifies the folder where CMake can find the files (header files and libraries) for msgconnector, it should be its root install directory. It can be the Openrobots install directory (environment variable : ${ROBOTPKG_BASE}).
The option ENABLE_LOGGER will activate the logging facility of hatptester. This allows to have a lot of information on its internal state. It depends on boost-log v1.1 to be installed, and may require that you provide the path the its install directory (note: it exists in robotpkg/devel/boost-log and is installed in ${ROBOTPKG_BASE}).
Use hatptester
To start hatptester you need MsgServer (from msgconnector package) running but you also (and mainly) need hatponboard to be running. See how to start MsgServer.
Then you can call :
hatptester [<server_address>] [<server_port>]
For instance the default call is:
hatptester
N.B. The default value for the server address and port are respectively localhost and 5500.
hatptester looks like:
The left panel presents the list of all methods and actions that HATP extracted from the domain.
The right panel presents all the parameters for the chosen task. For each parameter the line gives its type, a "random" name and a spinner with all possible values for this parameter.
On the bottom-left the text gives informations:
- whether the request can be sent or not
- if the request can not be sent which parameters need to be set (using the random name aforementioned).
The bottom-right has two part, the line to set a time limit. This allows to stop HATP before it computes all the possible plans. The "Set" button is enabled as soon as a change is done to the time limit (toggle it or change its value).
Finally the bottom-right buttons allow to send the request. You can request either the first plan or all possible plans. If the button are disabled it means the request misses some parameters, see bottom-left panel to get more informations.
Logging facility
When compiled with the correct option (see above), hatptester logs its state during the execution. This allows to have a lot of information on its internal state.
The file is called logger.log and is created where hatptester is called.