\documentclass[english,usenames,dvipsnames,smaller]{beamer}

\mode<presentation> {

% The Beamer class comes with a number of default slide themes
% which change the colors and layouts of slides. Below this is a list
% of all the themes, uncomment each in turn to see what they look like.

% \usetheme{default}
% \usetheme{AnnArbor}
% \usetheme{Antibes}
% \usetheme{Bergen}
%\usetheme{Berkeley}
%\usetheme{Berlin} %
% \usetheme{Boadilla} %
%\usetheme{CambridgeUS}
%\usetheme{Copenhagen}
%\usetheme{Darmstadt}
%\usetheme{Dresden}
%\usetheme{Frankfurt}
%\usetheme{Goettingen}
% \usetheme{Hannover}
% \usetheme{Ilmenau}
% \usetheme{JuanLesPins}
% \usetheme{Luebeck}
% \usetheme{Madrid} %
%\usetheme{Malmoe} %
%\usetheme{Marburg}
% \usetheme{Montpellier}
% \usetheme{PaloAlto}
% \usetheme{Pittsburgh} %
 \usetheme{Rochester} %
% \usetheme{Singapore}
% \usetheme{Szeged}
% \usetheme{Warsaw}

% As well as themes, the Beamer class has a number of color themes
% for any slide theme. Uncomment each of these in turn to see how it
% changes the colors of your current slide theme.

% \usecolortheme{albatross}
%\usecolortheme{beaver}
%\usecolortheme{beetle}
%\usecolortheme{crane}
%\usecolortheme{dolphin}
%\usecolortheme{dove}
%\usecolortheme{fly}
%\usecolortheme{lily}
%\usecolortheme{orchid}
%\usecolortheme{rose}
%\usecolortheme{seagull}
%\usecolortheme{seahorse}
%\usecolortheme{whale}
%\usecolortheme{wolverine}

%\setbeamertemplate{footline} % To remove the footer line in all slides uncomment this line
\setbeamertemplate{footline}[page number] % To replace the footer line in all slides with a simple slide count uncomment this line

%\setbeamertemplate{navigation symbols}{} % To remove the navigation symbols from the bottom of all slides uncomment this line
}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}

\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{hyperref}     
\usepackage{textcomp}                             % Símbolos e caracteres especiais
\usepackage{fancyhdr}    % Utilização de fancy headings
\usepackage{tikz}
\usetikzlibrary{decorations,patterns,decorations.pathreplacing}
\usetikzlibrary{shapes,positioning,arrows,automata,calc}
\usepackage{layout}
\usepackage{graphicx}
\usepackage{pdfpages}
\usepackage{pdflscape}
\usepackage{rotating}
\usepackage{float}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{xcolor}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{unitsdef}
\usepackage{placeins}
\usepackage{circuitikz}
\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}
\usepackage{multicol}
\usepackage{multimedia}

\author{Emílio Estrelinha}
\title{\textbf{Tele-operation of a Humanoid Robot using Haptics and Load Sensors}}
\subtitle{Master Thesis Presentation}
\date{July 23, 2013} % Oficial date
%\date{July 12, 2013} % LAR metting

\usefonttheme{professionalfonts}

\institute[UA] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{	\textbf{University of Aveiro - Department of Mechanical Engineering}
	\\
	\medskip
	\textbf{Advisor} : Prof. Doutor Vitor M. F. Santos  \\ \textbf{Co-advisor} : Prof. Doutor Filipe M. T. P. da Silva % Your institution for the title page
\medskip
}
\begin{document}

%%% ******** TIKZ DEFINITIONS ******** %%%
% Define styles for the objects
\tikzstyle{block1} = [draw, fill=lightgray!40, rectangle,thick, minimum height=3em, minimum width=6em, text centered, text width=3cm]
\tikzstyle{block2} = [draw, fill=lightgray!40, circle ,minimum size=2.5cm, thick, text centered]
\tikzstyle{block?} = [draw, fill=lightgray!20, diamond, thick, minimum height=3em, minimum width=3em, text centered, text width=1.25cm]
\tikzstyle{bit} = [minimum width=0.5cm, minimum height=1.5em, outer sep=0pt, draw=black, semithick]
\tikzstyle{textonly} = [minimum width=0.5cm, minimum height=1.5em, semithick]
%%% ******************************** %%%


{
\setbeamertemplate{headline}{}
%\setbeamertemplate{footline}{} 
\begin{frame}
\titlepage
\end{frame}
}

%\setcounter{framenumber}{0}

\begin{frame}
    \frametitle{Contents} 
%    \begin{multicols}{2}
%  		\vspace{-15mm}
 		 \tableofcontents[hideallsubsections]
%  \end{multicols}
\end{frame}


\section{Introduction}

\subsection{Motivation}

\begin{frame}
    \frametitle{Introduction}
    \framesubtitle{Motivation}
