<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.ClassPabloIntro}
\wikidoc{auth=mikerb@mit.edu}
\helplevelsubsec

%===================================================================
% Build the Cover Page in an environment style easy for wiki parsing
\begin{labcover}
\labtitle{Lab 15 - Introduction to the PABLO Payload}
\vspace{0.1in}
\labtitle{Autonomy Computer}
\vspace{0.1in}
\labcourse{2.680 Unmanned Marine Vehicle Autonomy, Sensing and Communications}
\vspace{0.15in}
\labpng{0.75}{figures/pablo_gen3.png}
\vspace{0.15in}
\labdate{May 4th, 2021}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Blake Cole, blerk@mit.edu}
\labauth{Department of Mechanical Engineering}
\labauth{MIT, Cambridge MA 02139}
\vspace{0.1in}
\labtoc{small}
\labtocdepth{3}
\end{labcover}


%===================================================================
% Add a blank page so first body page is on the right when double-side
\blankpage

%===================================================================
% Begin the body of the text
% 
% ------------------------------------------------------
% Lab B - Connecting PABLO Unit to M300 Hardware
% 
% Overview
% Introduction to the lab network and connecting PABLO to the M300 vehicle.
% 
% Objectives
% 1. Establish valid network connections to PABLO unit through the M300
% 2. Validate control of M300 from PABLO unit
% 3. Deploy a user mission dockside and in-water from a PABLO unit
% 
% Step 2 - Launch alpha mission on PABLO / M300
% A. Edit alpha mission settings
% B. Launch the mission on the dock
% 
% Step 3 - Launch user mission on PABLO / 3200
% A. user repository svn update
% B. Rebuild on PABLO
% C. Launch mission on the dock, verify all-stop
% D. Launch mission on the water


%===================================================================
\section{Overview and Objectives}
%==================================================================

\noindent
This lab has the following objectives:

\begin{packed_enumerate}
\item Introduce the Payload Autonomy Paradigm
\item Introduce the PABLO as a hardware platform for payload autonomy.
\item Describe the process for accessing the PABLO on the bench.
\item Describe the process for accessing the PABLO on the vehicle.
\item (not this year) Run a basic mission with the PABLO on a
  Clearpath Heron USV on the water.
\end{packed_enumerate}
	
\noindent
By the end of this lab, you will be able to power up a PABLO computer,
connected to a course laptop, log in, download your course codebase,
and run a simple mission from the PABLO.

\begin{labinfo}
	
\begin{packed_itemize}
\item Launching an emulator on the laptop computer
\item Configuring a network and establishing connection between PABLO and a computer
\item Conducting a mission on the computer that connects with the emulator
\item Conducting a mission on the PABLO that connects with the emulator
\end{packed_itemize}
\end{labinfo}

%=====================================================================	
\subsection{Overview of Payload Autonomy}

Consider how a robotic vessel like the Heron M300 works. Transit and
rotation are effected via differential electric thrusters, which are
actuated by motor controllers. Pose (e.g., heading) and position
(e.g., lat/lon or x, y) are discovered by a GPS and digital
compass. An on-board computer reads the sensors and commands the
motors.


\vspace{0.1in}
\noindent
The sense-plan-act loop of a robot autonomy system, {\em could} be
completed entirely within the main (front seat) computer that ships
with the Heron. This arrangement, however has drawbacks. Preparing an
autonomy mission with 3rd party software, like MOOS-IvP, requires
access to the vehicle to load software and files, install
dependencies, and build the 3rd party applications and behaviors. This
effort is then duplicated on each Heron main vehicle computer. What if
your dependencies are incompatible with packages installed by others?
Even worse, what if the 3rd party software install breaks other aspects
of the main vehicle computer environment?

\vspace{0.1in}
\noindent
Many commercially-available robotic vehicles, the M300 included,
support a "front-seat, back-seat" paradigm. The front seat handles the
sense and act portion of the loop, with a connected computer handling
the planning. (Practically speaking, sensing only includes
navigation-related data.) A {\em wire protocol} defines how the front
and rear communicate to send sensor data from the front and to push
thrust commands from the rear.

