\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{color}
\usepackage{hyperref}
\usepackage{multicol}
\usepackage{framed}
\usepackage{xcolor}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{fancyhdr}
\usepackage{verbatim}
\usepackage{textcomp}
\usepackage{colortbl}
\usepackage{array, booktabs, caption}
\usepackage{makecell}

\pagestyle{fancy}
\lfoot{\textbf{Open Source Rover Mechanical Assembly Manual}}
\rfoot{Page \thepage}
\lhead{\textbf{\leftmark}}
\rhead{\textbf{\rightmark}}
\cfoot{}
\renewcommand{\footrulewidth}{1.8pt}
\renewcommand{\headrulewidth}{1.8pt}
\doublespacing
\setlength{\parindent}{1cm}
% Parts list tables
\renewcommand\theadfont{\bfseries}
\newcolumntype{I}{ >{\centering\arraybackslash} m{2cm} }  % part image
\newcolumntype{N}{ >{\centering\arraybackslash} m{3cm} }  % part name
\newcolumntype{Q}{ >{\centering\arraybackslash} m{0.75cm} }  % ref & qty


\begin{document}

\newcommand\partimg{\includegraphics[width=2cm,height=1.25cm,keepaspectratio]}


\title{Open Source Rover: Corner Steering Assembly Instructions}
\author{Authors: Michael Cox, Eric Junkins, Olivia Lofaro}

\makeatletter
\def\@maketitle{
\begin{center}
	\makebox[\textwidth][c]{ \includegraphics[width=0.8\paperwidth]{"Pictures/Corner Title".png}}
	{\Huge \bfseries \sffamily \@title }\\[3ex]
	{\Large \sffamily \@author}\\[3ex]
	\includegraphics[width=.65\linewidth]{"Pictures/JPL logo".png}
\end{center}}
\makeatother

\maketitle

\noindent {\footnotesize Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise, does not constitute or imply its endorsement by the United States Government or the Jet Propulsion Laboratory, California Institute of Technology. \textcopyright  2018 California Institute of Technology. Government sponsorship acknowledged.}

% Introduction

\newpage

\tableofcontents


\section{3D printing}
First, print the 3D printed encoder mounts. The STL files for this are located in the Corner Steering Assembly folder, under 3D Printed Parts. If you do not have a 3D printer there are many online 3D printing services available. One such service is:

