welcome: please sign in
location: Diff for "HATP/hatptester-old"
Differences between revisions 1 and 2
Revision 1 as of 2016-07-28 13:35:43
Size: 4593
Editor: rlalleme
Comment: Create a page to keep the old install process
Revision 2 as of 2016-07-28 13:43:10
Size: 6465
Editor: rlalleme
Comment: Add the section about usage
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
= hatptester, the plan-request sender =
||<bgcolor="#FFAD56"> This page only list the old way to install hatptester, to get the current version of hatptester please see [[HATP/hatptester|here]] ||
= hatptester, the plan-request sender - OLD VERSION =
||<bgcolor="#FFAD56"> This page only list the old way to install and use hatptester, to get the current version of hatptester please see [[HATP/hatptester|here]] ||
Line 13: Line 13:
== Prepare dependencies == == Install hatptester ==

=
== Prepare dependencies ===
Line 26: Line 28:
== Using robotpkg (recommended) == === Using robotpkg (recommended) ===
Line 44: Line 46:
== From archive package == === From archive package ===
Line 71: Line 73:
== From GIT == === From GIT ===
Line 94: Line 96:


== Use hatptester ==

To start hatptester you need MsgServer (from msgconnector package) running but you also (and mainly) need '''hatponboard to be running'''. See [[HATP#startmsgconnector|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:

 . {{attachment:HATP/hatptester/hatptester.png|position=middle|width="700"}}

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.

hatptester, the plan-request sender - OLD VERSION

This page only list the old way to install and use hatptester, to get the current version of hatptester please see here

1. Install hatptester

1.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.

1.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

1.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}).

1.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}).

2. 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:

  • position=middle

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.

OpenrobotsWiki: HATP/hatptester-old (last edited 2016-07-28 13:43:10 by rlalleme)