\vspace{0.2in}
\begin{figure}[H]
  \centering 
  \includegraphics[width=0.65\textwidth]{figures/payload.png}
  \caption{{\bf The Payload Autonomy Concept.}}
  \label{fig_payload}
\end{figure}
\vspace{0.1in}

\noindent
The \app{iM300} application in the \var{moos-ivp-pavlab} repository
handles communicating between your mission and the M300's front
seat. \mvar{DESIRED\_THRUST} and \mvar{DESIRED\_RUDDER} output from
\app{pMarinePID} are converted into percent thrust to the left and
right motors and sent to the front seat via the wire protocol. Pose
and position messages from the front are parsed and published as the
\mvar{NAV\_*} variables. The vehicle plus the \app{iM300} app, are in
effect a one-for-one replacement for \app{uSimMarine}.


%==================================================================
\section{Working With the PABLO Unit - Network Overview}
%==================================================================

The PABLO unit you received has been pre-configured with a GNU/Linux
operating system. The \var{moos-ivp} and \var{moos-ivp-pavlab}
trees are already installed and built. In this section you will follow
the process of logging in to the PABLO, verify that the PABLO is
online, and then load your svn repository onto the PABLO unit and
augment your shell path to include your own binaries.

%==================================================================
\subsection{IP Address Conventions for Pavilion Robots}
\label{sec_ipaddr}

The PABLO unit communicates with your computer (and eventually with
the M300 vehicle) over the TCP-IP network. Therefore, the unit and
your computer must be connected to a common IP subnet. The PABLO unit
will also require access to the public Internet. The most convenient
solution is to configure Internet sharing on your laptop. Your
computer's WiFi connection establishes a link to the Internet and an
on-board DHCP (Dynamic Host Configuration Protocol) server will share
the connection over the laptop's Ethernet port. The PABLO is
configured to receive its IP address from the laptop host (although a
backup IP address of \var{192.168.4.24} is available for connection
troubleshooting). Per our convention, the PABLO's IP address will vary
depending on how you are using the device, as follows:

\vspace{0.2in}

\begin{tabular}{|l|l|l|} \hline
  {\bf PABLO Connected to} &amp; {\bf Address of PABLO} &amp; {\bf Front-Seat M300 Address} \\ \hline
  M300 Evan  &amp; \var{192.168.5.100}  &amp; \var{192.168.5.1}  \\ \hline
  M300 Felix &amp; \var{192.168.6.100}  &amp; \var{192.168.6.1}  \\\hline
  M300 Gus   &amp; \var{192.168.7.100}  &amp; \var{192.168.7.1}  \\\hline
  M300 Hal   &amp; \var{192.168.8.100}  &amp; \var{192.168.8.1}  \\\hline
  M300 Ida   &amp; \var{192.168.9.100}  &amp; \var{192.168.9.1}  \\\hline
  M300 Jing  &amp; \var{192.168.10.100} &amp; \var{192.168.10.1} \\\hline
  M300 Kirk  &amp; \var{192.168.11.100} &amp; \var{192.168.11.1} \\\hline
  M300 Luke  &amp; \var{192.168.12.100} &amp; \var{192.168.12.1} \\\hline
\end{tabular}

\vspace{0.2in}
\noindent
To work with the PABLO offline, with a laptop, our typical convention
instead is to configure a DHCP server on the laptop, with Internet
sharing:

\vspace{0.2in}

\begin{tabular}{|l|l|l|} \hline
  {\bf PABLO Connected to} &amp; {\bf Address of PABLO} &amp; {\bf Laptop Local Address} \\ \hline
  Mac with Internet Sharing &amp; \var{192.168.2.2} &amp; \var{192.168.2.1} \\ \hline
\end{tabular}


%==================================================================
\subsection{Connecting to the PABLO - Fall-back Methods}

When the PABLO boots, it will attempt to get an IP address for its
Ethernet port from a DHCP server. We will discuss DHCP in the next
section since this is the preferred method on the robot, and preferred
when connecting to the laptop. Under the DHCP mode, we typically have
the robot or laptop configured to connect to the larger Internet which
is important for pulling down code and other updates.

