Help Topic: Launching a Mission with pAntler


Maintained by: mikerb@mit.edu         Get PDF


Launching a Mission with pAntler


In theory a set of N MOOS applications may be launched from N terminal windows, but this is cumbersome in practice. The pAntler tool allows this to be done from a single mission file. In this file, a block of lines declares all the apps to be launched with one invocation of pAntler.

Where to get more information:

Basic pAntler Usage    [top]


The Antler block is typically the first configuration block in a .moos file, declared with ProcessConfig = ANTLER as below. The MSBetweenLaunches parameter specifies the number of milliseconds between launching processes. Each line thereafter specifies an app to be launched and whether a dedicated console window should be opened for the application.

 ProcessConfig = ANTLER
 {
   MSBetweenLaunches = 200

   Run = MOOSDB       @ NewConsole = true/false
   Run = AnotherApp   @ NewConsole = true/false
   ...
   Run = AnotherApp   @ NewConsole = true/false
 }

Further options exist beyond the vanilla launch configuration described above, including (a) the ability to launch a given app under an aliased name, (b) specifying command-line arguments to an app at launch time and more. See the documentation.

An Example: Launching the MOOSDB along with uXMS    [top]


In the example below we use pAntler to launch the MOOSDB and the uXMS scope from a single mission file. The user preferences for uXMS are provided in its configuration block. Type uXMS --example on the command line for further options if you're curious.

Your goals in this part are:

  1. Create a copy of the example mission file shown in Listing 1.1 below and save it locally as db_and_uxms.moos. (hint: the easiest way to do this is to just invoke the wget expression on the top line of this file. This will pull the file down from the server into your current directory.)

The mission may be launched from the command-line with:

 $ pAntler db_and_uxms.moos

This should open a new console window for uXMS displaying the variables posted by the DB, with the (S)ource and (T)ime columns expanded, but not the (C)ommunity column.

  1. Modify the uXMS configuration block in the .moos file to configure uXMS to keep a history of the DB_UPTIME variable. To see configuration options for uXMS, type:
 $ uXMS --example

Once you have launched uXMS with the new configuration, type 'z' to toggle in and out of history mode.

  1. Modify the db_and_uxms.moos file to launch a new terminal window for the MOOSDB in addition to the uXMS application.

Listing 1.1 - A simple mission file.

 // (wget http://oceanai.mit.edu/2.680/examples/db_and_uxms.moos)
 ServerHost = localhost
 ServerPort = 9000
 Community  = alpha

 ProcessConfig = ANTLER   
 {   
   MSBetweenLaunches = 200

   Run = MOOSDB     @ NewConsole = false
   Run = uXMS       @ NewConsole = true
 }

 ProcessConfig = uXMS
 {
   AppTick   = 4
   CommsTick = 4

   VAR            = DB_CLIENTS, DB_UPTIME, DB_TIME
   DISPLAY_SOURCE = true
   DISPLAY_TIME   = true
   COLOR_MAP      = DB_CLIENTS, red
 }

Page built from LaTeX source using texwiki, developed at MIT. Errata to issues@moos-ivp.org. Get PDF