<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 11 - 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{April 7th, 2022}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@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{labinfo}	
\begin{packed_itemize}
\item Introduce the Payload Autonomy Paradigm.
\item Introduce the PABLO as a hardware platform for payload autonomy.
\item Access the PABLO from your laptop.
\item Access the PABLO from your laptop using SSH keys.
\item Download your course code (moos-ivp-extend) tree onto your PABLO.
\item Identify your lab partner for upcoming in-water labs
\item Coordinate shared access to you course code on the the PABLO. 
\end{packed_itemize}
\end{labinfo}

\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 and compile your
course codebase. In the next lab, you will use your PABLO to run a simple
mission with the Heron on the Charles River.

%=====================================================================	
\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 is built
into 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}

%=====================================================================	
\subsection{Payload Autonomy Software}

On your PABLO computer, the Heron payload computer, there will be four
software trees:

\begin{packed_enumerate}
\item \var{moos-ivp}
\item \var{moos-ivp-extend}  (student tree)
\item \var{moos-ivp-pavlab}
\item \var{pablo-common}
\end{packed_enumerate}

\vspace{0.1in}
\noindent
The first two trees should be familiar as you have had them already on
your laptop all semester. When you receive your PABLO, it will not
have the \var{moos-ivp-extend} tree since it is different for every
person.  A goal of this lab is to log onto your PABLO through your
laptop with Internet sharing, so you can pull your
\var{moos-ivp-extend} tree from \var{git}.

\vspace{0.1in}
\noindent
The \var{moos-ivp-pavlab} tree contains code that is (a) under
development in our lab, and (b) code that is specific to hardware or
vehicles in our lab. This tree comes with your PABLO, compiled, and
\var{moos-ivp-pablo/bin} is already in the shell path of the PABLO
user (\var{student2680}). The critical app in our case is \app{iM300},
which implements the payload interface to the Clearpath front-seat
computer. This app is discussed further in Section \ref{sec_im300}, but
it essentially ingests the vehicle navigation solution and hardware
status from the front-seat and publishes it in the PABLO MOOS community.
And it ingests the \mvar{DESIRED\_THRUST} and \mvar{DESIRED\_RUDDER}


\vspace{0.2in}
\begin{figure}[H]
  \centering 
  \includegraphics[width=0.75\textwidth]{figures/payload_interface.png}
  \caption{{\bf The Heron Payload Autonomy Iterface}: The PABLO
    computer box is connected by an Ethernet cable to the Heron main
    computer. The MOOS community running on the PABLO includes the
    iM300 MOOS app. This app opens a socket over the Ethernet
    connection to the Heron compute. It publishes the level of
    left/right thrust to be applied by the actuator software running
    on the main computer. It consumes navigation and robot status
    information from the Heron and publishes this information locally
    in the MOOSDB on the PABLO, for consumption by the helm and other
    apps.}
  \label{fig_payload_interface}
\end{figure}
\vspace{0.1in}

\vspace{0.1in}
\noindent
The fourth tree on your PABLO, \var{pablo-common}, is designed to
contain as much as the PABLO and \var{student2680} configuration
content as possible. For example, imagine creating the
\var{student2680} user account, with a nice \var{.bashrc} file, and
then replicating the SD card to 50 PABLOs, all boxed up and delivered
to users. Then imagine that something was wrong or missing in the
\var{.bashrc} file. To avoid pulling all the SD cards from the 50
boxes and re-imaging 50 new cards, we instead put the bulk of the
\var{.bashrc} file in \var{pablo-common}. The {\em actual} \var{.bashrc}
file on the PABLO is quite thin and simply reads futher \var{bash}
configuration content from another file in \var{pablo-common}. In this
way, a change to the \var{bash} environment for all pablos can be made
in the \var{pablo-common} tree, and pushed into version control. The
PABLO user can simple pull the change. Or the PABLO can be configured
to automatically pull \var{pablo-common} changes when it boots and
finds the Internet.

%==================================================================
\section{About the PABLO Hardware and Operating System}
%==================================================================

The PABLO unit you received has been pre-configured with a GNU/Linux
operating system. In this case it is Pi OS (formerly known as
Raspbian), release 11. This release also goes by the name
\var{"Bullseye"}. The Raspberry Pi computer inside the PABLO has
several ports. Four USB data ports, an Ethernet port, two video ports,
and a USB power port. The Ethernet port and power port are routed to
two wet connectors. These connectors will be used when running on the
Heron Robot. You will also use these two connectors when connecting
from your laptop. The other two USB wet-connector ports are capped
closed, but are there for convenience in other use modes.


\vspace{0.1in}
\noindent
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 git or svn repository onto the PABLO unit and augment your
shell path to include your own binaries.