\vspace{0.15in}
\noindent
When the PABLO boots, if it cannot obtain an IP address via DHCP, the
Ethernet (\var{eth0}) interface will fall back to having the IP
address of \var{192.168.4.24}. So a fall-back option for connecting
with your laptop, or any machine over a direct Ethernet connection, is
to set your machine's Ethernet IP address manually to say
\var{192.168.4.6}, and just connect with:

\vspace{0.15in}
\begin{consoleverb}
$ ssh -l student2680 192.168.4.24
\end{consoleverb}
\vspace{0.15in}

\noindent
If the above doesn't work, try \cmd{ping 192.168.4.24}. If
\cmd{ping} works then re-check your typing in the \cmd{ssh} command.
If this option or any of the below methods do not work, your ultimate
fallback is to connect with a monitor and keyboard and check out what
is going on by running \cmd{ifconfig} once you've logged on to the
PABLO.


%==================================================================
\subsection{Connecting with Internet Sharing on MacOS}

For MacOS users, your Mac will effectively act as a router, providing
the PABLO with an IP address, connectivity to the computer, and a
route to reach the Internet. MacOS has a feature called {\em Internet
  Sharing}. This option allows the Mac to get a connection to the
Internet on one interface (e.g., wireless) then allow another device
to connect to the Mac over a different interface (e.g.,
Ethernet). Effectively, the PABLO will have access to the Internet and
to the Mac by plugging into the Mac's Ethernet port.

\pskip

When Internet Sharing is turned on, the Mac creates a new subnet and
by default assigns itself the shared connection the IP address
\var{192.168.2.1}. The connected PABLO device will be assigned
\var{192.168.2.2}. However, like any router you are not always
guaranteed to receive the \var{.2} suffix on the IP
address. Therefore, we will alter a system preference on the Mac so
that \var{192.168.2.2} is the only number it assigns when the PABLO is
plugged in.

%--------------------------------------------------------------------
\subsubsection{Configuring the DHCP Server to have a Predictable Range}
\label{sec_dhcp_range}

When the DHCP server is launched on the Mac, the value given to a
connected device may vary depending on which IP addresses are
available. Upon startup, the Mac itself likely will have the address
\var{192.168.2.1}, and then proceed to hand out addresses starting
with \var{192.168.2.2}. Very likely your PABLO will have this number,
but under some circumstances it may not, so we try to make this more
deterministic by setting the range of allowable values to be exactly
\var{192.168.2.2}. This can be done with a few entries on the command
line, but a script to do them all may be downloaded:

\vspace{0.1in}
\begin{consoleverb}
 $ wget http://oceanai.mit.edu/pavlab/docs/MacConfigSharing.sh
\end{consoleverb}
\vspace{0.1in}

\noindent
After downloading you may need to give this file executable
permissions.  See below.  Running this script requires sudo (admin)
privileges which presumably you have. You will be prompted after
invoking the script:

\vspace{0.1in}
\begin{consoleverb}
 $ chmod ug+rwx  MacConfigSharing.sh
 $ ./MacConfigSharing.sh
 Password:
 Internet sharing now configured to assign 192.168.2.2
\end{consoleverb}
\vspace{0.1in}

\noindent
This script supports a couple optional command line arguments. You can
run the script with the \var{-h} argument to see:

\vspace{0.1in}
\begin{consoleverb}
 $ ./MacConfigSharing.sh
 ./MacConfigSharing.sh [SWITCHES]   
   --help, -h         
   --show, -s       Show the contents of /var/db/dhcpd_leases
   --clear, -c      Clear the contents of /var/db/dhcpd_leases
\end{consoleverb}
\vspace{0.1in}

\noindent
The \var{--show} and \var{--clear} options both work with a particular
file on your system, \var{/var/db/dhcpd\_leaseas}. This is a plain
text file, is used by the MacOS to keep track of which other machines
it has assigned an IP address to through its DHCP server during
Internet sharing. Later, when the PABLO is properly connected, and has
the expected \var{192.168.2.2} IP address, this file will have a
single block entry looking something like the below:

\vspace{0.1in}
\begin{consoleverb}
 $ ./MacConfigSharing.sh --show
\end{consoleverb}