\begin{itemize}
	\item \href{https://www.makexyz.com}{https://www.makexyz.com}
\end{itemize}
To order these parts from Makexyz upload the STL file, select FDM under process, and PLA for Material, and then your desired color. \textbf{You will need a total of 4 of these encoder mount pieces}.

\section{Mechanical/Structural Assembly}
The Corner Steering assembly contains the steering motors which allow the rover to utilize Ackerman steering. One important aspect of this assembly is the use of the bearing blocks. These blocks help to take forces on the motor shaft against the gearbox and minimize lateral moments applied against the motor shaft. By using the bearing blocks, we help protect the motor and motor shaft from these forces that could otherwise damage the motor and its gearbox. The lever arm for the corner steering system is much farther away from the motor than at the drive motors, where we can get away with directly attaching the load path to the motor shaft.

\begin{table}[H]
    \centering
    \arrayrulecolor{lightgray}
    \sffamily\footnotesize
    \captionsetup{font={sf,bf}}
    \caption{Parts/Tools Necessary}
    \begin{tabular}{|N|Q|Q|I|N|Q|Q|I|}
        \hline
        \thead{Item} & \thead{Ref} & \thead{Qty} & \thead{Image} & \thead{Item} & \thead{Ref} & \thead{Qty} & \thead{Image} \\
        \hline
        3" Channel & S2 & 4 & \partimg{../../../images/parts_list/S2.jpg} & Motor (Corner Motor) & E6 & 4 & \partimg{../../../images/parts_list/E6.jpg} \\ \hline
        Motor Mount & S9 & 4 & \partimg{../../../images/parts_list/S9.jpg} & Absolute Encoder & E7 & 4 & \partimg{../../../images/parts_list/E7.jpg} \\ \hline
        0.25" Pillow Block & S10 & 8 & \partimg{../../../images/parts_list/S10.jpg} & \#6-32x1/4" Spacer & T1 & 16 & \partimg{../../../images/parts_list/T1.png} \\ \hline
        0.25" D-Shaft & S15 & 4 & \partimg{../../../images/parts_list/S15.jpg} & \#6-32 x 1.25" Threaded Standoff & T9 & 16 & \partimg{../../../images/parts_list/T9.jpg} \\ \hline
        0.25” to 6mm Clamping Shaft Coupler & S38 & 4 & \partimg{../../../images/parts_list/S38.jpg} & \#6-32x1/4" Button Head Screw & B1 & 24 & \partimg{../../../images/parts_list/B1.png} \\ \hline
        1/8” Bore Pinion Gear & S27 & 4 & \partimg{../../../images/parts_list/S27.jpg} & \#6-32x3/4" Button Head Screw & B5 & 16 & \partimg{../../../images/parts_list/B5.png} \\ \hline
        3D Printed Encoder Mount & S31 & 4 & \partimg{../../../images/parts_list/S31.png} & Allen Key Set & D2 & & \partimg{../../../images/parts_list/D2.jpeg} \\ \hline
    \end{tabular}
\end{table}

\begin{enumerate}
\item \textbf{Motor Mount:} Begin by mounting the motor mount \textbf{S9} to the motor \textbf{E6} using the screws procured with the mount. Once completed,
insert the \textbf{B5} screws that will be used to connect the mount through the 3-inch channel. Due to the orientation of the motor inside of the 3-inch channel, 
adding these screws later is difficult. See Figure \ref{corner steering step 1}.

\begin{figure}[H]
  \centering
  \begin{minipage}[b]{0.45\textwidth}
    \includegraphics[width=\textwidth]{"Pictures/CornerSt Step 1".PNG}
  \end{minipage}
  \hfill
  \begin{minipage}[b]{0.45\textwidth}
    \includegraphics[width=\textwidth]{"Pictures/CornerSt Step 2".PNG}
  \end{minipage}
  \caption{Corner Steering Motor Mount attachment (left) and \textbf{B5} screw insertion (right)}
  \label{corner steering step 1}
\end{figure}

\item \textbf{3-inch Channel Attachment:} Attach the motor and motor mount to the 3-inch channel using the threaded standoffs \textbf{T9} as seen in Figure \ref{corner steering 2}.

\begin{figure}[H]
  \centering
  \begin{minipage}[b]{0.45\textwidth}
    \includegraphics[width=\textwidth]{"Pictures/CornerSt Step 3".PNG}
  \end{minipage}
  \caption{Slide the \textbf{B5} screws through the 3-inch channel and screw down the standoffs. Note the motor is "inside" the channel.}
  \label{corner steering 2}
\end{figure}

\item \textbf{Shaft Coupler/Standoffs Attachment:} Using the shaft coupler \textbf{S38}, attach the motor shaft to the 0.25 inch D-shaft \textbf{S15}.
Figure \ref{corner steering 3} 

\begin{figure}[H]
  \centering
  \begin{minipage}[b]{0.45\textwidth}
    \includegraphics[width=\textwidth]{"Pictures/CornerSt Step 4".PNG}
  \end{minipage}
  \caption{Shaft coupler installation}
  \label{corner steering 3}
\end{figure}

\item \textbf{Encoder Mount:} The size and tolerance of the holes will vary slightly based on different 3D printers and materials. Press the 0.25 inch 
spacers \textbf{T1} into the 3D printed encoder mount \textbf{S31}. If they do not fit easily, tapping them with a small hammer may help. 
If the wholes are still too small, you can drill or file out the holes slightly until the spacers fit as shown in Figure \ref{encoder mount 1}.

\begin{figure}[H]
  \centering
  \begin{minipage}[b]{0.45\textwidth}
    \includegraphics[width=\textwidth]{"Pictures/CornerSt Step 5".PNG}
  \end{minipage}
  \caption{Shaft coupler installation}
  \label{encoder mount 1}
\end{figure}

Next, attach the 0.25 inch pillow bearing blocks \textbf{S10} and encoder mount \textbf{S31} using the \textbf{B5} screws into the threaded standoffs \textbf{T3} as seen in 
Figure \ref{encoder mount 2}.

\begin{figure}[H]
  \centering
  \begin{minipage}[b]{0.45\textwidth}
    \includegraphics[width=\textwidth]{"Pictures/CornerSt Step 6".PNG}
  \end{minipage}
  \hfill
  \begin{minipage}[b]{0.45\textwidth}
    \includegraphics[width=\textwidth]{"Pictures/CornerSt Step 6b".PNG}
  \end{minipage}
  \caption{Encoder mount installation}
  \label{encoder mount 2}
\end{figure}

\item \textbf{Encoder:} Attach the encoder \textbf{E7} to the encoder mount \textbf{S31} and then attach the 12-tooth gear \textbf{S27} to 
the encoder shaft as shown in Figure \ref{corner steering 4}. We will worry about its exact position later on.

\begin{figure}[H]
  \centering
  \begin{minipage}[b]{0.45\textwidth}
    \includegraphics[width=\textwidth]{"Pictures/CornerSt Step 7".PNG}
  \end{minipage}
  \caption{Encoder and gear installed}
  \label{corner steering 4}
\end{figure}


You should now have one finished corner steering assembly. Repeat the 
steps above to build the other 3 corner steering assemblies. \textbf{Note: unlike other assemblies, this assembly 
isn't identical for all four. You will need to build two versions (one for the left side of the rover, one for the 
right side) where the encoder mount is mirrored left to right.  The absolute encoder should be on the 'outside' of 
the rover in all cases (see Figure \ref{corner steering 5} for an example).}

\begin{figure}[H]
  \centering
  \begin{minipage}[b]{0.45\textwidth}
    \includegraphics[width=\textwidth]{"Pictures/CornerSt Final".PNG}
  \end{minipage}
  \caption{Mirrored steering assemblies}
  \label{corner steering 5}
\end{figure}

\end{enumerate}

\end{document}
