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

%===================================================================
% Build the Cover Page in an environment style easy for wiki parsing
\begin{labcover}
\labtitle{Lab 1 - Overview and Machine Setup}
\vspace{0.2in}
\labcourse{2.680 Unmanned Marine Vehicle Autonomy, Sensing and Communications}
\vspace{0.5in}
\labpng{0.95}{figures/lab_one_topics.png}
%\labpng{0.75}{figures/sim_cluster.png}
\vspace{0.25in}
\labdate{February 4th, 2025}
\vspace{0.23in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering}
\labauth{MIT, Cambridge MA 02139}
\labtoc{scriptsize}
\labtocdepth{2}
\end{labcover}

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

%===================================================================
% Begin the body of the text
%===================================================================
\section{Overview and Objectives}
%===================================================================

\begin{labinfo}
%\labinfoheader{Topics:}
\begin{packed_itemize}[2]
\item Goal - Make sure everyone has a suitable development machine for
  the course on Day 1
\item Goal - All students able to build and run the course software on
  Day 1
\item Overview of the Course Web Pages and Support
\item Overview of Setting up Development Environment for MacBook Users
\item Getting Started with the Command Line
\item Downloading, Building, Running the Course software
\end{packed_itemize}
\end{labinfo}

%=======================================================================
\section{Linking the Course Web Pages}

There are two main web pages for this course, the main course page on
the MIT server, and the Piazza Page. We recommend putting these pages
in your browser's bookmarks or Favorites tab as soon as possible. We
will be referring to them a lot:

