<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\section{Preliminaries: Code and Mission Files}
%====================================================================

The Autonomous Rescue Labs involve four codebases. This is generally
how things are intended to be: a user's working project codebase will
consist of (a) read-only code in the public domain (b) beta or limited
release read-only code, and (c) the user's development code with R/W
access. For this lab, the codebases are:

\begin{packed_itemize}
\item \var{moos-ivp}: read-only code in the public domain
\item \var{moos-ivp-pavlab}: read-only limited-release code for Herons
  and Pavlab research group. (Heron specific code and a couple of limited-release
  behaviors useful to the Autonomous Rescue Lab).
\item \var{moos-ivp-2680}: read-only limited-release code for MIT 2.680
  Marine Autonomy, Sensing and Communications. (The Autonomous Rescue mission
  folder and the \app{uFldRescueMgr} and \app{gen\_swimmers} apps needed
  for shoreside missions.
\item \var{moos-ivp-extend}: Un-released student project code, with
  read/write access for the student. (The student \app{pGenRescue}
  and any student behaviors.)
\end{packed_itemize}

\vspace{0.1in}
\noindent
The following steps should be done at the start of each lab since to
ingest code and mission changes that occur during the course of the
labs. Although \var{moos-ivp} may not change much or at all during the
course of the lab, it is possible. The content of the
\var{moos-ivp-pavlab} and \var{moos-ivp-2680} trees are very likely to
have fixes or improvements during the course of the lab sequence.

\vspace{0.1in}
\noindent
{\bf Note:} The trees need to be downloaded and kept up-to-date on
both your laptop (for testing and simulation development) and on the
PABLO.

%---------------------------------------------------------------------
\subsection{Getting Code onto Your Laptop and PABLO}

If you don't have the \var{moos-ivp}, \var{moos-ivp-pavlab},
\var{moos-ivp-2680} trees on your laptop and PABLO, here are the URLs
for downloading them. They should all be downloaded into the same
folder, e.g., the user's home folder.

\subsubsection{Getting or Updating moos-ivp:}

This tree needs to be on both your laptop and the PABLO. Since this
is the core autonomy codebase, it is very likely already there, but
still needs to be checked for updates.

\vspace{0.1in}
\noindent
Getting the code:

\vspace{0.1in}
\begin{consoleverb}
$ cd
$ svn co https://oceanai.mit.edu/svn/moos-ivp-aro/trunk moos-ivp
$ cd moos-ivp
$ ./build-moos.sh
$ ./build-ivp.sh
\end{consoleverb}
\vspace{0.1in}

\noindent
Updating the code:

\vspace{0.1in}
\begin{consoleverb}
$ cd ~/moos-ivp
$ svn update
$ ./build-moos.sh
$ ./build-ivp.sh
\end{consoleverb}
\vspace{0.1in}

\noindent
Note: On the PABLO, when you build the code, the build scripts should
automatically detect that you are building on a RasPi and will offer
to perform a "minimal" build.  For example there is no reason to have
\app{pMarineViewer} on your PABLO. Go ahead an accept the minimal
build when prompted.

%--------------------------------------------------------------------
\subsubsection{Getting moos-ivp-pavlab:}

This tree needs to be on both your laptop and the PABLO.

\vspace{0.1in}
\noindent
Getting the code:

\vspace{0.1in}
\begin{consoleverb}
$ cd
$ svn co https://oceanai.mit.edu/svn/moos-ivp-pavlab-aro/trunk moos-ivp-pavlab
$ cd moos-ivp-pavlab
$ ./build.sh
\end{consoleverb}
\vspace{0.1in}

\noindent
If you already have this tree, then update it:

\vspace{0.1in}
\begin{consoleverb}
$ cd ~/moos-ivp-pavlab
$ svn update
$ ./build.sh
\end{consoleverb}
\vspace{0.1in}

%--------------------------------------------------------------------
\subsubsection{Getting moos-ivp-2680:}

This tree needs to be on both your laptop and the PABLO. 

\vspace{0.1in}
\noindent
Getting the code:

\vspace{0.1in}
\begin{consoleverb}
$ cd 
$ svn co https://oceanai.mit.edu/svn/moos-ivp-2680-aro/trunk moos-ivp-2680
$ cd moos-ivp-2680
$ ./build.sh
\end{consoleverb}
\vspace{0.1in}

\noindent
If you already have this tree, then update it:

\vspace{0.1in}
\begin{consoleverb}
$ cd ~/moos-ivp-2680
$ svn update
$ ./build.sh
\end{consoleverb}
\vspace{0.1in}

\vspace{0.1in}
\noindent
Note: on the PABLO the only thing you need is the mission folder. The code
does not need to be built.

%---------------------------------------------------------------------
\subsection{Update Your Shell Path and Behavior Path}

Your shell path on {\em both} your laptop and PABLO should be
augmented. The below lines in your \var{.bashrc} should do it:

\vspace{0.1in}
\begin{fileverb}
PATH+=:~/moos-ivp/bin             (this was likely already there)
PATH+=:~/moos-ivp-extend/bin      
PATH+=:~/moos-ivp-pavlab/bin
PATH+=:~/moos-ivp-2680/bin
export PATH                       (this was likely already there)
\end{fileverb}
\vspace{0.1in}

\noindent
Your IvP Helm behavior path on both your laptop and PABLO should be
augmented. You will need to access your own developed behavior and
two behaviors from \var{moos-ivp-pavlab} for safety on the Charles.

\begin{packed_itemize}
\item \var{BHV\_AvdColregsV22}: Collision avoidance following COLREGS
  in Head-On cases
\item \var{BHV\_OpRegionRecover}: Enforce a safety region.
\end{packed_itemize}

\vspace{0.1in}
\noindent
The below lines in your \var{.bashrc} should do it:

\vspace{0.1in}
\begin{fileverb}
IVP_BEHAVIOR_DIRS+=:~/moos-ivp-extend/lib      
IVP_BEHAVIOR_DIRS+=:~/moos-ivp-pavlab/lib
export IVP_BEHAVIOR_DIRS                     
\end{fileverb}
\vspace{0.1in}

\noindent
Note: The below two lines are equivalent in bash, the former just has
the advantage of being a shorter way to grow a path:

\vspace{0.1in}
\begin{fileverb}
PATH=$PATH:another_dir
PATH+=:another_dir
\end{fileverb}
\vspace{0.1in}

%-----------------------------------------------------------------------
\subsection{Make Sure Key Executables are Built and In Your PABLO Path}
\label{sec_shell_path}

On the PABLO you will need to make use of your own \app{pGenRescue}. Ensure
that it is built and in your shell path:

\begin{consoleverb}
PABLO $ which pGenRescue
        /home/student2680/moos-ivp-extend/bin/pGenRescue    
\end{consoleverb}

\noindent
If unsuccessful with the above, check the bin location directly by
switching directories to the \var{moos-ivp-extend/bin/} folder and
running \cmd{ls} to confirm that \app{pGenRescue} exists. If not,
rebuild as necessary. If it does exist, check your \var{\$PATH}
setting in your \var{~/.bashrc} file.


\normalsize
</pre></body></html>