Overview

The Launcher is a fully customizable tool for launching many kinds of distributed systems. The most notable features are:

Quick facts:

Users 

Projects should have a run-launcher.bat file in the root of the project; this starts the Launcher with the correct Master Profile (the profile with all the default options).

Each component can also be launched manually from its associated row (called "launch tool") using the "Launch" button.  Similarly, components can be killed individually with their specific "Kill" button.  The "Run Checked" launch or kill button, will launch or kill all components with a check in the check-box of their individual launch tool.  The "Kill All" button kills all the components (even the remote processes and the logger).

Notes:

Using the Launcher

Every project should start completely by clicking the Launch button in the Run It All section.  Note however, that there could be dependencies between modules that make certain modules start before others.  For instance, due to rendering issues, Unity may need to start after another component, such as AcquireSpeech, which can be added as a dependency in the Master Profile (explained in the section below).

The Run Checked "Launch" button will only launch selected modules and tools, as indicated by the check boxes next to each individual component.  The Run Checked "Kill" button will only kill the same selected modules, while the "Kill All" button will send out a message to all components with the request to exit. To change which modules and tools will be launched / killed check or uncheck the check-box in each launch tool prior to clicking the Run Checked "Launch" or "Kill" button.

Click the "Advanced" button to toggle between the advanced and simple view.  The simple view shows the Run It All group only.  The advanced view shows the list of all the components and tools that can be launched.  Use the advanced view to launch or kill components/tools individually and to make changes to a launch configuration.  A component's row in the Launcher turns green when that component is launched and responds through a message that it is online.  If the component fails to launch and/or respond, the row will turn orange.  Reset the color status by right-clicking on the component name and selecting 'Set as not Launched'.

Some modules offer parameter options from a pull-down menu.  SmartBody, for instance, offers the ability to select which sequence file to load.  Individuals may type in their own parameter values, which can then become part of the associated profile.  See below for more information on profiles.

In addition to predefined profiles, individuals can create their own profiles.  These can contain preferences, such as which components are checked or which parameters to use.  Unsaved changes will be part of the [Default] profile.  See below for more information on profiles.  To change component information right-click on the component name and select the Edit option.  New components can be added by similarly cloning an existing component.  This usually only works with the [Master Config].  See below for more information.  The View menu at the top of the Launcher offers several options to modify the interface, such as collapsing sections or parameters.  The Advanced menu offers the option to turnoff periodic component status check messages (Enable vrAllCall).  This might help when reviewing messages in the Logger.  Additionally, the Advanced menu offers the option of viewing the console, which shows the standard output of all components.

There are two important files associated with the launcher which are generated by the launcher:

Using Profiles

There are 3 types of profiles (all are xml documents).

There is also a "[Default]" profile, which is generated automatically based on the Master Profile.  Any changes made to the "[Default]" profile are saved. 

The Master Profile knows which folder to use for User Profiles.  To select a User Profile listed in the "Profiles" menu, click on its name.  The currently active profile has a circle next to its name in the menu, and it is also listed on the right side of the menu bar.

Example: To launch SmartBody with two different init files:

The Master Profile contains all of the information about how to launch SmartBody.  Create User Profile 1 which specifies for the SmartBody launch tool to use the first init file.  Create User Profile 2 which specifies for the SmartBody launch tool to use the second init file.  Both newly created profiles will now appear under the bottom separator of the Profile Menu; click to launch.   

Understanding Menu Items

 Profile Menu

"Save Profile"
This option saves the current values of the arguments in all launch tools to the selected profile.  This option is not available for the "[Default]" profile or any of the preloaded system profiles.

"Save As New Profile..."
Similar to the "Save Profile", this option saves the current values of the arguments in all launch tools, but instead of saving to an already created profile, it saves to a new one and prompts for a new name.  

All of the loaded profiles appear below the separator.  Click on the desired profile. 

Master Profile Menu

"Edit Launch Tools"

This menu contains many sub-menus for editing and/or launching tools.  See the Creating/Editing Launch Tools section.  This option is only available when the "[Default]" profile is selected.

"Change Ordering of Tabs & Groups..."

This brings up a window for reordering the tabs, groups, and launch tools from the GUI.  This option is only available when the "[Default]" profile is selected.

"Change Profiles Folder..."

This is for changing the location of the profiles folder for the currently loaded Master Profile to use.  This option is only available when the "[Default]" profile is selected.

"Open Master Profile..."

This is for selecting the Master Profile.  "Save Master Profile..." saves any changes to the Master Profile.  This option is only available when the "[Default]" profile is selected.

"Advanced" Menu


"Show Information..." 

Brings up a window that displays miscellaneous information such as how many programs are running, which profiles are loaded, etc.

"Show Console..."

Brings up a window that shows the console output, as the standard console is suppressed by default.

"Enable vrAllCall"

This enables/disables the pinging ability of the launcher which sends out vrAllCall messages at the specified interval.  If this is disabled, then the launcher won't be able to keep track of which programs are running.

"Change vrAllCall Frequency..."

Enables the ability to set the frequency of the vrAllCall messages mentioned above.  Range is from from 5 to 300 seconds.

"Force Kill..."

Brings up a window to force kill any programs that were started from the launcher on a local machine.

"File", "View", and "Help" Menus

File->Quit - Quit the Launcher

View->Show - Arguments will show/hide the argument combo boxes and re-size the window.

View->Expand -  All Groups will expand all of the groups.

View->Collapse - All Groups will collapse all of the groups.

View->Size -  To Fit will re-size the window to fit its contents.

