<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[onecolumn,letterpaper,11pt]{article}

%===================================================================
\input{common_latex/common_latex_packages}
\input{common_latex/common_latex_definitions}
\input{common_latex/common_latex_help_format}
%===================================================================

\begin{document}

\begin{labcover}
\labtitle{pAutoPoke: Automated Pokes for Headless Missions}
\vspace{0.1in}
\labdate{January 2025}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering}
\labauth{MIT, Cambridge MA 02139}
\labsrc{project-pavlab/appdocs/app\_pautopoke} 
\labtoc{small}
\end{labcover}

\wikidoc{file=IvPTools.PAutoPoke}
\wikidoc{auth=mikerb@mit.edu}

%===================================================================
\section{Overview}
%===================================================================
\label{sec_autopoke}

The \app{pAutoPoke} application is a tool to enable an automatic
poke to the MOOSDB with one or more configured publications. Typically
this is in service of conducting headless, auto-tested missions, where there
is no user to kick off a mission by hitting a "DEPLOY" button on a
command and control GUI, such as app{pMarineViewer}

\vspace{0.1in}
\begin{figure}[H]
  \centering 
  \includegraphics[width=0.55\textwidth]{figures/pautopoke_topology.png}
  \caption{{\bf Typical pAutoPoke Topology:} The flags configured for
    \app{pAutoPoke} are posted immediately after connecting to the
    MOOSDB. If configured to wait for vehicle connections, the
    \app{pShoreBroker} app will publish the number of connected
    vehicles in the variable \mvar{UFSB\_NODE\_COUNT}.}
\label{fig_pap_topology}
\end{figure}

%===================================================================
\section{Configuration Parameters for pAutoPoke}
%===================================================================
\label{sec_pap_params}

The \app{pAutoPoke} application may be configured with a configuration
block within a MOOS mission file, typically with a \var{.moos} file
suffix.  The following parameters are defined for \app{pAutoPoke}.

\vspace{0.15in}
\begin{listing}{Configuration Parameters for pAutoPoke}
\label{lst_pap_params}
\renewcommand{\arraystretch}{1.1}
\begin{longtable}{rp{0.76\textwidth}} 

  \pvar{flag}: &amp; A MOOS variable and value to be published. \\

  \pvar{required\_nodes}: &amp; The number of nodes required to be
  detected, before flags are published. By default this is zero.

\end{longtable}
\end{listing}

%===================================================================
\subsection*{An Example MOOS Configuration Block}

An example MOOS configuration block may be obtained from the command line
with the following:

\begin{consoleverb}
 $ pAutoPoke --example or -e 
\end{consoleverb}

\vspace{0.25in}
\begin{listing}{Example configuration of the pAutoPoke application}
\label{lst_pap_econfig}
\footnotesize
\begin{verbatim}
 1  =============================================================== 
 2  pAutoPoke Example MOOS Configuration                            
 3  =============================================================== 
 4                                                                  
 5  ProcessConfig = pAutoPoke                                       
 6  {                                                               
 7    AppTick   = 2                                                 
 8    CommsTick = 2                                                 
 9                                                                  
10    flag = MOOS_MANUAL_OVERRIDE_ALL=false                         
11    flag = DEPLOY_ALL=false                                       
12                                                                  
13    required_nodes = 2                                            
14  }                            
\end{verbatim}
\end{listing}
\normalsize
 
%===================================================================
\section{Publications and Subscriptions for pAutoPoke}
%===================================================================
\label{sec_pap_interface}

The interface for \app{pAutoPoke}, in terms of publications and 
subscriptions, is described below. This same information may also be
obtained from the terminal with:

\begin{consoleverb}
 $ pAutoPoke --interface or -i
\end{consoleverb}

%===================================================================
\subsection{Variables Published by pAutoPoke}
\label{sec_pap_pubs}

\begin{packed_itemize}[2]

\item \mvar{APPCAST}: Contains an appcast report identical to the
  terminal output. Appcasts are posted only after an appcast request
  is received from an appcast viewing utility. 
  
\end{packed_itemize}
  
%===================================================================
\subsection{Variables Subscribed for by pAutoPoke}
\label{sec_pap_subs}

The \app{pAutoPoke} application subscribes to the following MOOS
variables:

\begin{packed_itemize}[2]
\item \mvar{APPCAST\_REQ}: A request to generate and post a new
  apppcast report, with reporting criteria, and expiration. 
  
\item \mvar{DB\_RWSUMMARY}: A report generated by the MOOSDB listing,
  for each app connected to the MOOSDB, the set of variables subscribed for
  by each app, and the set of variables observed to be published by each
  app. 
\end{packed_itemize}

\vspace{0.1in}
\noindent
Node that \app{pAutoPoke} will also subscribe for all variables discovered
from the contents of \mvar{DB\_RWSUMMARY} publications. 

%===================================================================
\subsection{Command Line Usage of pAutoPoke}
\label{sec_pap_cmdline}

The \app{pAutoPoke} application is typically launched with pAntler, along
with a group of other modules. However, it may be launched
separately from the command line. The command line options may be
shown by typing:

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

\vspace{0.1in}
\begin{listing}{Command line usage for the pAutoPoke tool}
\label{pap_usage}
\footnotesize
\begin{verbatim}
  1  Usage: pAutoPoke file.moos [OPTIONS]             
  2                                                         
  3  Options:                                               
  4    --alias=&lt;ProcessName&gt;                                
  5        Launch pAutoPoke with the given process    
  6        name rather than pAutoPoke
  7    --example, -e                                        
  8        Display example MOOS configuration block         
  9    --help, -h                                           
 10        Display this help message.                       
 14    --interface, -i                                               
 15        Display MOOS publications and subscriptions.      
 16    --version,-v                                         
 17        Display the release version of pAutoPoke.  
 18    --web,-w                                                      
 19        Open browser to: https://oceanai.mit.edu/ivpman/apps/pAutoPoke
 20 
 21  Note: If argv[2] is not of one of the above formats 
 22        this will be interpreted as a run alias. This 
 23        is to support pAntler launching conventions.  
\end{verbatim}
\end{listing}
\normalsize

%===================================================================
\section{Terminal and AppCast Output}

Some useful information is published by \app{pAutoPoke} to the
terminal on every iteration. An example is shown in Listing
\ref{lst_pap_appcast} below. This application is also appcast enabled,
meaning its reports are published to the MOOSDB and viewable from any
uMAC application or \app{pMarineViewer}. The counter on the end of
line 2 is incremented on each iteration of \app{pAutoPoke}, and also
serves as a heartbeat indicator. The \var{"0/0"} also on line 2
indicates there are no configuration or run warnings detected.

\vspace{0.1in}
\begin{listing}{Example terminal or appcast output for \app{pAutoPoke}}
\label{lst_pap_appcast}

\footnotesize
\begin{verbatim}
  1  ==============================================================
  2  pAutoPoke shoreside                                    0/0(44)
  3  ==============================================================
  4  Required Nodes:2
  5  Flags: 
  6  [0]: MOOS_MANUAL_OVERRIDE_ALL=false
  7  [1]: DEPLOY_ALL=true
  8  
  9  Node Count:   2
 10  flags_posted: true
\end{verbatim}
\end{listing}
\normalsize

\vspace{0.1in}
\noindent
Lines 4-7 of the output show the user configuration. Lines 9 and 10
show the current state of the app. 

\end{document}

</pre></body></html>