<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%=================================================================
\section{The aloghelm Tool}
%=================================================================
\label{sec_aloghelm}
\index{aloghelm!Overview}

The \app{aloghelm} tool provides a few handy ways of looking at helm activity
over the course of a given single alog file. This includes:

\begin{packed_itemize}
\item {\em Life Events}: Using the \var{--life/-l} option, every spawning
  or death of a behavior is sorted into a list of life events. Section
  \ref{sec_aloghelm_life}.

\item {\em Mode Changes}: Using the \var{--modes/-m} option, every helm mode
  change is sorted into a list of chronological entries. Section
  \ref{sec_aloghelm_modes}.

\item {\em Behavior States}: Using the \var{--bhvs/-b} option, every
  instance where a behavior changes states is recorded and sorted into
  a list of chronological entries. Section \ref{sec_aloghelm_bhvs}.

\end{packed_itemize}

\vspace{0.1in}
\noindent
In each mode, the user may additionally specify one or more MOOS variables to 
be interleaved in the report as they occur chronologically

%=================================================================
\subsection{The Life Events (--life) Option in the aloghelm Tool}
\label{sec_aloghelm_life}
\index{aloghelm!Life Events}

The {\em life events} option in \app{aloghelm} will scan the given alog
file for all life events, defined by the spawning or destruction of a
behavior instance. This information is posted by the helm in the
\mvar{IVPHELM\_LIFE\_EVENT} variable. Example output is show below:

\vspace{0.1in}
\begin{consoleverb}
 $ aloghelm file.alog --life
\end{consoleverb}

\begin{fileverb}
 Processing on file : henry.alog
 ++++++++++ (100,000) lines
 ++++++++++ (200,000) lines
 +++
 233,736 lines total.
 10 life events.
 
 
       ***************************************************
       *        Summary of Behavior Life Events          *
       ***************************************************
 
 Time    Iter  Event  Behavior      Behavior Type       Spawning Seed                 
 ------  ----  -----  ------------  ------------------  ------------------------------
  41.27     1  spawn  loiter        BHV_Loiter          helm_startup                  
  41.27     1  spawn  waypt_return  BHV_Waypoint        helm_startup                  
  41.27     1  spawn  station-keep  BHV_StationKeep     helm_startup                  
 316.78   995  spawn  ac_avd_gilda  BHV_AvoidCollision  name=avd_gilda # contact=gilda
 369.72  1191  death  ac_avd_gilda  BHV_AvoidCollision                                
 482.92  1601  spawn  ac_avd_gilda  BHV_AvoidCollision  name=avd_gilda # contact=gilda
 545.18  1833  death  ac_avd_gilda  BHV_AvoidCollision                                
 654.70  2228  spawn  ac_avd_gilda  BHV_AvoidCollision  name=avd_gilda # contact=gilda
 751.87  2591  death  ac_avd_gilda  BHV_AvoidCollision                                
 809.85  2799  spawn  ac_avd_gilda  BHV_AvoidCollision  name=avd_gilda # contact=gilda
\end{fileverb}
\vspace{0.1in}

\noindent
The actual output, by default, is color-code green for all spawnings
and black for all deaths. The color-coding can be turned off with the
additional command line argument \var{--nocolor}.

%=================================================================
\subsection{The Modes (--modes) Option in the aloghelm Tool}
\label{sec_aloghelm_modes}
%\index{aloghelm!Mode Changes}

The {\em modes} option in \app{aloghelm} will scan the given alog and report
all instances of a helm mode change. 

\begin{consoleverb}
$ aloghelm file.alog --modes
\end{consoleverb}

\begin{fileverb}
Processing on file : /Users/mikerb/henry.alog
====================================================
45.221 Mode: ACTIVE:LOITERING 
====================================================
92.687 Mode: ACTIVE:STATION-KEEPING 
====================================================
120.919 Mode: ACTIVE:LOITERING 
====================================================
386.632 Mode: ACTIVE:RETURNING 
====================================================
413.980 Mode: ACTIVE:LOITERING 
====================================================
558.254 Mode: ACTIVE:RETURNING 
====================================================
584.283 Mode: ACTIVE:LOITERING 
====================================================
663.162 Mode: ACTIVE:STATION-KEEPING 
====================================================
703.517 Mode: ACTIVE:LOITERING 
====================================================
766.938 Mode: ACTIVE:RETURNING 