\vspace{0.1in}
\noindent
One way to log into the PABLO would be to open the case, and connect
a monitor to one of the video ports, and keyboard and mouse to two
of the USB ports. If you were to do this, you could log in with the
username \var{"student2680"} and password provided by the course staff.
This is usually done when all other access methods fail. Normally you
will need to remotely log in with \cmd{ssh} over the Ethernet connection.
This is discussed next.


%==================================================================
\section{Working With the PABLO Unit}
%==================================================================

The goal in this section is connect to the PABLO from your laptop. You will
run an Ethernet cable from your laptop to the PABLO. And you will power
the PABLO with a USB power cord. A few pieces of additional equipment
are provided by the staff:

\begin{packed_itemize}
\item Ethernet cable
\item Ethernet to USB adaptor
\item USB A to B power cable
\item 5V power supply via adaptor or power strip or USB hub
\end{packed_itemize}

\vspace{0.1in}
\noindent
There are three modes of connecting:

\begin{packed_itemize}
\item Laptop connected to the PABLO with PABLO connected to the Internet.
\item Laptop connected to the PABLO with no Internet connection on the PABLO.
\item Directly connected to the PABLO a keyboard and monitor. 
\end{packed_itemize}

\vspace{0.1in}
\noindent
Our goal is the first method. The others are temporary fall-backs. You
will need to have your PABLO connected to the Internet to pull down
your \var{moos-ivp-extend} code.

\vspace{0.1in}
\noindent
Connection steps are provided below. If you are working with MacOS, this should
be pretty seamless as this has been thoroughly tested and MacOS networking
configuration dialog boxes have not changed much over recent releases. If you
are working with Linux, the setup will be trickier, and the steps below may
be a bit out-dated. The TA staff will work with you to get connected.


%==================================================================
\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 global 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).




%==================================================================
\newpage
\section{Accessing your Course Code on the PABLO}
%==================================================================

%==================================================================
\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. 

\vspace{0.1in}
\begin{consoleverb}
 pablo $ git clone git@gitlab.com:janesmith/moos-ivp-janesmith.git
\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. You
may need to add the user \var{student2680} to your version control access
list. 

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


%==================================================================
\subsection{Assignment 3 (Check off) Decide on a Lab Parter}

For the remainder of the labs, you will be working with a lab partner. Decide
who this is, and let the TAs know. 

%==================================================================
\subsection{Assignment 4 (Self Check off) Access your Lab Partner's Code}

As you prepare for the in-water labs, you will want to test in simulation.
You will need to work collaboratively on a shared set of code. Work out
with your lab partner how you want to do this. It's ok to just share one
person's code base. Even better if you each have access to each other's codebase
and you have both codebase on each of your PABLOs.





%==================================================================
\subsection{Working with the PABLOS and the Heron Robots}

When we begin working with the Heron robots on the water, your PABLO
will be running the vehicle. The Ethernet is connected between the
PABLO and the Heron front-seat computer. And the PABLO is powered
through the USB port from a small battery in a similarly water-tight
box, as shown on the right in Figure \re{fig_pablo_heron}. The gap
between the PABLO and the Heron is open to the elements and that's
why all the connectors on the PABLO are Bulgin rated water-tight
connects. 

\vspace{0.2in}
\begin{figure}[H]
  \centering 
  \includegraphics[width=0.85\textwidth]{figures/pablo_heron.png}
  \caption{{\bf The PABLO with the Heron USV}: (left) In 2015, an
    earlier version of the PABLO was used in the Heron. (right) The
    current version of the PABLO has a slightly different connector
    layout and the payload compartment is structured to fit the PABLO
    box in a pre-defined location. The PABLO battery is also now in
    its own battery box with wet connectors.}
  \label{fig_pablo_heron}
\end{figure}
\vspace{0.1in}

\vspace{0.1in}
\noindent
The two USB A ports on the PABLO will need to be capped when you work
with the vehicle on the water.

\vspace{0.1in}
\noindent
With the PABLO, the idea is that you (a) prepare your code in simulation
on your laptop, and push it to version control, (b) connect your PABLO
to the laptop and pull your code onto the PABLO and compile. And finally,
when you're ready to test on the water, (c) find a Heron, connect your
PABLO and launch your mission. So far we have been solely working in mode
(a), in simulation on your laptop. Connecting your PABLO and pulling and
preparing your code is a key step, and is the focus of today's lab.

\vspace{0.1in}
\noindent
When you do eventually connect your PABLO to the Heron, it will still
be possible to log onto your PABLO and pull code updates and
re-compile. However, robot time, especially dock-side on a day when
testing is supported, is a precious commodity. You will want to have
as much prepared on your PABLOs as possible before you arrive at the
dock.

\end{document}

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