## Set some parameters for the page #pragma section-numbers 2 #pragma keywords HATP, hatp, htn planning, hatpconsole, hatptester #pragma description Basic usage of HATP = HATP: Basic usage - OLD VERSION = || This page only list the old way to use HATP, to get an updated version please see [[HATP/run|here]] || This page present a basic set of commands to use HATP, for extended use of HATP please refer to the component's page (links [[#see_also|here]]) || <>|| '''If you need a quick setup guide please see [[#quick_setup|here]].''' == Basic run == === Automatic method === The automatic version takes care of starting all the modules properly. It relies on a script called `run` in the root of HATPOnboard. To start it simply call it, it will prompt several information: {{{ ./run }}} Here is an exemple of interraction: {{{ Please choose a domain file in the following list : 1 data/ArcasProject/arcas1.dom 2 data/ArcasProject/arcas2.dom 3 data/ArcasProject/arcas3.dom 4 data/ArcasProject/arcas4.back.dom 5 data/ArcasProject/arcas4.dom 6 data/ArcasProject/arcas5.back.dom 7 data/ArcasProject/arcas5.dom 8 data/ArcasProject/arcas6.back.dom 9 data/ArcasProject/arcas6.dom 10 data/ArcasProject/arcas7.dom 11 data/BeliefTest/bmTest.dom 12 data/CleanTheTable/clean1.dom 13 data/CleanTheTable/clean2.dom 14 data/CleanWithBelief/cleanBM.dom 15 data/DWR-shop2/dwr.dom 16 data/LibraryPR2/lib.dom 17 data/Tests/test2.dom 18 data/Tests/test.dom 19 data/UncoverTheToy/uncover.dom (to add a new line, add the .dom file in the HATPOnboard/data folder) Choice : [Enter to reuse : data/ArcasProject/arcas7.dom, 'F' to force rebuild] You chose : data/ArcasProject/arcas7.dom Please choose a cost file in the following list : 1 data/ArcasProject/arcas.cost 2 data/BeliefTest/bmTest.cost 3 data/CleanTheTable/clean.cost 4 data/CleanWithBelief/cleanBM.cost 5 data/DWR-shop2/dwr.cost 6 data/LibraryPR2/lib.cost 7 data/Tests/test.cost 8 data/UncoverTheToy/uncover.cost (to add a new line, add the .cost file in the HATPOnboard/data folder) Choice : [Enter to reuse : data/ArcasProject/arcas.cost] You chose : data/ArcasProject/arcas.cost ************** START HATP DOMAIN EXEC ************** Fact database initialization done. HTN description done. File for fact database initialization written. Files for HTN tasks written. Files for Belief Management written. File for HTN initialization written. File for social rules written. File for social rule base initialization written. User functions for costs copied. SUCCESS *************** END HATP DOMAIN EXEC *************** }}} {i} ''All the possible file are automatically detected as long as there are in `data` folder AND the have the right extension: either `.dom` or `.cost`.'' ''On the two line where you have an input to give, the script automatically proposes the choice used the previous time.'' '''Now everything should start.''' == Quick install guide == <> This guide is a shorter way to setup everything up, if you face any problem please refer to each module's install page. This guide is based on a robotpkg install, so robotpkg should be installed and working (see [[http://robotpkg.openrobots.org/install.html|here]]). Since all modules are still in robotpkg/wip, it should also be properlly installed (see [[http://robotpkg.openrobots.org/robotpkg-wip.html|here]]). ''If you are not used to install via commands, see the short summary in this [[HATP/install#appendix|Appendix]].'' === Install the needed modules === To install all the needed modules : {{{ cd /wip make update -C hatponboard-lib make update -C hatpconsole make update -C hatptester }}} ''It is assumed that everything is installed in `${ROBOTPKG_BASE}`.'' === Prepare the core === Once everything is installed it is necessary to prepare HATP before calling the run script. First download HATP: {{{ git clone git://git.openrobots.org/robots/hatp/hatponboard cd hatponboard mkdir build cd build cmake .. -DCMAKE_MODULE_PATH=${ROBOTPKG_BASE}/share/cmake/Modules/ }}} 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" }}} Finally test the installation on a domain: {{{ cd .. ./parse }}} '''The last command will ask you to select a domain and a cost file (like the run script would). If it fails to compile the chosen domain then a problem occured in the install process.''' == See also == <> For further detail on the different modules please refer to: * [[HATP/doc|hatponboard]] - HATP's core * [[HATP/hatpconsole]] - Plan viewer * [[HATP/hatptester]] - Plan-request sender * [[HATP/msgconnector]] - HATP's middleware