Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The missions are stored separate from the code in the hovergroup/missions directory and uses the following structure:

Code Block
↓hovergroup
  ↓missions
    ↓baseline
    ↓resources
      →config
      →data
      →plugs

Resources

The sub-folders here contain resources that are used to build complete mission files.  

config

Here you'll find two configuration for each vehicle, such as kestrel.def and kestrel_options.def, as well as a configuration file for the shoreside, shoreside.def.  

kestrel.def - Static configuration options for each vehicle, including IP address, port numbers, and serial port configuration.  These same values should always be used.  

kestrel_options.def - Dynamic configuration options, such as speed, accoms id, and rudder offset.  You may wish to use different values to suit your mission.  

shoreside.def - configuration information used by the shoreside to communicate with each vehicle.  The vehicle missions also use this file to get the shoreside's contact info.  

Host IP address definitions are enclosed in #ifndef macros so that they can be overwritten when launching a simulation.  The variable SIMULATION will only be defined when running in a simulation if you wish to make your own macros.  

data

For pMarineViewer backgrounds and .info files.  

plugs

Plugs for the various applications.  These are included in meta moos files to build complete mission files.  These may include macros such as $(MODEMPORT) to be populated when the final mission file is built.  Some applications may have separate plugs for vehicle and shoreside use.  

Baseline

Here you'll find separate launch scripts for icarus, shoreside, and the vehicles.  Similarly they have separate meta moos files.  Icarus does not support simulation currently, and there is a separate simulation moos file for the vehicles.  The shoreside does not require a separate simulation moos file.  Finally there is a meta behavior file.  

Launch script options:

--help, -h
Show help and exit. 

--justbuild, -j
Build, but do not launch.  Useful for debugging.   

--sim
Run in simulation on localhost.   

--nostromo, --silvana, --kestrel
Required when launching vehicles to specify which vehicle to launch.   

Launching a Simulation

Code Block
./launch_shore.sh --sim
./launch_vehicle.sh --nostromo

You can find the web status viewer by opening localhost:8080 in your browser.  

This page describes the organization of the new missions directory located in ivp-extend/missions and how the files there should be used when creating your own mission. The new arrangement should make it easier for all missions to share some common plugs and configuration parameters, reducing the need to update multiple missions when serial ports change, etc.

trunk

This is the main missions directory, where the standard missions, plugs, and configurations are stored.

plugs

Default plugs for shore, vehicle, and simulation are located in this directory. Meta files should include plugs from this directory to easily inherit any changes.

config

There are just two files in this directory, "hard_config" and "soft_config". These are not MOOS files, but standard bash files that should be sourced by the launch script. hard_config includes definitions for IP addresses, port number, serial ports, and other 'hard' configuration parameters. All missions should use this file.

soft_config includes 'soft' configuration parameters such as return locations, rudder offsets, and cruise speeds. These are parameters you may want to change in your own missions, in which case you should either rewrite these parameters in your own launch script or include your own copy of this file.

baseline mission

Located in the baseline folder, the mission consists of the meta moos files, meta behavior files, and launch scripts.  

How it works

If you look at one of the launch script you should typically see the following steps:

  1. Source the hard and soft config files to pull in those configuration variables
  2. Read command line options, such as which vehicle is to be launched
  3. Check options for errors and make sure all required options are set.
  4. Run nsplug on the meta file (.moos or .bhv), and pass it all the variables to be set in the files
    1. nsplug will first copy into the meta file the contents of any include statements
    2. second, nsplug will attempt to fill any variable placeholders with the values passed to it by the script
  5. launch!

Make your own

Start your own mission by copying the baseline mission into your own folder in the missions directory. Rename it to something else, and make whatever changes are necessary. You can make your own plugs to replace the defaults as well and save them anywhere in your folder, as long as the include paths in the meta moos file are appropriately modified.  Some other suggestions/guidelines:

...