\begin{fileverb}
{
   name=PABLO
   ip_address=192.168.2.2
   hw_address=1,b8:27:eb:cc:76:94
   identifier=1,b8:27:eb:cc:76:94
   lease=0x5cbf819e
}
\end{fileverb}
\vspace{0.1in}

\noindent
When we restrict the range of IP addresses that may be handed out by
your Mac to be only \var{192.168.2.2}, this makes connecting a second
PABLO difficult, since the one IP address to be leased has already
been given out to another machine, even if that machine is no longer
physically connected. To get your DHCP server to forget the first
machine, you can simply remove the above file from your system, or
simply use the \var{--clear} option in the \var{MacConfigSharing.sh}
script.

%--------------------------------------------------------------------
\subsubsection{Enable Internet Sharing in MacOS System Settings}
\label{sec_ishare}

To configure Internet Sharing on OS X, turn on Internet Sharing so
that the operating system creates default preference files:

%------------------------------------------
\paragraph{Step 1: Open the control panel:} Click the apple menu (top-left of
  the menu bar), and select {\em System Preferences...}.

%------------------------------------------
\paragraph{Step 2: Select {\em Sharing} control panel item:} Single-click the
  {\em Sharing} control panel item to open it.

\begin{figure}[H]
  \centering
  \includegraphics[width=0.15\textwidth]{figures/sharing.png}
  \caption{The icon for the {\em Sharing} item in the OS X control
    panel.}
  \label{fig_sharing}
\end{figure}

%------------------------------------------
\paragraph{Step 3: Configure {\em Sharing}:} For the {\em Share your
  connection from:} option, select {\em Wi-Fi}. For the {\em To
  computers using:} option, only check the {\em Ethernet} box.

\paragraph{Step 4: Enable {\em Sharing}:} Select the {\em Internet Sharing}
  option. Select {\em Start} on the confirmation pop-up box.

\begin{figure}[H]
  \centering
  \includegraphics[width=0.55\textwidth]{figures/SharingOptionsCut.png}
  \caption{Settings for the {\em Sharing} item in the OS X control
    panel that allow connection with PABLO.}
  \label{fig_sharing_options}
\end{figure}

\noindent

\paragraph{Step 5: Disable {\em Sharing}:} When you're done working
with the PABLO, de-select the {\em Internet Sharing} option.


%========================================================================
\subsection{Connecting with GNU/Linux}
These instructions are borrowed from https://askubuntu.com and adapted
to our use case.  To configure connection sharing in Ubuntu 16.04,

\paragraph{Step 1: Open Network Connections:} By selecting {\em Edit
  Connections} in the wireless drop-down menu from the top panel.

\begin{figure}[H]
  \centering
  \includegraphics[width=0.40\textwidth]{figures/ubuntu-network-options-2.png}
  \caption{Ubuntu network options.}
  \label{fig_ub_netopt}
\end{figure}
\noindent

\paragraph{Step 2: Highlight Ethernet Connection:} Select your wired connection(probably {\em Wired Connection 1}) and click {\em Edit}.

\begin{figure}[H]
  \centering
  \includegraphics[width=0.35\textwidth]{figures/ubuntu-con-eth0-2.png}
  \caption{Ubuntu wired Ethernet.}
  \label{fig_ub_eth0}
\end{figure}
%
\noindent
\paragraph{Step 3: Choose IPv4 Settings:} Select the IPv4 tab and use the
settings {\em Shared to other computers}

\begin{figure}[H]
  \centering
  \includegraphics[height=0.45\textwidth]{figures/ubuntu-con-ipv4-2.png}
  \caption{Ubuntu connection sharing settings.}
  \label{fig_ub_ipv4}
\end{figure}

\noindent
\paragraph{Step 4: Connect Using Ethernet:} Connect the PABLO and laptop together over Ethernet.  Reconnect the laptop by
clicking on the {\em Wired Network} to get a new IP address.