233,736 lines total.
\end{fileverb}

\vspace{0.1in}
\noindent
Using the \var{--mode} option, it is sometimes helpful to augment the output
to include certain other variable postings, by simply naming the MOOS 
variable on the command line. The variables and mode changes will be 
presented on the screen in their chronological order. For example:

\vspace{0.1in}
\begin{consoleverb}
$ aloghelm file.alog --modes CONTACT_RESOLVED
\end{consoleverb}

\begin{fileverb}
Processing on file : /Users/mikerb/henry.alog
====================================================
45.221 Mode: ACTIVE:LOITERING 
====================================================
92.687 Mode: ACTIVE:STATION-KEEPING 
====================================================
120.919 Mode: ACTIVE:LOITERING 
373.392         CONTACT_RESOLVED     pHelmIvP:1190:ac_avd_gilda GILDA      
====================================================
386.632 Mode: ACTIVE:RETURNING 
====================================================
413.980 Mode: ACTIVE:LOITERING 
548.838         CONTACT_RESOLVED     pHelmIvP:1832:ac_avd_gilda GILDA 
====================================================
558.254 Mode: ACTIVE:RETURNING 
====================================================
584.283 Mode: ACTIVE:LOITERING 
====================================================
663.162 Mode: ACTIVE:STATION-KEEPING 
====================================================
703.517 Mode: ACTIVE:LOITERING 
755.509         CONTACT_RESOLVED     pHelmIvP:2590:ac_avd_gilda GILDA 
====================================================
766.938 Mode: ACTIVE:RETURNING 

233,736 lines total.
\end{fileverb}


%=================================================================
\subsection{The Behaviors Option in the aloghelm Tool}
\label{sec_aloghelm_bhvs}
\index{aloghelm!Behavior State Changes}

The {\em behaviors} option in \app{aloghelm} will scan the given alog
file taking note of all helm iterations where there is a change to one
or more of the four groups of (a) active, (b) running, (c) idle, or (d)
completed behaviors. Example output is show below:

\begin{consoleverb}
 $ aloghelm file.alog --bhvs
\end{consoleverb}

\vspace{0.1in}
\begin{fileverb}
Processing on file : henry.alog
====================================================
45.221 Mode: ACTIVE:LOITERING 
 - - - - - - - - - - - - - - - - - - - - - - - - - -
45.225    (1) Active:    loiter
45.225    (1) Running:   
45.225    (1) Idle:      waypt_return,station-keep
====================================================
92.687 Mode: ACTIVE:STATION-KEEPING 
 - - - - - - - - - - - - - - - - - - - - - - - - - -
92.689    (172) Active:    station-keep
92.689    (172) Running:   
92.689    (172) Idle:      loiter,waypt_return
====================================================
120.919 Mode: ACTIVE:LOITERING 
 - - - - - - - - - - - - - - - - - - - - - - - - - -
120.921    (274) Active:    loiter
120.921    (274) Running:   
120.921    (274) Idle:      waypt_return,station-keep
 - - - - - - - - - - - - - - - - - - - - - - - - - -
320.786    (995) Active:    loiter,ac_avd_gilda
320.786    (995) Running:   
320.786    (995) Idle:      waypt_return,station-keep
 - - - - - - - - - - - - - - - - - - - - - - - - - -
345.778    (1090) Active:    loiter
345.778    (1090) Running:   ac_avd_gilda
345.778    (1090) Idle:      waypt_return,station-keep
 - - - - - - - - - - - - - - - - - - - - - - - - - -
373.642    (1191) Active:    loiter
373.642    (1191) Running:   
373.642    (1191) Idle:      waypt_return,station-keep
373.642    (1191) Completed: ac_avd_gilda
====================================================
386.632 Mode: ACTIVE:RETURNING 
 - - - - - - - - - - - - - - - - - - - - - - - - - -
386.636    (1238) Active:    waypt_return
386.636    (1238) Running:   
386.636    (1238) Idle:      loiter,station-keep
386.636    (1238) Completed: ac_avd_gilda
====================================================
\end{fileverb}

