Configuring the Ice runtime for the HRI lab course
--------------------------------------------------

(Modified 26/05/2010)

1. Download the runtime environment from
http://www6.in.tum.de/pub/Main/TeachingSs2010LabCourseHRI/hri-lab-course-runtime.zip

2. Make sure the following tools are installed:
  - Ice 3.2.1 (http://www.zeroc.com/), we can only give support for this older
    version of Ice, since JAST runs with this version. We made the experience that
    you can install different Ice versions in parallel without running into
    problems.
  - Java 1.5 or greater (http://java.sun.com/)

3. Set environment variables:
  - Make sure the Ice utilities and Java are in the system path
  - Set a variable ICE_HOME to point to the root of the Ice
    installation (i.e., $ICE_HOME/bin/slice2java should exist)
  - On Unix, make sure that LD_LIBRARY_PATH includes the Ice libraries if they're
  not in /usr/lib (i.e., include $ICE_HOME/lib in the path)


4. Create a directory for everything to be installed in (e.g., ${HOME}/jast).
   In what follows, we'll assume that you used ${HOME}/jast; adapt
   appropriately if you put it somewhere else.

5. Extract the runtime files from the zip file to ${HOME}/jast

6. Set the JAST_RUNTIME environment variable to ${HOME}/jast/runtime (or wherever
you put the runtime).

7. Copy the JAST Ice interfaces from the folder "slice" in the zip file in
whatever directory you want.

8. Set the JAST_ICE_DIR variable to wherever you copied the ice interfaces to.


You're now ready to run things! To start the runtime up, you need to do the
following:

1. Make sure that the JAST_RUNTIME (and ICE_HOME) variables are set properly
   as described above.

2. Start the IceGrid registry:
   - cd ${JAST_RUNTIME}
   - icegridregistry --Ice.Config=config/config.grid

3. Start the IceGrid node (in another window; leave the registry alone):
   - cd ${JAST_RUNTIME}
   - icegridnode --Ice.Config=config/config.localhost

4. Start the IceGrid GUI (in yet another window):
   - cd ${JAST_RUNTIME}
   - java -jar ${ICE_HOME}/bin/IceGridGUI.jar --Ice.Config=config/config.grid

5. If you use Windows, you can also use the batch scripts we packaged with the
runtime environment.

6. Set up the IceGrid runtime to run servers:
   - Start up the registry, node, and GUI as described above
   - In the IceGrid GUI, choose "File - Login"
   - In the IceGrid GUI, choose "File - Open application from file"
   - Browse to the ${JAST_RUNTIME}/config directory and select
     "hri-labcourse-config.xml"
   - Choose "File - Save to registry"

7. Start the servers in the GUI (for example speech recognition):
  - In the GUI, choose the "Live Deployment" tab and open the "localhost"
    node
  - Right click on "SpeechRecognizer" and choose "start" 
  - In the window that pops up you can now type sentences which are then sent
  over IceStorm
  - Speech recognition will print out an error message when you start it,
    this is because it cannot find the actual speech recognition program