\noindent
\paragraph{Step 5: Determine Laptop's IP:} Click on {\em Connection Information} in the network menu and write
down the IP address and network mask. This information will be used next to
search for the IP of the PABLO.

\begin{figure}[H]
  \centering
  \includegraphics[height=0.45\textwidth]{figures/ubuntu-con-check-properties.png}
  \caption{Ubuntu connection properties.}
  \label{fig_ub_ipv4}
\end{figure}

\noindent
\paragraph{Step 6: Determine PABLO's IP:} On the command line run the program \cmd{nmap} (if not found install it using apt-get
install \cmd{nmap}) with the first part of the subnet to match the laptop's IP address.

\vspace{0.1in}
\begin{consoleverb}
  $ nmap -sP 10.42.0.0/24
  Host 10.42.0.1 is up (0.00035s latency).
  MAC Address: BC:AE:C5:C3:16:93 (Unknown)
  Host 10.42.0.21 is up (0.0038s latency).
  MAC Address: 74:44:01:40:57:FB (Unknown)
  map done: 256 IP addresses (2 hosts up) scanned in 2.80 second
\end{consoleverb}

\noindent
\cmd{nmap} will respond with a list of hosts that are up.  One will be the laptop you
are using while the other should be the PABLO's IP. {\em In the following
  instructions do not use 192.168.1.2 for the PABLO's IP but the one that \cmd{nmap}
  just found!}


%==================================================================
\subsection{Verifying a Network Connection and Using ssh}

When connection sharing is enabled on your laptop, you are ready to
connect the hardware.

%---------------------------------------------------------------
\subsubsection{Connect the Hardware}
\begin{enumerate}
\item{\bf Ethernet}. Plug the Ethernet cable into your computer.

\item{\bf Power}. Plug the 5v power supply into the PABLO unit's power
  USB port (the one farthest to the right). Always be careful to use
  the 5v connector supplied with the unit and do not use other power
  supplies as they may destroy the raspi. If your computer has a USB-A
  port, you may be able to draw power from your computer. Otherwise you
  can you use any USB power outlet that you may typically use to charge
  your phone.
  
\item{\bf Wait}. Wait approximately 1 minute for the system to
  boot. Now the network connection can be verified.
\end{enumerate}

\vspace{0.1in}

%---------------------------------------------------------------
\subsubsection{Using ping Command Line Utility}

The \cmd{ping} command is a command-line (OS X and GNU/Linux) tool for
testing whether another computer can be reached across an IP
network. After connecting the PABLO, it is useful to use ping to
verify that PABLO can be reached from your laptop. In a terminal
window on your laptop:

\vspace{0.1in}
\begin{consoleverb}
 $ ping 192.168.2.2
 PING 192.168.1.2 (192.168.1.2): 56 data bytes
 64 bytes from 192.168.1.2: icmp_seq=0 ttl=64 time=9.203 ms
 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=12.605 ms
 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=7.238 ms
 ^C
 --- 192.168.1.2 ping statistics ---
 3 packets transmitted, 3 packets received, 0.0% packet loss
 round-trip min/avg/max/stddev = 7.238/9.682/12.605/2.715 ms
\end{consoleverb}
\vspace{0.1in}

\noindent
The \cmd{ping} command can be stopped by pressing \var{control-C}.
In the example above, \cmd{ping} reached the PABLO and reported the
round-trip communications time. When the connection fails, output
similar to the following is displayed:

\vspace{0.1in}
\begin{consoleverb}
 $ ping 192.168.2.2
 PING 192.168.2.2 (192.168.2.2): 56 data bytes
 Request timeout for icmp_seq 0
 Request timeout for icmp_seq 1
 Request timeout for icmp_seq 2
 ^C
 --- 192.168.2.2 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss
\end{consoleverb}
\vspace{0.1in}

\noindent
{\bf Troubleshooting for Ping Errors:}
\begin{itemize}
\item Check the Raspberry Pi lights are on. Power is the red LED, and
  access of disk is the green one right next to the red.

\item Check the networking port on the Raspberry Pi have both lights
  on.  If they are both off then the physical network cable might be
  loose. Ensure a tight connection by replugging.