\vspace{0.1in}
\noindent
In some cases, there is interest in a particular behavior in the this 
kind of output. To make it easier to visually parse, the \var{--watch=BHV}
option can be used to draw attention to each the particular behavior
changes state. Example output is shown below. The primary difference is
the \var{CHANGE} tag for each instance of a state change. In the terminal, 
such lines are also rendered in a different color.

\begin{consoleverb}
 $ aloghelm file.alog --bhvs --watch=loiter
\end{consoleverb}

\vspace{0.1in}
\begin{fileverb}
Processing on file : henry.alog
====================================================
45.221 Mode: ACTIVE:LOITERING 
 - - - - - - - - - - - - - - - - - - - - - - - - - -
45.225    (1) Active:    loiter             CHANGE
45.225    (1) Running:   
45.225    (1) Idle:      waypt_return,station-keep
====================================================
92.687 Mode: ACTIVE:STATION-KEEPING 
 - - - - - - - - - - - - - - - - - - - - - - - - - -
92.689    (172) Active:    station-keep
92.689    (172) Running:   
92.689    (172) Idle:      loiter,waypt_return             CHANGE
====================================================
120.919 Mode: ACTIVE:LOITERING 
 - - - - - - - - - - - - - - - - - - - - - - - - - -
120.921    (274) Active:    loiter             CHANGE
120.921    (274) Running:   
120.921    (274) Idle:      waypt_return,station-keep
 - - - - - - - - - - - - - - - - - - - - - - - - - -
320.786    (995) Active:    loiter,ac_avd_gilda
320.786    (995) Running:   
320.786    (995) Idle:      waypt_return,station-keep
 - - - - - - - - - - - - - - - - - - - - - - - - - -
345.778    (1090) Active:    loiter
345.778    (1090) Running:   ac_avd_gilda
345.778    (1090) Idle:      waypt_return,station-keep
 - - - - - - - - - - - - - - - - - - - - - - - - - -
373.642    (1191) Active:    loiter
373.642    (1191) Running:   
373.642    (1191) Idle:      waypt_return,station-keep
373.642    (1191) Completed: ac_avd_gilda
====================================================
386.632 Mode: ACTIVE:RETURNING 
 - - - - - - - - - - - - - - - - - - - - - - - - - -
386.636    (1238) Active:    waypt_return
386.636    (1238) Running:   
386.636    (1238) Idle:      loiter,station-keep             CHANGE
386.636    (1238) Completed: ac_avd_gilda
====================================================
\end{fileverb}


%=================================================================
\subsection{Command Line Usage for the aloghelm Tool}
\index{aloghelm!Command Line Usage}
\index{Command Line Usage!aloghelm}

\begin{consoleverb}
 $ aloghelm --help or -h
\end{consoleverb}

\vspace{0.1in}
\begin{listing}{Command line usage for the \app{aloghelm} tool}
\label{aloghelm_usage}
\scriptsize
\begin{verbatim}
   1  Usage: 
   2    aloghelm file.alog [OPTIONS] [MOOSVARS]       
   3                                                             
   4  Synopsis:                                                  
   5    Perform one of several optional helm reports based on    
   6    helm output logged in the given .alog file.              
   7                                                             
   8  Options:                                                   
   9    -h,--help     Displays this help message                 
  10    -v,--version  Displays the current release version       
  11    -l,--life     Show report on IvP Helm Life Events        
  12    -b,--bhvs     Show helm behavior state changes           
  13    -m,--modes    Show helm mode changes                     
  14    --watch=bhv   Watch a particular behavior for state change
  15    --nocolor     Turn off use of color coding               
  16    --notrunc     Don't truncate MOOSVAR output (on by default)
  17                                                             
  18  Further Notes:                                             
  19    (1) The order of arguments is irrelevent.                
  20    (2) Only the first specified .alog file is reported on.  
  21    (3) Arguments that are not one of the above options or an
  22        alog file, are interpreted as MOOS variables on which
  23        to report as encountered.                            
\end{verbatim}
\end{listing}
\normalsize
</pre></body></html>