Help->Show - Readme will display a dialog that contains a copy of the readme (which is almost exactly the same as this wiki page). This can be configured to be a different file by setting a different value in the ApplicationConfiguration.xml.  By default, the file is called - "Virtual_Humans_Launcher_Readme.txt".

Creating/Editing Launch Tools


Name: The name of the program to display on the Launcher.

Elvin Name: The name that the program uses for elvin messages.

Tab: The name of the tab that contains the launch tool.  To create a new tab, type in a new name and it will be created.

Group: The group that the launch tool is in.  To create a new group, type in a new group name and it will be created. 

Selected Machine: The default selected machine.

Type:

Checked: If selected, the check-box will be defaulted to be selected.

Mode: Set either the "Build" mode or the "SVN" mode for the launch tool.

File: The file that should be launched to run the program.  It will typically be an exe or a bat file.  Use the "Browse..." button and it will automatically put it in the correct format.

Parameters: These are the parameters that will be shown on the launcher.  Pre-set values are customizable.  The "+", "-", and "Edit" buttons are self-explanatory.

Click the "Cancel" button to cancel without keeping any changes.

Click the "Delete" button (only when editing) to delete the launch tool.

Click the "Accept" button (only when editing) to commit all changes.

Click the "Create" button (only when creating) to create the launch tool.

Be sure to save a new Master Profile to keep all changes.

Clicking on a Launch Tool


Left click on a launch tool's name label to display a small dialogue-like window that contains information about the launch tool such as its elvin name (vhmsg name), its arguments, etc. 

Right click to display the following menu items:

Launching a program locally

To launch a specific program locally, find the program on the Launcher and click on its pull-down list after "Machine:" to choose either "localhost" or the name of the local computer.  Click the "Launch" or "Kill" button to either launch or close the program locally.  If the program conforms to VHMsg messaging, its row on the Launcher will highlight in green when it is running. Note: If there is a VHMSG_SERVER environment variable, it must be set to "localhost" or the name of the local computer. 

Launching a program remotely

This is done the same as launching a program locally, except select the name of the remote computer from the "Machine:" pull-down list.  The remote computer must be running the RemoteApplicationLauncher on the same VHMSG_SERVER and VHMSG_SCOPE as the Launcher.  See the readme file for the RemoteApplicationLauncher for more details.  Make sure that the machine which runs the remote launcher has the environment variable VHMSG_SERVER, which should be set to the machine which is running the Launcher.  If not using remote launchers, this variable does not need to be set.

Launching and quitting multiple programs

To launch multiple programs, check the boxes next to the programs to be launched and click the top "Run Checked" green "launch" button.

To quit multiple programs, check the boxes next to the programs to be quit and click the top "Run Checked" red "quit" button.

To quit all running programs, click the top "Run Checked" red "quit all" button.  Note: This will quit all running programs whether or not their box is checked.

In addition, a Master Profile can be created to run other launch tools.  This will launch any program with a checked check-box.  If this is a first_wait type of program, it will honor the delay (see above about Creating/Editing Launch Tools).  Additionally, it will launch the programs on the machine that is selected in the machine argument of each launch tool.

Launching programs that do not conform to VHMSG messaging

If a launched/running program does not support VHMsg messages, its row will highlight in orange not green.  It will not respond to the "quit" or "quit all" buttons.  This program needs to be closed manually instead of from the launcher.  If the program is an exe, use the ElvinAppWrapper program which enable programs that do not support elvin messages to respond to the messages required by the Launcher.  For more details, go to the ElvinAppWrapper readme file.

VHMsg message protocol to work with the Launcher

The application needs to have an "elvin-name" (now called the "vhmsg-name") that it must use for sending and receiving messages.  Note that the application's "elvin-name" needs to match the Master Profile's "elvin-name" tag for that application’s launch tool.  An application will only partially work with the Java Launcher, if it does not send and receive the proper messages.  For more details about the messages go to the VHMsg page. 

Things to know

For more information,contact the vh-support@ict.usc.edu.

Developers

Setting up the Launcher for a new project

 @pushd ..\..\tools\launcher\VirtualHumansLauncher
 call run.bat ..\..\launch-scripts\profiles\master-config.xml
 @popd
 pushd tools\launch-scripts
 call run-<project_name>-launcher.bat
 @popd

Compiling the Launcher

Compile with either NetBeans or with ant.

Pre-Compiling:

  1. Go to \lib\vhmsg\vhmsg-java\ and look for je4util.jar.
    If it does not exist, compile it by navigating to that folder in a command prompt window and typing 'ant' (no quotes).  If that doesn't work, then install ant: http://ant.apache.org.
  2. Go to \lib\java\ and check if it contains nblibraries.properties, win-process\winp-1.9.jar, win-process\winp-1.9-javadoc.jar, and swing-layout\swing-layout-1.0.3.jar.
    If it does not exist, then the project cannot be compiled.
  3. Make sure that the environmental variable JAVA_HOME is set to your JDK folder before continuing.
    Check the value of JAVA_HOME by running the check-environmental-variables.bat file. If it is not defined, see the Pre-Running section for instructions on how to set it.

Compiling with NetBeans:

  1. The folder that this file is in (\VirtualHumansLauncher), is a NetBeans project folder.  Go to http://www.netbeans.org if NetBeans is not already installed.
  2. Run NetBeans and go to File->Open Project and select the folder.
  3. Click the button with the hammer picture on it (or Build->Build Main Project or F11).

Compiling with ant:

  1. Open a command prompt window and navigate to the \VirtualHumansLauncher folder.
  2. Type 'ant' (no quotes).

Message API

Sends:

Receives:

Known Issues

FAQ

See Main FAQ for frequently asked questions regarding the installer.  Please use the Google Groups emailing list for unlisted questions.