\item Temporarily disable your laptop's firewall.
\item For Mac users, try cycling off Internet Sharing, unplug the
  PABLO power, and ensure the following steps are done in this order:

  \begin{packed_enumerate}
  \item Repeating the script from Section \ref{sec_dhcp_range},
  \item Cylce on the Internet Sharing as per Section \ref{sec_ishare},
  \item Make sure the Ethernet connection is firm on both ends,
  \item Plug in the PABLO power cable,
  \item On your laptop, \var{ping 192.168.2.2}.
  \end{packed_enumerate}
    
\end{itemize}
%-------------------------------------------------------------
\subsection{Assignment 1 (Self Check off) SSH onto the PABLO}

The \cmd{ssh} tool is a command-line (OS X and GNU/Linux) tool for
opening up a terminal on a remote device using a secure shell
connection. In other words, \cmd{ssh} connects the keyboard and
terminal window directly to another computer that is reachable across
the network (i.e, \cmd{ping} displays an affirmative response). Inputs
to \cmd{ssh} include the IP address of the remote system and the user
name. In a terminal window on your laptop, enter the following to
connect via \cmd{ssh}:

\vspace{0.1in}
\begin{consoleverb}
 $ ssh -l student2680 192.168.2.2
\end{consoleverb}
\vspace{0.1in}

\noindent
The username is \var{student2680} and the password will be provided by
the lab instructor. Once connected, the terminal will behave as if the
keyboard and screen (at least the terminal window on the screen) were
connected directly to the remote system.

\vspace{0.15in}
\noindent
Final part of this step: verify that your PABLO is also on the Internet
by typing \var{ping 18.18.38.22} on the command line. (This is the
oceanai machine).


%------------------------------------------------------------------
\subsection{Assignment 2 (Check off) Loading, Building Your Tree on the PABLO}

In this step the goal is to (a) load your personal repository onto
PABLO unit, (b) build the tree, (c) add your binaries to the shell
path, (d) update your \var{IVP\_BEHAVIOR\_DIRS} environment variable,
and finally (f) demonstrate that your binaries are runnable from the
command line.

\paragraph{Step 1: Log back on to the PABLO} If you're not still logged
in, log back in:
	
\vspace{0.1in}
\begin{consoleverb}
 laptop$ ssh -l student2680 192.168.2.2
 student2680@192.168.2.2's password: 
 Last login: Mon Mar 23 17:47:24 2015 from 192.168.2.1
 pablo $
\end{consoleverb}
\vspace{0.1in}
	
\paragraph{Step 2: Check out your tree:}
  By default, logging into the PABLO puts you in the \var{student2680}
  home directory. Check out your svn or git repository into that home
  directory. If you do not have your own svn or git repository please
  refer to your lab instructor.

\vspace{0.1in}
\begin{consoleverb}
 pablo $ svn co svn+ssh://&lt;your-username&gt;@oceanai.mit.edu/home/svn/repos/moos-ivp-janedoe
\end{consoleverb}
\vspace{0.1in}

\noindent
Don't forget that on the PABLO you are the user \var{student2680}. On
your laptops you may have the same user name as your git or svn account,
and you may need to keep this in mind when pulling down your code.

\paragraph{Step 3: Build your tree:} The \var{moos-ivp} and other trees
  should already be loaded on the machine. To build your tree:
  
\vspace{0.1in}
\begin{consoleverb}
 pablo$ cd moos-ivp-janedoe 
 pablo$ ./build.sh
\end{consoleverb}
\vspace{0.1in}
	
  
\paragraph{Step 4: Augment your Shell Path} Configure the system
  path to know where your MOOS applications are located. Using the
  editor of your choice, on the PABLO unit edit the file
  \var{/home/student2680/.bashrc}. At the end of the file, add:
	
\vspace{0.1in}
\begin{consoleverb}
 export PATH=$PATH:/home/student2680/moos-ivp-janedoe/bin
\end{consoleverb}
\vspace{0.1in}
	
\noindent
Source the \var{.bashrc} file (or log out and back in) to apply
changes to the \var{PATH}.


%=================================================================
\newpage \section{Launching a Mission on the PABLO}
%=================================================================

Our next step is to get familiar with launching a mission on PABLO.
First we will launch a mission in simulation on the PABLO with the
shoreside launched on your laptop. Then we will proceed to working
with the PABLO in the actual robot.