%	\vspace{-5mm}
	\textbf{Problem:}
	
	Teach the robots how to walk and balance themselves.
	
	\vspace{15mm}
	
	\textbf{Solution:}
	
	Use a haptic feedback system to sense the stability/equilibrium of the robot and use a robot learning from demonstration algorithm.
	
%    \begin{itemize}
%    	\item No definitive model for the kinematics of a humanoid robot
%    	\item Uneven responses due to the elastic elements
%    	\item Use haptics to teach the robot
%    	\item Use sensory data to generate force feedback
%    \end{itemize}
\end{frame}


\subsection{Objectives}

\begin{frame}
    \frametitle{Introduction}
    \framesubtitle{Objectives}
    
    \begin{itemize}
    	 \item Implement the ROS platform
		 \item Develop a data acquisition unit for the load cells
		 \item Link the load cells data with the haptic force feedback
		 \item Develop a control system for the robot with haptics
		 \item Perform balancing demonstrations
		 \item Record all relevant data
    \end{itemize}
\end{frame}



\begin{frame}
    \frametitle{Introduction}
	\vspace{-7.5mm}
	\begin{center}
	\begin{tikzpicture}[auto, node distance=1.75cm,>=latex']
    	% We start by placing the blocks
    	\node [block1, left, name=user, fill=red!40!white] {\textbf{User}};
    
    	\node [block1, below of=user,  name=device, fill=green!40!white] {\textbf{Haptic Device}};
    
    	\node [block1, right of=device, node distance=5cm, name=robot, fill=green!40!white] {\textbf{Robot}};
    
    	\node [block1, right of=robot, node distance=2cm, below of=robot, xshift=9mm, name=environment, fill=red!40!white] {\textbf{Environment}};
    
    	\node [block1, below of=robot,node distance=4cm, name=cells, fill=green!40!white] {\textbf{Load Cells}};

    	
    	\path[draw,<->, very thick] (user.south) -- (device.north);
    
    	\path[draw,->, very thick] (device.east) -- (robot.west);
    
   		\path[draw,->, very thick](cells.west) edge [bend left=35] (device.south)
    
    					(environment.south) edge [bend left=20] (cells.east)
    					 
   						(environment.north) edge [bend right=20] (robot.east)
    
    					(robot.south) -- (cells.north);
        
	\end{tikzpicture}
	\end{center}
\end{frame}

\subsection{Framework}

\begin{frame}
    \frametitle{Framework}
    \framesubtitle{PHUA robot}
    \begin{figure}
		\begin{minipage}[b]{0.5\textwidth}
			\begin{itemize}
				\item 27 degrees of freedom
%				\begin{itemize}
%					\item 25 actuated
%					\item 2 passive
%				\end{itemize}
%			\item Anthropometric measurements
			\item Force sensors
			\item Hybrid actuation system
			\end{itemize}
			\vspace{0.35\textheight}
		\end{minipage}
		\hspace{0.3cm}
			\begin{minipage}[b]{0.45\textwidth}
			\centering
			\includegraphics[height=0.85\textheight]{Images/phua_front_p.pdf}
			\caption*{PHUA robot.}
		\end{minipage}
	\end{figure}
\end{frame}

\begin{frame}
    \frametitle{Framework}
    \framesubtitle{Haptic device}
    \begin{figure}
		\begin{minipage}[b]{0.4\textwidth}
			\begin{itemize}
				\item 6 degrees of freedom
				\item Maximum force of $3.3 \newton$
%				\item Position sensing
%				\begin{itemize}
%					\item Digital encoders for $x, y,z$
%					\item Potentiometers for roll, pitch, yaw
%				\end{itemize}
				\item Needs a control loop of at least $1000\hertz$
			\end{itemize}
			\vspace{0.333\textheight}
		\end{minipage}
		\begin{minipage}[b]{0.55\textwidth}
			\vspace{-5mm}
			\centering
			\includegraphics[width=0.85\textwidth]{Images/LargePHANTOMOmniImage.pdf}
			\\			
			\includegraphics[width=0.9\textwidth]{Images/phantom.pdf}
			\captionof*{figure}{PHANTOM OMNI hapic device.}
		\end{minipage}
	\end{figure}
\end{frame}


\section{Experimental setup}

\subsection{Load cells}

\begin{frame}
    \frametitle{Experimental setup}
    \framesubtitle{Load cells}
    \begin{center}

    	\begin{small}
			\begin{minipage}{0.95\textwidth}
  				\begin{table}
				\begin{tabular}{c|c|c}
					\hline
					\textbf{Characteristics}&\textbf{LBS-5}&\textbf{LBS-10}\\
					\hline
					\begin{tabular}{r}Nominal Load {[lbs]}\\{[N]}\end{tabular}& \begin{tabular}{c}5\\22,2\end{tabular} & \begin{tabular}{c}10\\44,4\end{tabular}\\
					Safe Overload & 150\% & 150\%\\
					Nonlinearity\% FS & 0,25 & 0,5\\
%					Rated Output {[mV/V]} & 2.0 & 2.0\\
				\end{tabular}
  				\end{table}
			\end{minipage}
		\end{small}
		
		\begin{minipage}{0.95\textwidth}\centering
			\includegraphics[height=0.55\textheight]{Images/LBS_1.pdf}
			\captionof*{figure}{LBS-5 load cell.}
		\end{minipage}
	\end{center}
\end{frame}


\subsection{Acquisition unit}

\begin{frame}
    \frametitle{Experimental setup}
    \framesubtitle{Acquisition unit}
    \vspace{-3mm}
	\begin{figure}
		\begin{minipage}[b]{0.60\textwidth}
			\begin{itemize}
				\item ATmega328P microcontroller
				\item $8\megahertz$
				\item 10-bit Analogue to digital converter
				\item $3.3 \volt \rightsquigarrow 5 \volt$
			\end{itemize}
			\vspace{0.30\textheight}
		\end{minipage}
		\hspace{0.3cm}
			\begin{minipage}[b]{0.35\textwidth}
			\centering
			\includegraphics[width=0.9\textwidth]{Images/ArduinoFio_coin.pdf}\\
			\includegraphics[width=0.85\textwidth]{Images/ArduinoFio2.pdf}
			\captionof*{figure}{Arduino Fio.}
		\end{minipage}
	\end{figure}
\end{frame}

\begin{frame}
    \frametitle{Experimental setup}
    \framesubtitle{Acquisition unit}
\begin{center}
\begin{figure}[H]
% The block diagram code is probably more verbose than necessary
	\begin{tikzpicture}[auto, >=latex]
		
		\node [bit, fill=blue!30] at (0,0) (b1_1) {L};
        \node [bit, anchor=west, fill=blue!30] at (b1_1.east) (b1_2) {O};
        \node [bit, anchor=west, fill=blue!30] at (b1_2.east) (b1_3) {A};
        \node [bit, anchor=west, fill=blue!30] at (b1_3.east) (b1_4) {D};
        \node [bit, anchor=west, fill=blue!30] at (b1_4.east) (b1_5) {C};
        \node [bit, anchor=west, fill=blue!30] at (b1_5.east) (b1_6) {E};
        \node [bit, anchor=west, fill=blue!30] at (b1_6.east) (b1_7) {L};
        \node [bit, anchor=west, fill=blue!30] at (b1_7.east) (b1_8) {L};
        \node [bit, anchor=west, fill=blue!30] at (b1_8.east) (b1_9) {0};
        \node [bit, anchor=west, fill=blue!30] at (b1_9.east) (b1_10) {1};
        
        \node [bit, fill=yellow!50] at (0,-1.5) (b2_1) {L};
        \node [bit, anchor=west, fill=yellow!50] at (b2_1.east) (b2_2) {O};
        \node [bit, anchor=west, fill=yellow!50] at (b2_2.east) (b2_3) {A};
        \node [bit, anchor=west, fill=yellow!50] at (b2_3.east) (b2_4) {D};
        \node [bit, anchor=west, fill=yellow!50] at (b2_4.east) (b2_5) {C};
        \node [bit, anchor=west, fill=yellow!50] at (b2_5.east) (b2_6) {E};
        \node [bit, anchor=west, fill=yellow!50] at (b2_6.east) (b2_7) {L};
        \node [bit, anchor=west, fill=yellow!50] at (b2_7.east) (b2_8) {L};
        \node [bit, anchor=west, fill=yellow!50] at (b2_8.east) (b2_9) {0};
        \node [bit, anchor=west, fill=yellow!50] at (b2_9.east) (b2_10) {2};
        
		\node [bit, fill=green!50] at (0,-3) (b3_1) {L};
        \node [bit, anchor=west, fill=green!50] at (b3_1.east) (b3_2) {O};
        \node [bit, anchor=west, fill=green!50] at (b3_2.east) (b3_3) {A};
        \node [bit, anchor=west, fill=green!50] at (b3_3.east) (b3_4) {D};
        \node [bit, anchor=west, fill=green!50] at (b3_4.east) (b3_5) {C};
        \node [bit, anchor=west, fill=green!50] at (b3_5.east) (b3_6) {E};
        \node [bit, anchor=west, fill=green!50] at (b3_6.east) (b3_7) {L};
        \node [bit, anchor=west, fill=green!50] at (b3_7.east) (b3_8) {L};
        \node [bit, anchor=west, fill=green!50] at (b3_8.east) (b3_9) {0};
        \node [bit, anchor=west, fill=green!50] at (b3_9.east) (b3_10) {3};
        
        \node [bit, fill=pink!50] at (0,-4.5) (b4_1) {L};
        \node [bit, anchor=west, fill=pink!50] at (b4_1.east) (b4_2) {O};
        \node [bit, anchor=west, fill=pink!50] at (b4_2.east) (b4_3) {A};
        \node [bit, anchor=west, fill=pink!50] at (b4_3.east) (b4_4) {D};
        \node [bit, anchor=west, fill=pink!50] at (b4_4.east) (b4_5) {C};
        \node [bit, anchor=west, fill=pink!50] at (b4_5.east) (b4_6) {E};
        \node [bit, anchor=west, fill=pink!50] at (b4_6.east) (b4_7) {L};
        \node [bit, anchor=west, fill=pink!50] at (b4_7.east) (b4_8) {L};
        \node [bit, anchor=west, fill=pink!50] at (b4_8.east) (b4_9) {0};
        \node [bit, anchor=west, fill=pink!50] at (b4_9.east) (b4_10) {4};
        
        \node [bit, fill=blue!30] at (6,-1.5) (b5_1) {0};
        \node [bit, anchor=west, fill=blue!30] at (b5_1.east) (b5_2) {1};
        \node [bit, anchor=west, fill=yellow!50] at (b5_2.east) (b5_3) {0};
        \node [bit, anchor=west, fill=yellow!50] at (b5_3.east) (b5_4) {2};
        \node [bit, anchor=west, fill=green!50] at (b5_4.east) (b5_5) {0};
        \node [bit, anchor=west, fill=green!50] at (b5_5.east) (b5_6) {3};
        \node [bit, anchor=west, fill=pink!50] at (b5_6.east) (b5_7) {0};
        \node [bit, anchor=west, fill=pink!50] at (b5_7.east) (b5_8) {4};
        
        \node [textonly] at (8.25,-1) {5th byte to send};
        
        \draw [decorate,decoration={brace,amplitude=10pt,raise=4pt,mirror}] (-0.25,-0.15) -- (3.75,-0.15) node [black,midway,yshift=-0.85cm] {\footnotesize 1st byte to send};
        \draw [decorate,decoration={brace,amplitude=10pt,raise=4pt,mirror}] (-0.25,-1.65) -- (3.75,-1.65) node [black,midway,yshift=-0.85cm] {\footnotesize 2nd byte to send};
        \draw [decorate,decoration={brace,amplitude=10pt,raise=4pt,mirror}] (-0.25,-3.15) -- (3.75,-3.15) node [black,midway,yshift=-0.85cm] {\footnotesize 3rd byte to send};
        \draw [decorate,decoration={brace,amplitude=10pt,raise=4pt,mirror}] (-0.25,-4.65) -- (3.75,-4.65) node [black,midway,yshift=-0.85cm] {\footnotesize 4th byte to send};
        
        \draw [decorate,decoration={brace,amplitude=7pt,raise=4pt,mirror},color=blue!70] (3.75,-0.15) -- (4.75,-0.15);
        \draw [draw,->, thick,color=blue!70] (4.25,-0.52) -- (4.25,-0.7)-- (6.25,-0.7) -- (6.25,-1);
        \draw [decorate,decoration={brace,amplitude=7pt,raise=4pt},color=blue!70] (5.75,-1.35) -- (6.75,-1.35);
        
        \draw [decorate,decoration={brace,amplitude=7pt,raise=4pt,mirror},color=yellow!85!black] (3.75,-1.65) -- (4.75,-1.65) ;
        \draw [draw,->, thick,color=yellow!85!black] (4.25,-2.02) -- (4.25,-2.4)-- (7.25,-2.4) -- (7.25,-2);
        \draw [decorate,decoration={brace,amplitude=7pt,raise=4pt,mirror},color=yellow!85!black] (6.75,-1.65) -- (7.75,-1.65) ;
        
        \draw [decorate,decoration={brace,amplitude=7pt,raise=4pt,mirror},color=green!70] (3.75,-3.15) -- (4.75,-3.15) ;
        \draw [draw,->, thick,color=green!70] (4.25,-3.52) -- (4.25,-3.7)-- (8.25,-3.7) -- (8.25,-2);
        \draw [decorate,decoration={brace,amplitude=7pt,raise=4pt,mirror},color=green!70] (7.75,-1.65) -- (8.75,-1.65) ;
        
        \draw [decorate,decoration={brace,amplitude=7pt,raise=4pt,mirror},color=pink!80!black] (3.75,-4.65) -- (4.75,-4.65) ;
        \draw [draw,->, thick,color=pink!80!black] (4.25,-5.02) -- (4.25,-5.2)-- (9.25,-5.2) -- (9.25,-2);
        \draw [decorate,decoration={brace,amplitude=7pt,raise=4pt,mirror},color=pink!80!black] (8.75,-1.65) -- (9.75,-1.65) ;
        
	\end{tikzpicture}
%	\captionof*{figure}{Bit rearrangement.}
\end{figure}
\end{center}
\end{frame}

\subsection{Signal conditioning}

\begin{frame}
    \frametitle{Experimental setup}
    \framesubtitle{Signal conditioning}
    \vspace{-3mm}
	\begin{figure}
		\begin{minipage}[b]{0.450\textwidth}
			\begin{itemize}
				\item INA122P instrumentation amplifier
				\item Power stabilizer capacitor
				\item Low-pass filter at $\approx500 \hertz$
				\item Same footprint as Arduino Fio
			\end{itemize}
			\vspace{0.30\textheight}
		\end{minipage}
		\hspace{0.3cm}
			\begin{minipage}[b]{0.5\textwidth}
			\centering
			\includegraphics[height=0.45\textheight]{Images/single_ina.pdf}\\
			\captionof*{figure}{Amplification circuit.}\vspace{-2mm}
			\includegraphics[height=0.35\textheight]{Images/board_full.pdf}
			\captionof*{figure}{Signal conditioning board.}
		\end{minipage}
	\end{figure}
\end{frame}

\subsection{Load cell's calibration}

\begin{frame}
    \frametitle{Experimental setup}
    \framesubtitle{Load cell's calibration}
        \vspace{-5mm}
\begin{figure}
        \centering
        \begin{subfigure}[b]{0.45\textwidth}
                \centering
                 \includegraphics[width=0.95\textwidth]{Images/cell4adc.pdf}
			\captionof*{figure}{Calibration curve of a LBS-5.}
        \end{subfigure}
        \begin{subfigure}[b]{0.45\textwidth}
                \centering
                 \includegraphics[width=0.95\textwidth]{Images/cell8adc.pdf}
			\captionof*{figure}{Calibration curve of a LBS-10.}
        \end{subfigure}
\end{figure}
\end{frame}


\subsection{Software}

\begin{frame}
    \frametitle{Experimental setup}
    \framesubtitle{Software}
    \begin{figure}
		\begin{minipage}[b]{0.35\textwidth}
			\begin{itemize}
				\item ROS
				\begin{itemize}
					\item Modular programming
					\item Free and open source
%					\item Supports \textit{C++}
				\end{itemize}
				\item OpenHaptics toolkit			
				\begin{itemize}
					\item Low-level control API
					\item High-level control API
					\item Includes drivers
%					\item Supports \textit{C++}
				\end{itemize}
			\end{itemize}
			\vspace{0.22\textheight}
		\end{minipage}
		\hspace{0.3cm}
			\begin{minipage}[b]{0.6\textwidth}
			\centering
			\includegraphics[height=0.45\textheight]{Images/ROSFuerte_poster1.pdf}\\
			\includegraphics[height=0.5\textheight]{Images/OpenHaptics.pdf}
		\end{minipage}
	\end{figure}
\end{frame}

\section{ROS modules}

\subsection{Structure}

\begin{frame}
    \frametitle{ROS modules}
    \framesubtitle{Structure}
    
\begin{figure}
\centering
\begin{tikzpicture}[auto, >=latex]
	
    \node [block1, name=cells, fill=yellow!40!white] {\textbf{\textit{pressure\_cells}}};
    
    \node [block1, right of=cells, node distance=6.5cm, name=haptic, fill=yellow!40!white] {\textbf{\textit{haptic\_force}}};
    
    \node [block1, below of=haptic, node distance=3cm, name=phantom, text width=4cm, fill=yellow!40!white] {\textbf{\textit{phantom\_control}}};
    
    \node [block1, left of=phantom, node distance=6.5cm, name=humanoid, text width=4cm, fill=yellow!40!white] {\textbf{\textit{humanoid\_control}}};
	
	\path [->,draw,very thick]  (cells) -- node{COP} (haptic);
	\path [->,draw,very thick]  (haptic) -- node{force} (phantom);
	\path [<-,draw,very thick]  (humanoid) -- node{state} (phantom);
	
\end{tikzpicture}
\end{figure}
\end{frame}


\subsection{pressure\_cells}

\begin{frame}
    \frametitle{ROS modules}
    \framesubtitle{\textit{pressure\_cells}}
    \vspace{-5mm}
\begin{figure}
% The block diagram code is probably more verbose than necessary
\centering
\begin{tikzpicture}[auto, node distance=3cm,>=latex']
		
		\node [block1, name=cell, text width=3.5cm, fill=green!40!white] {\small
		    {\textbf{Load cells}}};
				
				
		\node [block1, right of=cell, name=unit, node distance=6.5cm, fill=green!40!white] {
		    {\textbf{Acquisition unit}}};
				
		\node [block1, below of=unit, name=arduino, node distance=3cm, fill=yellow!40!white] {
		    \textbf{\textit{arduino} node}};
		    
		\node [block1, left of=arduino, name=cop, node distance=6.5cm, fill=yellow!40!white] {
		    \textbf{\textit{force\_cop} node}};
		
		\path [->,draw,very thick]  (cell) -- node{Analogue signal} (unit);
		\path [->,draw,very thick]  (unit) -- node{$6\times$Byte} (arduino);
		\path [<-,draw,very thick]  (cop) -- node[above]{Force's values} (arduino);
		\path [->,draw,very thick]  (cop.south) -- node{COP's} ++(0,-1);
		\path [<-,draw,very thick]  (cop.north) -- ++(0,0.5) node[right, yshift=2.5mm, xshift=-22.5mm]{Feet's transformation} -- ++(-1.5,0) ;
		
	\end{tikzpicture}
\end{figure}
\end{frame}

\subsection{haptic\_force}

\begin{frame}
    \frametitle{ROS modules}
    \framesubtitle{\textit{haptic\_force}}
        \vspace{-5mm}
\begin{figure}
% The block diagram code is probably more verbose than necessary
\centering
\begin{tikzpicture}[auto, node distance=3cm,>=latex']
		
		\node [block1, name=haptic, text width=3.5cm, fill=yellow!40!white] {
		    {\textbf{\textit{haptic\_force} module}}};
				
				
%		\node [block1, right of=cell, name=unit, node distance=6.5cm] {\footnotesize
%		    {\textbf{Acquisition unit}}};
		
	
		\path [<-,draw,very thick]  (haptic.west) -- node{COP} ++(-2.5,0);
		\path [<-,draw,very thick,dashed]  (haptic.east) --  ++(2.5,0) -- node[near end]{inertial, tilt, etc.} ++(0,2.5);
		\path [->,draw,very thick]  (haptic.south) -- node{Forces for device} ++(0,-2.5);
		
	\end{tikzpicture}
\end{figure}
\end{frame}

\subsection{phantom\_control}

\begin{frame}
    \frametitle{ROS modules}
    \framesubtitle{\textit{phantom\_control}}
\vspace{-5mm}
\begin{figure}
% The block diagram code is probably more verbose than necessary
\centering
\begin{tikzpicture}[auto, node distance=3cm,>=latex']
		
		\node [block1, name=phantom, text width=3.5cm, fill=yellow!40!white] {
		    {\textbf{\textit{phantom\_control} node}}};
		
		\node [block1, right of=phantom, name=servo, node distance=6cm, text width=3.5cm, fill=yellow!40!white] {
		    {\textbf{Servo loop}}};
		    
		\node [block1, below of=servo, name=device, node distance=2cm, text width=3.5cm, fill=green!40!white] {
		    {\textbf{Haptic device}}};
		    
		\path [<-,draw,very thick]  (phantom.north) -- ++(0,0.5) -- ++(3,0) -- ++(0,1) node[above]{Force};
		\path [->,draw,very thick]  (phantom.south) -- node[above]{Device state} ++(0,-1.5);
		\path [<-,draw,very thick]  (servo.north) -- ++(0,0.5) -- ++(-3,0);
		\path [<-,draw,very thick]  (phantom.east) -- node[above]{Device state} (servo.west);
		\path [<->,draw,very thick]  (device.north) -- node[above]{State} (servo.south);
	\end{tikzpicture}
\end{figure}
\end{frame}

\subsection{humanoid\_control}

\begin{frame}
    \frametitle{ROS modules}
    \framesubtitle{\textit{humanoid\_control}}
    \vspace{-5mm}
\begin{figure}
% The block diagram code is probably more verbose than necessary
\centering
\begin{tikzpicture}[auto, node distance=3cm,>=latex']
		
		\node [block1, name=humanoid, text width=3.5cm, fill=yellow!40!white] {
		    {\textbf{\textit{humanoid\_control} node}}};
		
		\node [block1, right of=humanoid, name=servo, text width=3.5cm, node distance=7.5cm, fill=green!40!white] {
		    {\textbf{Robot's servomotors}}};

		\path [<-,draw,very thick]  (humanoid.north) -- ++(0,1.5) node[above]{Device state};
		\path [->,draw,very thick]  (humanoid.south) -- ++(0,-1.5) node[right, near start]{Robot state};
		\path [<->,draw,very thick]  (humanoid.east) -- node[above]{Commands/Response} (servo.west);
	\end{tikzpicture}
\end{figure}
\end{frame}

\section{Demonstrations}

\begin{frame}
    \frametitle{Demonstrations}
%	\vspace{-3mm}
	\begin{figure}[c]
		\centering
		\includegraphics[height=0.9\textheight]{Images/robot2planes_center.pdf}
		\captionof*{figure}{Axis system.}
    \end{figure}
\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
%	\vspace{-3mm}
	\begin{figure}[c]
		\centering
		\includegraphics[width=0.9\textwidth]{Images/cells.pdf}
		\captionof*{figure}{Load cells placement.}
    \end{figure}
\end{frame}

\subsection{Vertical movement}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Vertical movement}
	\vspace{-3mm}
\begin{center}
\movie[width=0.9\textwidth, height=0.59\textwidth, poster, autostart, loop]{}{MoveZZ.avi}
\end{center}
\end{frame}

%\begin{frame}
%    \frametitle{Vertical movement}
%    \framesubtitle{Kinematics}
%	
%\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Vertical movement}
	\vspace{-3mm}
	 \begin{figure}[c]
                \centering
                \includegraphics[width=0.9\textwidth]{Images/Move_ZZ/phantom_joints_time.pdf}
                \captionof*{figure}{Actuated joints and $Z$ axis of the haptic device.}
     \end{figure}
\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Vertical movement}
	\vspace{-3mm}
\begin{figure}
        \centering
        \begin{subfigure}[c]{0.48\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_ZZ/humanoide_ard2_time.pdf}
  \captionof*{figure}{Forces on the left foot.}
        \end{subfigure}
        \hspace{2mm}
        \begin{subfigure}[c]{0.48\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_ZZ/humanoide_ard1_time.pdf}
  				 \captionof*{figure}{Forces on the right foot.}
        \end{subfigure}
\end{figure}
\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Vertical movement}
	\vspace{-3mm}
\begin{figure}[c]
        \centering%\hspace{-14mm}
        \includegraphics[width=0.975\textwidth]{Images/Move_ZZ/humanoide_total_ard_1_2_time.pdf}
  	    \captionof*{figure}{Sum of forces.}%
\end{figure}
\end{frame}

%\begin{frame}
%    \frametitle{Demonstrations}
%    \framesubtitle{Vertical movement}
%	\vspace{-3mm}
%\begin{figure}
%        \centering
%        \begin{subfigure}[c]{0.48\textwidth}
%                \centering
%                 \includegraphics[width=\textwidth]{Images/Move_ZZ/cop_LR_values.pdf}
%  \captionof*{figure}{Complete COP.}%\vspace{2.5mm}
%        \end{subfigure}
%        \begin{subfigure}[c]{0.48\textwidth}
%                \centering
%                 \includegraphics[width=\textwidth]{Images/Move_ZZ/cop_LR_axis_values.pdf}
%  \captionof*{figure}{Components of the COP.}
%        \end{subfigure}
%\end{figure}
%\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Vertical movement}
	\vspace{-3mm}
\begin{figure}[c]
        \centering\hspace{-14mm}
        \includegraphics[width=0.975\textwidth]{Images/Move_ZZ/cop_LR_values.pdf}
  	    \captionof*{figure}{Complete COP.}%
\end{figure}
\end{frame}

\subsection{Lateral movement}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Lateral movement}
	\vspace{-3mm}
\begin{center}
\movie[width=0.9\textwidth, height=0.59\textwidth, poster, autostart, loop]{}{MoveYY.avi}
\end{center}
\end{frame}

%\begin{frame}
%    \frametitle{Lateral movement}
%    \framesubtitle{Kinematics}
%	
%\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Lateral movement}
	\vspace{-3mm}
	 \begin{figure}[b]
                \centering
                 \includegraphics[width=0.9\textwidth]{Images/Move_YY/phantom_joints_time.pdf}
                \captionof*{figure}{Actuated joints and $Y$ axis of the haptic device.}
     \end{figure}
\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Lateral movement}
	\vspace{-3mm}
\begin{figure}
        \centering
        \begin{subfigure}[c]{0.48\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_YY/humanoide_ard2_time.pdf}
  \captionof*{figure}{Forces on the left foot.}
        \end{subfigure}
        \hspace{2mm}
        \begin{subfigure}[c]{0.48\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_YY/humanoide_ard1_time.pdf}
  				 \captionof*{figure}{Forces on the right foot.}
        \end{subfigure}
\end{figure}
\end{frame}

%\begin{frame}
%    \frametitle{Demonstrations}
%    \framesubtitle{Lateral movement}
%	\vspace{-3mm}
%\begin{figure}
%        \centering
%        \begin{subfigure}[c]{0.48\textwidth}
%                \centering
%                 \includegraphics[width=\textwidth]{Images/Move_YY/cop_LR_values.pdf}
%  \captionof*{figure}{Complete COP.}%\vspace{2.5mm}
%        \end{subfigure}
%        \begin{subfigure}[c]{0.48\textwidth}
%                \centering
%                 \includegraphics[width=\textwidth]{Images/Move_YY/cop_LR_axis_values.pdf}
%  \captionof*{figure}{Components of the COP.}
%        \end{subfigure}
%\end{figure}
%\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Vertical movement}
	\vspace{-3mm}
\begin{figure}[c]
        \centering\hspace{-14mm}
        \includegraphics[width=0.975\textwidth]{Images/Move_YY/cop_LR_values.pdf}
  	    \captionof*{figure}{Complete COP.}%
\end{figure}
\end{frame}


\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Lateral movement}
\begin{figure}
        \centering
        \begin{subfigure}[c]{0.49\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_YY/cop_x_axis_w_force_x_axis.pdf}
  \captionof*{figure}{$X$'s Components.}
        \end{subfigure}
        \begin{subfigure}[c]{0.49\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_YY/cop_y_axis_w_force_y_axis.pdf}
  \captionof*{figure}{$Y$'s Components.}
        \end{subfigure}
\end{figure}
\end{frame}

\subsection{Sagittal movement}


\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Sagittal movement}
	\vspace{-3mm}
\begin{center}
\movie[width=0.9\textwidth, height=0.59\textwidth, poster, autostart, loop]{}{MoveXX.avi}
\end{center}
\end{frame}

%\begin{frame}
%    \frametitle{Sagittal movement}
%    \framesubtitle{Kinematics}
%	
%\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Sagittal movement}
	\vspace{-3mm}
	 \begin{figure}[b]
                \centering
                 \includegraphics[width=0.9\textwidth]{Images/Move_XX/phantom_joints_time.pdf}
                \captionof*{figure}{Actuated joints and $X$ axis of the haptic device.}
     \end{figure}
\end{frame}
\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Sagittal movement}
	\vspace{-3mm}
\begin{figure}
        \centering
        \begin{subfigure}[c]{0.48\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_XX/humanoide_ard2_time.pdf}
  \captionof*{figure}{Forces on the left foot.}
        \end{subfigure}
        \hspace{2mm}
        \begin{subfigure}[c]{0.48\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_XX/humanoide_ard1_time.pdf}
  				 \captionof*{figure}{Forces on the right foot.}
        \end{subfigure}
\end{figure}
\end{frame}

%\begin{frame}
%    \frametitle{Demonstrations}
%    \framesubtitle{Sagittal movement}
%	\vspace{-3mm}
%\begin{figure}
%        \centering
%        \begin{subfigure}[c]{0.48\textwidth}
%                \centering
%                 \includegraphics[width=\textwidth]{Images/Move_XX/cop_LR_values.pdf}
%  \captionof*{figure}{Complete COP.}%\vspace{2.5mm}
%        \end{subfigure}
%        \begin{subfigure}[c]{0.48\textwidth}
%                \centering
%                 \includegraphics[width=\textwidth]{Images/Move_XX/cop_LR_axis_values.pdf}
%  \captionof*{figure}{Components of the COP.}
%        \end{subfigure}
%\end{figure}
%\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Vertical movement}
	\vspace{-3mm}
\begin{figure}[c]
        \centering\hspace{-14mm}
        \includegraphics[width=0.975\textwidth]{Images/Move_XX/cop_LR_values.pdf}
  	    \captionof*{figure}{Complete COP.}%
\end{figure}
\end{frame}

\begin{frame}
    \frametitle{Demonstrations}
    \framesubtitle{Lateral movement}
\begin{figure}
        \centering
        \begin{subfigure}[c]{0.49\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_XX/cop_x_axis_w_force_x_axis.pdf}
  \captionof*{figure}{$X$'s Components.}
        \end{subfigure}
        \begin{subfigure}[c]{0.49\textwidth}
                \centering
                 \includegraphics[width=\textwidth]{Images/Move_XX/cop_y_axis_w_force_y_axis.pdf}
  \captionof*{figure}{$Y$'s Components.}
        \end{subfigure}
\end{figure}
\end{frame}



\section{Conclusions and future work}

\subsection{Conclusions}

\begin{frame}
    \frametitle{Conclusions and future work}
    \framesubtitle{Conclusions}
	 \begin{itemize}
    	 \item Implement the ROS platform \cmark
		 \item Develop a data acquisition unit for the load cells \cmark
		 \item Link the load cells data with the haptic force feedback \cmark
		 \item Develop a control system for the robot with haptics \cmark
		 \item Perform balancing demonstrations \cmark
		 \item Record all relevant data \cmark
    \end{itemize}
\end{frame}


\subsection{Future work}

\begin{frame}
    \frametitle{Conclusions and future work}
    \framesubtitle{Future work}
	\begin{itemize}
    	 \item Velocity control% $\longrightarrow$ Difficult due to servomotor's communication
    	 \item Use of the $Z$ component of the force
    	 \item Experiment with different formulas for force generation% $\longrightarrow$ Trials
    	 \item Addiction of other sensors for force generation
    	 \item Improve kinematic model
    	 \item Usage of two haptic devices
    \end{itemize}
\end{frame}

%\begin{frame}
%    \begin{minipage}[b]{0.6\textwidth}
%    	\centering
%		\begin{LARGE}
%			Questions?
%		\end{LARGE}
%		\vspace{0.3\textheight}
%	\end{minipage}
%	\begin{minipage}[b]{0.38\textwidth}
%		\vspace{-5mm}
%		\centering
%		\includegraphics[width=0.95\textwidth]{Images/gundam.pdf}
%	\end{minipage}
%\end{frame}


{
\setbeamertemplate{headline}{}
\setbeamertemplate{footline}{} 
\begin{frame}[noframenumbering]
	\titlepage
\end{frame}
}


\end{document}

