Extended Example Missions with the IvPHelm
Maintained by: mikerb@mit.edu Get PDF
src: project-pavlab/chapters/chap_moos
1 Extended Example Missions with the IvP Helm
1.1 Preliminaries
1.2 Using pAntler to Launch Missions
1.3 Using the nsplug Utility for Configuring Mission and Behavior Files
1 Extended Example Missions with the IvP Helm
This section addresses a number of example mission configurations the user may run in simulation, to explore various aspects of the helm, certain behaviors, and certain tools for configuring, running and analyzing missions. All missions are available in the moos-ivp software tree in the following location:
$ cd moos-ivp/ivp/missions/
1.1 Preliminaries [top]
Each mission in the missions/ directory is contained in a dedicated subdirectory such as s1_alpha, or m2_berta. The 's' and 'm' in the prefix indicate whether it is a single-vehicle or multi-vehicle mission. The numbering roughly correlates to an increase in complexity from commonly used bread-and-butter behaviors and configurations to more complex mission configurations.
Each directory contains one or more mission files, i.e., files that end in the .moos suffix, and one or more behavior files, i.e., files that end in the .bhv suffix. During the course of running a mission, certain additional temporary files may be created. In all cases, the temporary files may be removed by running the clean.sh script included in each directory. The configuration and launching of the missions requires some familiarity with three tools, (a) pAntler, for launching multiple MOOS applications, (b) the nsplug tool, for building composite .moos and .bhv files from a template and set of include files, and (c) basics of shell scripts for organizing the overall launch process and cleanup. A brief recap of these three tools is covered next.
1.2 Using pAntler to Launch Missions [top]
The pAntler utility is a command-line tool used to orchestrate the launching of a group of MOOS processes. A typical invocation is:
$ pAntler charlie.moos
The MOOS file contains a configuration block for each process, and an Antler configuration block which is typically the first block in the file. Each block contains a collection of local ``parameter = value'' pairs read in by each individual application. There are also typically a number of global parameter=value pairs for possible use by all applications.
1.3 Using the nsplug Utility for Configuring Mission and Behavior Files [top]
In multi-vehicle missions, the maintenance of mission and behavior files across multiple vehicles can become cumbersome and user error-prone. Since many of the file components are identical between vehicles, a fair amount of the problem is mitigated by building the files from file template files that include the common components from separate files. The nsplug command-line utility is used to expand a template file into a target file, with arguments passed that typically distinguish the produced file from others produced from the same template. For example, two mission files, one for the vehicle "charlie", and one for the vehicle "frankie" may differ only in their vehicle names and IP Port number, and may be produced from a template file with the following two commands:
$ nsplug meta_vehicle.moos targ_charlie.moos VNAME=charlie PORT=9201 $ nsplug meta_vehicle.moos targ_frankie.moos VNAME=charlie PORT=9202
For the multi-vehicle example missions distributed with the moos-ivp tree and described in this section, this use of templates is used in all cases. The mission directories downloaded will not contain the nsplug "output" files such as targ_charlie.moos above. Rather, they are built by executing the launch scripts provided in each directory with a command such as:
$ ./launch.sh
The above invocation will both build the mission and behavior files and invoke pAntler for each vehicle to start the simulation. Certain common command-line options such as "./launch --just_build", to build the mission files without launching, are available in all scripts. A few conventions with respect to templates and nsplug are used across all example mission directories.
- Files used as templates have a "meta_" prefix.
- Files meant to be included or plugged into another template file have a "plug_" prefix.
- Output files that are built from templates and plug-ins via nsplug have "targ_" prefix.
- Template or plug-in files that contribute to a target MOOS file have ".moos" suffix.
- Template or plug-in files that contribute to a target Helm behavior file have ".bhv" suffix.
For example, in the m2_berta mission, the following files exist prior to building any target files and launching:
$ cd missions/m2_berta $ ls README launch.sh* meta_shoreside.moos plugs.moos clean.sh* launch_shoreside.sh* meta_vehicle.bhv init_field.sh* launch_vehicle.sh* meta_vehicle.moos
After building all the target files, the following additional targ_* files exist:
$ ./launch.sh --just_build $ ls README launch_vehicle.sh* targ_abe.bhv vcolors.txt clean.sh* meta_shoreside.moos targ_abe.moos vloiterpos.txt init_field.sh* meta_vehicle.bhv targ_ben.bhv vnames.txt launch.sh* meta_vehicle.moos targ_ben.moos vpositions.txt launch_shoreside.sh* plugs.moos targ_shoreside.moos vspeeds.txt
The mission may launched, with MOOSTimeWarp=10, by:
$ ./launch.sh 10
Document Maintained by: mikerb@mit.edu
Page built from LaTeX source using texwiki, developed at MIT. Errata to issues@moos-ivp.org. Get PDF