<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}

%===================================================================
% Include common packages, environments, counters etc
\input{common_latex/common_latex_packages}
\input{common_latex/common_latex_lab_format}
\input{common_latex/common_latex_definitions}
%===================================================================
\setcounter{tocdepth}{2}
%===================================================================

\begin{document}
\wikidoc{file=Lab.ClassRescue2}
\wikidoc{auth=mikerb@mit.edu}
\helplevelsubsec


%===================================================================
% Build the Cover Page in an environment style easy for wiki parsing
\begin{labcover}
\labtitle{Lab 14 - Autonomous Rescue Challenge - Part 2 }
\vspace{0.1in}
\labcourse{2.680 Unmanned Marine Vehicle Autonomy, Sensing and Communications}
\vspace{0.3in}
\labpng{0.75}{figures/rescue2.png}
\vspace{0.3in}
\labdate{April 22nd 2025}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering}
\labauth{MIT, Cambridge MA 02139}
\vspace{0.2in}
\labtoc{footnotesize}
\labtocdepth{2}
\end{labcover}

%====================================================================
% Add a blank page so first body page is on the right when doubleside
\blankpage
%====================================================================
\newpage \section{Overview and Objectives}

The second part of the Autonomous Rescue Challenge lab involves the
Heron robots at the MIT Sailing Pavilion. In the first part of the
lab, the goal was to build a \app{pGenRescue} app that would receive a
series of swimmer alerts, and subsequently generate a waypoint path to
the helm. The successful demonstration of this in simulation is a
pre-requisite for this lab. In this lab, our goal is to run the same
app, but on the river. The staff (or lab partner) will run the
shoreside mission, generating a to-be-revealed set of swimmer
locations. A bonus goal of this lab will be the handling of swimmer
alerts communicated to the vehicle mid-mission.

\vspace{0.1in}
\noindent
We will work in teams of two, demonstrating one version of \app{pGenRescue}
put forth by the team.

\vspace{0.1in}
\noindent
A summary of topics:

\begin{labinfo}
\begin{packed_itemize}[2]
\item Revisiting the PABLO operation of the Heron robot.
\item Demonstration of student-provided path planning module, \app{pGenRescue}
\end{packed_itemize}
\end{labinfo}

%===================================================================
\section{Preliminaries}
\label{sec_prelims}

This section contains preliminary steps - reminders for considering
before delving into the main part of the lab.

%===================================================================
\label{sec_prelims}

\input{common_rescue/doc_conventions}
\input{common_rescue/update_code}
\input{common_rescue/pablo_aliases}
\input{common_rescue/pav_coords}
\input{common_rescue/shell_path}

%======================================================================
\newpage
\section{Running the Baseline Mission on the Water}
%======================================================================
\label{sec_onwater}

Once you have (a) completed the preparation of \app{pGenRescue} from the
previous lab, and (b) updated the code on your PABLO as described in
Section \ref{sec_get_code}, you are ready to run your mission on the Heron.


%======================================================================
\subsection{Assignment 1 (Check Off) - Run the Baseline Mission on the Heron}
\label{sec_assign1}

Follow the following steps:

\begin{packed_itemize}
\item Confirm ability to log onto Heron. Perform updates if needed.
\item Launch shoreside mission on your laptop.
\item Launch vehicle mission on your Heron.
\item Run the mission, confirm performance.
\end{packed_itemize}

%----------------------------------------------------------------------
\subsubsection{Connect to the Heron PABLO and Perform Updates}

Your next step is to connect your PABLO to the Heron, and log
in. Connect to the Pavlab WiFi \var{kayak-local-5GHz}. Refer to Lab 12
(Section "Connecting to WiFi at the Pavilion") if needed. The IP
addresses for the Herons, and the alias shortcuts were also given in
Lab 12. If you created aliases in Lab 12 but you forgot them, recall
that you can always see which aliases are currently defined with:

\vspace{0.1in}
\begin{consoleverb}
$ alias
\end{consoleverb}
\vspace{0.1in}

\noindent
Or, even better, if you remember part of the alias, such as the term
\var{student2680}, you can use:

\vspace{0.1in}
\begin{consoleverb}
$ alias | grep student2680
\end{consoleverb}
\vspace{0.1in}

\noindent
This should give you a much smaller set of aliases. In any event, find
your bearings, and log into the Heron. If you have faithfully followed
recommendations so far, you have aliases installed locally on your
laptop and ssh-keys installed on your PABLO. Logging into say the
\var{max} vehicle would be the following, with no password prompt.

\vspace{0.1in}
\begin{consoleverb}
 $ sshm     
\end{consoleverb}
\vspace{0.1in}

\noindent
Hopefully you can avoid the much longer un-cool version (for \var{max}):

\vspace{0.1in}
\begin{consoleverb}
 $ ssh -l student2680@192.168.20.100     (followed by PABLO password prompt)
\end{consoleverb}
\vspace{0.1in}

\noindent
If you're not in the cool kids' club yet, there's still time. Let us
know if we can help.

%----------------------------------------------------------------------
\subsubsection{Launch the Shoreside Mission on your Laptop}

Either you or your lab partner can use their computer to act as the
shoreside.  This can be a laptop out on the deck, or in the Pavlab
room, even connecting to the large monitor if you like and if it's
available.  Whoever is shoreside, they should update the
\var{moos-ivp-2680} tree, as updates to the mission (the shoreside
part in this case), are likely to be posted even as the lab
progresses, when or if we find bugs or improvements.

\vspace{0.1in}
\noindent
Launch the shoreside mission with:

\vspace{0.1in}
\begin{consoleverb}
  $ cd ~/moos-ivp-2680/missions/rescue_baseline
  $ ./launch_shoreside.sh --swim_file=mit_03.txt
\end{consoleverb}
\vspace{0.1in}


\vspace{0.1in}
\noindent
As before, with the Alpha mission in Lab 12, if you do not see a
\var{192.168.1.x} address at the top of \app{pMarineViewer}, determine
your IP address and relaunch the shoreside mission with:

\vspace{0.1in}
\begin{consoleverb}
  $ cd ~/moos-ivp-2680/missions/rescue_baseline
  $ ./launch_shoreside.sh --swim_file=mit_03.txt  --ip=192.168.1.233 (or your IP)
\end{consoleverb}
\vspace{0.1in}

%----------------------------------------------------------------------
\subsubsection{Launch the Mission on the Heron}

Then, on the Heron (PABLO), launch the mission with:

\vspace{0.1in}
\begin{consoleverb}
  PABLO $ cd ~/moos-ivp-2680/missions/rescue_baseline
  PABLO $ ./launch_vehicle.sh --shore=192.168.1.218    (or your shore IP)
\end{consoleverb}
\vspace{0.1in}

\noindent
When the vehicle connects to the shoreside, you're almost ready to
push the vehicle into the water and launch. If you haven't done so
already:

\begin{packed_itemize}
\item Double check the connectors and caps on the PABLO boxes.
\item Double check the payload compartment lid has the four latch keys inserted.
\item Make sure you have the RC controller for your vehicle. Turn it on
  and give it a bit of forward thrust to ensure it's the right one and
  connected.
\item Make sure there are no configuration or run warnings showing in
  the terminal window on the PABLO after running \var{launch\_vehicle.sh}.
  {\em {\bf If there are warnings, address them before launching!}}
\end{packed_itemize}

%----------------------------------------------------------------------
\subsubsection{Launch the Vehicle and Run the In-water Mission}

Slide the vehicle stern first into the water, and try to rotate it
away from the dock and give it a push straight out. Use the RC to
drive it a bit further away from the dock if you like.  Then hit the
\var{DEPLOY} button. It should look something like the trajectory
shown in Figure \ref{fig_swimmer_02}. (Your path will be different due
to the starting position and any changes you made to
\app{pGenRescue}.)