\vspace{0.1in}
\begin{packed_itemize}
\item {\em Course wiki}: \urlx{https://oceanai.mit.edu/2.680}
\item {\em Piazza}: \urlx{https://oceanai.mit.edu/piazza}
\end{packed_itemize}
\vspace{0.1in}

\noindent
Lectures and labs are posted and linked from the course page:

\begin{packed_itemize}
\item {\em Lectures}: \urlx{http://oceanai.mit.edu/2.680/lectures}
\item {\em Labs}: \urlx{http://oceanai.mit.edu/2.680/labs}
\end{packed_itemize}
\vspace{0.1in}

\noindent
This lab and other course labs are also online in wiki format at the
above link. The wiki pages are generated from the same content (LaTeX)
that generated the PDF or hard-copy version of the labs. This is
done as a matter of convenience and for later labs where there may be
videos embedded in the labs.

%=======================================================================
\section{Choosing a Development Environment for 2.680}
%=======================================================================

%==========================================================================

%======================================================================
\subsection{Machine Requirements for MIT 2.680}

In 2.680 you will need either a Linux or Mac laptop to do your work.
If you do have one, then you are most likely fine, assuming it is
fairly modern and sufficiently powerful. If you don't have one,
continue reading below for options.

%=======================================================================
\subsection{Options for Those Without a Mac or Linux Machine}

If you don't have a Linux or Mac laptop, I'm guessing you have a Windows
machine. (If someone doesn't fall into one of these three groups, I'd love
to know!)

\vspace{0.1in}
\noindent
If you have a Windows machine you will need to either:

\begin{packed_itemize}
\item Borrow a Linux or Mac laptop, or
\item Set up your Windows machine to dual-boot Linux, or
\item Run Linux inside a virtual machine on your Windows laptop (not recommended)
\end{packed_itemize}

\vspace{0.1in}
\noindent
If you can borrow a Linux or Mac laptop, this will almost certainly be
your best option. The 2.680 staff has a handful of Mac laptops to loan
for the semester, and a couple of older Linux laptops.  In my opinion,
even the older Linux laptops will be better options than running the
course code from a virtual machine.

\vspace{0.1in}
\noindent
While several of the TAs have experience setting up dual-boot machines
or setting up a virtual machine (VM) in Windows, for those choosing
this method, you are largely expected to be self-sufficient in setting
this up.  If you think you will need technical help setting up
dual-boot, or a VM, you are strongly encouraged to accept a loaner
machine instead. The Mac course laptops also come pre-loaded with the
necessary course software, making several things easier.


%=======================================================================
\subsection{What Qualifies as a Reasonably Powerful Machine?}

First, it should be mentioned, that the performance load on your
machine will increase during the semester. Initial labs will involve
simpler things. Later labs will involve multi-vehicle mission
simulations that you will want to run at 5x or 10x real-time. Your
ability to complete later labs will be diminished if your machine can
only run 2x real-time, especially if your lab partner is running 30x
real-time. You won't notice any of this in the first roughly 4 weeks
of the course, but you will notice later.

\vspace{0.1in}
\noindent
The vast majority of machines built in the last 5-10 years are
probably sufficient for use in this class.

\vspace{0.1in}
\noindent
{\em You can safely skip the discussion below on machine specs, especially
if you are confident you have a good working machine for the semester}

\vspace{0.1in}
\noindent
But let's discuss some of the metrics we use for those who may not be
familiar, or for those who may be considering upgrading their machine:

\begin{packed_itemize}
\item Number of CPUs, or "cores"
\item CPU Speed
\item RAM memory
\item Hard disk memory
\end{packed_itemize}

\vspace{0.1in}
\noindent
If your computer has at least two cores, each with a clock speed of 2.0GHz,
at least 8Gb of RAM, and 250Gb of hard disk space, you will be fine. Even
the above numbers are not hard thresholds. If you're curious about what
the above means, or you'd like some help in figuring out your machine specs,
feel free to check out the following help page link:

\vspace{0.1in}
\noindent
\urlx{https://oceanai.mit.edu/ivpman/help/cmdline_specs}
\vspace{0.1in}

%=======================================================================
\section{For Both MacBook and Linux Users}
%=======================================================================

%=======================================================================
\subsection{The 2.680 Software Environment}

In this class, we will want to run the MIT autonomy software
environment, and eventually your software creations as part of that
environment. The primary goal of today's lab, after making sure you
have a good machine, is to make sure that the MIT autonomy software
environment is loaded and running on your machine. By "environment" we
mean not only the MIT autonomy software, but also the software and
tools from other vendors or providers, for building the MIT software.

\vspace{0.1in}
\noindent
For some people this is 15 minutes of work. For others, maybe
longer. The issue is that the MIT software requires some other
software which in turn requires further software for obtaining
and building that software. We will go through all the steps.
For rather vanilla/typical Linux or Mac machines, this will be
pretty straight-forward.

%=======================================================================
\subsection{User Accounts on your Machine}

If you already have a Linux or Mac laptop prior to the start of
today's class, you probably already have a user account on your
laptop. If you are borrowing a machine from someone, and you are using
their user account, you should make your own account. If you are
accepting a 2.680 loaner laptop, you should also make your own
account, per the instructions below.

\vspace{0.1in}
\noindent
In both cases, it is a good idea to make your username on your 2.680
laptop match your MIT Athena username, which should be the same as the
first part of your MIT email address. If it is already set up with a
different username, it is probably not worth changing.

%=======================================================================
\section{Linux Users}

Linux users will most likely have nearly everything they need out of
the box.  This can be attributed to the fact that a Linux machine
already heavily utilizes software from the open source community. So
the compiler and package manager are probably already on your machine.

\vspace{0.1in}
\noindent
As mentioned earlier, if for some reason you don't already have an
account on your Linux machine, perhaps because you are borrowing it,
we recommend you make your own account. And we recommend that you use
your MIT Athena name. A new account can be added using the Linux
system utilities GUI, or it can be added on the command line as below
(assuming \var{janedoe} as a username):

\vspace{0.1in}
\begin{consoleverb}
$ sudo useradd -g users -s /bin/bash -d /home/janedoe janedoe
$ sudo passwd janedoe
\end{consoleverb}
\vspace{0.1in}

\noindent
Ask a 2.680 TA if you need help.

\vspace{0.1in}
\noindent
If you are a Linux user and you have your account all set up, you can
skip to Section \ref{sec_command_line}.

%=======================================================================
\section{MacBook Users}

This section is for the Mac user who is either (a) accepting a 2.680
loaner MacBook, or (b) is using their own Mac but has not done any
software development previously on this Mac. If this you, the below
sections will help you:

\begin{packed_itemize}
\item Make sure you have your own user account on your Mac.
\item Get started with accessing the Mac Terminal application which will
  be your primary way on the Mac to use the command line environment.
\item Make sure you have XCode installed on your machine, a hard requirement
  for building any course software.
\item Get started with a third-party package manager, either MacPorts
  or Homebrew. We recommend Homebrew, but both are fine.
\end{packed_itemize}

\vspace{0.1in}
\noindent
Note: If you are using a 2.680 provided Mac, you should already have
XCode and Homebrew installed. Students using one of the 2025 course
laptops are running the latest Mac operating system, Sequoia, a.k.a.,
Release 15.2 or 15.3.

\vspace{0.1in}
\noindent
{\bf Note:} For those using the 2.680 provided Mac laptops, XCode was
installed under my (mikerb) Apple ID. When or if there is an XCode
update offered to you, you will be prompted for my Apple ID. You have
two options. Come see me and I will type it in. Or, remove XCode from
your machine and re-install it using your own Apple ID. The latter
seems pretty disruptive, so I recommend the former. I think this is
super annoying and if anyone finds a work-around for this, please let
me know.


%-----------------------------------------------------------------------
\input{help_osx_newuser}
%-----------------------------------------------------------------------
\input{help_osx_terminal}
%-----------------------------------------------------------------------
\input{help_osx_xcode}
%-----------------------------------------------------------------------
\input{help_osx_homebrew}

%================================================================
\section{Getting Started with the Command Line}
\label{sec_command_line}

Most of the exercises in this lab are given from the perspective of
the command-line user. If you're not familiar with the command-line,
this is a powerful mode of interfacing with your computer that, for
many, {\em far} surpasses the efficiency afforded through a pure
point-and-click GUI experience. For Mac users, the command line comes
by way of the Terminal application discussed above. For GNU/Linux
users, you are very likely already accustomed to opening a console
or shell window. 


\vspace{0.1in}
\noindent
The below couple sections help the very-new users get started a bit. 
Just enough so we can reach the goals of our lab. Much more information
can be found on the web, and there are a few help pages related to the 
command line on the course help page:

\vspace{0.1in}
\noindent
\urlx{http://oceanai.mit.edu/ivpman/help}
\vspace{0.1in}

\noindent
Finally let's not overlook help already on your system. For any given
GNU/Linux command, for example \cmd{wget}, try one of the below to get
further information.

\vspace{0.1in}
\begin{consoleverb}
 $ man wget
 $ wget --help
\end{consoleverb}
\vspace{0.1in}

\input{help_cmd_basics}
\input{help_cmd_mkdir}
\input{help_cmd_movecopy}
\input{help_cmd_shell_env}
\input{help_cmd_shellpath}
\input{help_cmd_aliases}

%=======================================================================
\newpage
\section{All Users - Getting, Building and Running the Course Software}
\label{sec_course_software}

The objective is to build and run the "Hello World" version of the 
marine autonomy software, the Alpha mission. This will confirm for us 
that:

\begin{packed_itemize}
\item You have everything you need in terms of software installed on you machine.
\item You have properly configured your shell path to include the locations
of the software executables used in this class.
\end{packed_itemize}

\vspace{0.1in}
\noindent
Follow the steps here until you are able to successfully run the 
Alpha example mission.

\input{help_mip_download}
\input{help_mip_firstrun}

\end{document}

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