%------------------------------------------------------------------
\subsection{Assignment 3 (Check off) Run the Alpha Mission on the PABLO}

In this step the goal is to run the mission in
\var{moos-ivp/ivp/missions/ufld\_alpha}. This mission already exists
in the \var{moos-ivp} tree and already has separate launch scripts for
a vehicle and the shoreside. You very likely have a version already on
your laptop and on the PABLO. You will need both here.

\vspace{0.1in}
\noindent
Perform the following pre-launch steps before launching the mission.

\vspace{0.1in}
\noindent
Pre-launch steps on your laptop, the shoreside computer:

\begin{packed_itemize}
\item Go to the \var{moos-ivp/ivp/missions/ufld\_alpha} directory and
  confirm that you can launch the shoreside with \var{./launch\_shoreside.sh}
\item Note the IP address at the top of the \app{pMarineViewer} window.
\item If the address is not \var{192.168.2.1}, shut off your wireless
  connection. This will mean that your laptop and the PABLO are no longer
  on the Internet, but you don't need an Internet connection for this
  exercise. After doing this, re-launch and verify the IP address.
\end{packed_itemize}


\vspace{0.1in}
\noindent
Pre-launch steps on your PABLO:

\begin{packed_itemize}
\item Go to \var{pablo-common-aro/}, pull in any updates, and re-launch
  \cmd{bash}. This will ensure any recent updates to the PABLO environment
  are reflected in this exercise.

\begin{consoleverb}
  $ cd ~/pablo-common-aro
  $ svn update
  $ bash
\end{consoleverb}

\item Confirm that \app{uSimMarine} and \app{pHelmIvP} are in your shell
  path:

\begin{consoleverb}
  $ which pHelmIvP
  /home/student2680/moos-ivp/bin/pHelmIvP
  $ which uSimMarine
  /home/student2680/moos-ivp/bin/uSimMarine
\end{consoleverb}
\end{packed_itemize}


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

Launch the shoreside on your laptop with a time warp of 10:

\begin{consoleverb}
  $ cd ~/moos-ivp/ivp/missions/ufld_alpha
  $ ./launch_shoreside.sh --ip=192.168.2.1 10
\end{consoleverb}


%---------------------------------------------------------------
\subsubsection*{Launch the Vehicle Mission on your PABLO}

Launch the vehicle on your PABLO with a time warp of 10:

\begin{consoleverb}
  $ cd ~/moos-ivp/ivp/missions/ufld_alpha
  $ ./launch_vehicle.sh --ip=192.168.2.2 --shore=192.168.2.1 10
\end{consoleverb}

\vspace{0.1in}
\noindent
Note: Each PABLO should have the below aliases defined.

\vspace{0.1in}
\begin{consoleverb}
  alias cdmitr='cd ~/moos-ivp/'
  alias   cdua='cdmitr; cd ivp/missions/ufld_alpha'
  alias    rma='cdua; ./launch_vehicle.sh --ip=192.168.2.2 --shore=192.168.2.1 '
\end{consoleverb}
\vspace{0.1in}

\vspace{0.1in}
\noindent
Feel free to make use of these aliases. For example:

\vspace{0.1in}
\begin{consoleverb}
$ rma 10
\end{consoleverb}
\vspace{0.1in}




%------------------------------------------------------------------
\subsection{Assignment 4 (Check off, time permitting) Run an Alpha Mission on the Robot}

The final step of today's lab is to launch a simple mission on the
PABLO plugged into either a Heron in the lab. We will walk you through
the steps in the lab. Use the IP addresses provided earlier in Section
\ref{sec_ipaddr}. The mission we will use is on the PABLO in:

\vspace{0.1in}

\var{moos-ivp-pavlab/missions/alpha\_kayak}

\vspace{0.1in}
\noindent
You should perform an svn update in \var{moos-ivp-pavlab} prior to
doing this part of the lab.




%==================================================================
\section{Troubleshooting}

\subsection*{I can log onto PABLO but cannot reach the Internet}

If you are logged onto the PABLO, but cannot \cmd{ping} or \cmd{ssh}
to the outside world, e.g., \var{ping 18.18.38.22}.

\end{document}

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