\vspace{0.1in}
\begin{figure}[H]
  \centering 
  \includegraphics[width=0.94\textwidth]{figures/swimmer_02.png}
  \caption{The swimmer locations shown are from swimmer file
    \var{mit\_02.txt}.  The vehicle proceeds to each point, in a
    greedy path tour, and then returns home.}
  \label{fig_swimmer_02}
\gif{figures/swimmer_02.gif}
\end{figure}
\vspace{0.1in}

%======================================================================
\subsection{Assignment 2 (Optional) Demonstrate Adaptive Re-planning}
\label{sec_assign2}

In the next step, we will run the baseline mission using a different
swimmer file, and test the functionality of your code when presented
with a new swimmer location, midway through your mission. Handling new
information is not strictly required in this lab, but it will be
critical in the next lab. In this case, we will add a new swimmer
simply by clicking on a location in \app{pMarineViewer}. In the next
lab, "new" information will also include notifications that certain
swimmers have been rescued by your competitor, and you will instead
need to {\em remove} that swimmer from your path plan.

\vspace{0.1in}
\noindent
Once again launch the shoreside mission as before:

\vspace{0.1in}
\begin{consoleverb}
  $ cd ~/moos-ivp-2680/missions/rescue_baseline
  $ ./launch_shoreside.sh --swim_file=mit_03.txt  --ip=192.168.1.233 (or your IP)
\end{consoleverb}
\vspace{0.1in}

\noindent
By the way, if you launch the shoreside mission with the \var{--help,
  -h} option, you will see that shorthand switches, \var{-1, -2,
  ... -6}, are supported for swim files \var{--swim\_file=mit\_01.txt}
up through \var{--swim\_file=mit\_06.txt}.

\vspace{0.1in}
\noindent
Launching your vehicle is the same as in the first assignment.

\vspace{0.1in}
\noindent
Once your vehicle is launched, on the water, and proceeding along its
path, it should look something Figure \ref{fig_swimmer_03}, depending
on where your vehicle was launched from. During the mission, on your
shoreside display, click on a new location, similar to that shown in
Figure \ref{fig_swimmer_03}. Your vehicle should adapt to accommodate
the new point.

\vspace{0.1in}
\noindent
Note: For this example in Figure \ref{fig_swimmer_03}, for these points
and this starting position, the inefficiency of the "greedy" path happens
to be quite evident!


\vspace{0.1in}
\begin{figure}[H]
  \centering 
  \includegraphics[width=0.94\textwidth]{figures/swimmer_03.png}
  \caption{The swimmer locations shown are from swimmer file
    \var{mit\_03.txt}.  The vehicle proceeds to each point, in a
    greedy path tour. During the mission, a new point is added by the
    shoreside user, and the path is adjusted. Finally the vehicle then
    returns home.}
  \label{fig_swimmer_03}
\gif{figures/swimmer_03.gif}
\end{figure}
\vspace{0.1in}

%=======================================================================
\newpage \section{Instructions for Handing In Assignments}
%=======================================================================

%=======================================================================
\subsection{Requested File Structure}
\label{sec_hand_in}

The assignment for this lab is to (a) demonstrate a working mission on
the Heron using your \app{pGenRescue} app, and (b) optionally
demonstrate that your app is able to handle new swimmer coordinates
mid-mission and replan the path to accommodate the new
information. You are encouraged to use the \var{rescue\_baseline}
mission in the provided \var{moos-ivp-2680} tree, so the only addition
in your codebase is the \app{pGenRescue} app:

\vspace{0.1in}
\begin{consoleverb}
  moos-ivp-extend/
     src/
        pGenRescue
\end{consoleverb}
\vspace{0.1in}


%=======================================================================
\subsection{Due Date}

This lab should be completed by the end of day Thursday, April 24th,
2025.

\end{document}

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