%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Teleoperation Experiments}
{\paragraph*{} This chapter describes some representative tele-operation experiments carried out with the real physical robot, while the human operator receives haptic feedback in the form of a force synthesized in the joystick. The experimental results aim to evaluate the utility of using a haptic joystick with force feedback in specific tasks involving robot's balance, as well as to illustrate the major challenges when transferring skills from humans to robots. In these experiments the robot's torso was removed to simplify the experiments and the user's challenges.} %\paragraph{} It should be mentioned that the proposed approach is not expected to require \linebreak specific prior knowledge on robot tele-operation from the user. Anyway, a user may need to \linebreak practice the tele-operation skills in order to perform repeatable and coherent experiments. As a matter of fact, a training phase was essential to allow the human operator to \linebreak better understand what force rendering algorithm is most effective, what sensorial \linebreak information reflects the real-word dynamics and how the robot reacts to the human intentions. \paragraph{} Performance metrics to help the human teacher understand the level of improvement achieved and the repetition over time were two fundamental factors contributing to improve the overall tele-operation's performance.

\section{Experiments and Metrics}
{The proposed tele-kinesthetic teaching approach is evaluated in different scenarios that can be distinguished by the level of human supervisory control (semi- \textit{vs.} full-control) and the influence of visual \textit{vs.} haptic feedback. Given the large number of robot's \acs{DOF} to control with a single joystick, the question posed was how to provide a natural and intuitive interface. As explained in Chapter 3, the location of the joystick's tip maps into the Cartesian coordinates of the hip section. In line with this, an inverse kinematics algorithm is used for translating the haptic commands into robot actions (\textit{i.e.,} angular displacements of the joints).\paragraph{} Figure \ref{axis} represents the relative orientation of the \textit{x-}, \textit{y-} and \textit{z-}axis of the reference coordinate systems associated with the haptic device \textit{S}p and the humanoid robot \textit{S}h. It is assumed a fixed alignment of the two coordinate systems during the bilateral control.}

\begin{figure}[H]
		\centering
		  \centering
		  \includegraphics[width=.5\linewidth]{imgs/Chapter5/Axis.jpg}
		\caption{Reference coordinate systems of the haptic device and humanoid robot.}
		\label{axis}
		\end{figure}
		
		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%		
	{The key component of the system is the haptic interface allowing the tele-operation of the humanoid robot based on force feedback (in addition to visual feedback). Taking into account these experiments, it was decided to use the sigmoid-type function in order to synthetize the feedback forces. In any of the experiments, the outcome can be measured in terms of the real path of the \acs{COP} since the stability is a priority goal. In line with this, two measures of statistical dispersion of the \acs{COP} samples are used to help understand the level of improvement achieved when the experience is repeated over time. }
{%This chapter proves the utility of using an haptic joystick with force feedback in operation of balancing. One important point of this work is based on the comparison between the different \acs{COP}s, this information defines the balance state of the robot. To ensure that the difference between the global COP can be proved mathematically, two metrics were created:}
\begin{itemize}
\item The first performance measure is the standard deviation estimated from the data samples as follows:

\begin{equation}
M1=\sqrt[]{\sum^{N}_{i=0} \frac{(COP_u(i)-mean(COP_u))^2}{Ntotal}}
\end{equation}
{where Ntotal represents the number of samples and the mean ($COP_u$) the mean of all the COP points.}


\item  { The second performance measure considers the \acs{COP} at the initial configuration as the desired one and calculates the mean distance from this reference:}

\begin{equation}\label{M2}
M2=(\sum^{N}_{i=0} \frac{COP_u(i)-COP_u(0)}{Ntotal} )
\end{equation}
{where Ntotal represents the number of samples and $COP_u(i)$ the different COP points.}  

\end{itemize} 

{The M1 and M2 performance measures are calculated for the x and y coordinates of the centre of pressure. For merging the two components into one single value, a global index is defined as the Euclidean norm (length of the vector) on the 2-D space. To complete the set of performance metrics, the area occupied by the COP is also calculated considering it a geometric figure (\textit{i.e.,} the COP lateral and frontal extreme limits are considered as the limits of the geometry figure and the 'area' Matlab function is applied). For the proposed experiments, a small area is desired since it reflects the robot's tendency to stay in balance. }
%{These metrics were chosen to demonstrate the trend behaviour during the movement of the humanoid robot. Sometimes, these two metrics may not be enough, because we are trying to test the viability to a later application of a learning algorithm. The area occupied by the \acs{COP} is also important, this area is calculated considering the \acs{COP} as a geometric figure, a higher area represents bad data and a small area represents good data, data that can be used as learning material. The last aspect to take into account in this metrics, is the total value. The 'total' is calculated as the norm of the two components of each metrics.}


\section{Robot's Balance Subject to External Perturbations }
{In the first experimental scenario, it is assumed that the human operator has the absolute control on the robot's actions. The experiment described here consists of using an industrial robot (FANUC) to create instabilities on the floor plate supporting the humanoid. The disturbance applied will be the same for all experiments and it is reflected in the angular movement performed by the support plate along the axis of interest in the time interval from 10 to 30 seconds (\textit{i.e.,} during the first 10 seconds the support plate remains in a horizontal level). In response to these unexpected external perturbations, the user should try to keep the robot in balance by compensating the force sensations that are transmitted by the haptic device. In any case, the robot's feet are kept in contact with the ground at a constant distance from each other. Figure \ref{FanucExp} shows the setup used for the experiments with the FANUC industrial robot.
}
%{In this experiment, an industrial robot FANUC was used to create instabilities on a flat plate supporting the humanoid. The operator will try to keep the robot in balance using the haptic device with and without force feedback (see Figure \ref{FanucExp}). The operator controls the humanoid robot using the haptic joystick with or without force feedback. This experiment try to prove that using the device with force feedback will improve the robot balance (\textit{i.e.,} a small \acs{COP} variation).}

\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.6\textwidth]{imgs/Chapter5/Novos/IntFanucHa}
		 \caption{The setup for experiments with the FANUC industrial robot.}
		  \label{FanucExp}
		\end{figure}

\subsection{Balance in the Lateral Plane}
{In this experiment, the FANUC is used to create a lateral disturbance in the support plate (see Figure \ref{FanucL}). In order to simplify the control actions, the robot's legs remain straight during the experiment, while the ankle and hip joints perform symmetric movements to maintain the hip section is a stable horizontal posture. The main goal is to compare the situation where the human operator just relies in visual feedback to that in which simultaneously relies in visual and haptic feedback. In terms of force feedback the parameters of the sigmoid function are the following: growing rate B=1.5 and deadzone M=0.015 mm.}
%After the movement begins the operator using the available  sensors (\textit{i.e.,} Vision or Force Feedback) tries to contradict the unbalance of the humanoid robot generated by the disturbance. This experiment is divided into two parts, experience with and without force feedback. In all of the experiments below the force generation function used was the Sigmoid function, Chapter 3 Section Force generation, with a deadzone and B parameter of 1.5. }



\begin{figure}[H]
		\centering
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.6\linewidth]{imgs/Chapter5/P2data/P1.png}
		  \caption{}
		  \label{sub1}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.6\linewidth]{imgs/Chapter5/P2data/P2.png}
		  \caption{}
		  \label{sub2}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.6\linewidth]{imgs/Chapter5/P2data/P3.png}
		  \caption{}
		  \label{sub3}
		\end{subfigure}
        \begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.6\linewidth]{imgs/Chapter5/P2data/P3.png}
		  \caption{}
		  \label{sub4}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.6\linewidth]{imgs/Chapter5/P2data/P2.png}
		  \caption{}
		  \label{sub5}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.6\linewidth]{imgs/Chapter5/P2data/P1.png}
		  \caption{}
		  \label{sub6}
		\end{subfigure}	
			\caption{Snapshots of the robot's balance in the lateral plane.}
		\label{FanucL}
		\end{figure}
		
		
		
		\subsubsection*{Only Visual Feedback}
{In this case, the human operator uses only its visual perception of unbalance to control the robot. The spatial variation of the COP coordinates and the respective time courses are represented in Figure \ref{F1:SForce} and Figure \ref{F1:COPXY2}, respectively.}

%{In this case, the force feedback effect is not activated. The operator will only use is vision and perception of unbalance to control the robot. The COP and its two coordinates are shown in Figure \ref{F1:SForce} and \ref{F1:COPXY2}, respectively. }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.8\textwidth]{imgs/Chapter5/FanucL/SH/COP.eps}
		 \caption{Spatial location of the COP under the feet without Force Feedback.}
		  \label{F1:SForce}
		\end{figure}

\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.8\textwidth]{imgs/Chapter5/FanucL/SH/COPXY.eps}
		 \caption{Trajectories of the COP in the \textit{x}- and \textit{y}-axis with without force feedback.}
		  \label{F1:COPXY2}
		\end{figure}

%{In the two Figures above, is possible to observe that the resultant COP generated shows that the unbalance state was not rectified. The COP has some expression vertically and laterally, \textit{i.e.,} COPY and COPX have a high range of values during the movement.
\clearpage
{In the two figures above, it is possible to observe that the resultant COP coordinates show a significant variation in its two components. Further, the corrections produced by the human during the system's tele-operation can explain the more evident oscillations in the COP along the y-axis. \paragraph{}Table \ref{Tab} summarizes the performance evaluation according to the previous measures.}
%\clearpage
%\paragraph{} In Table \ref{Tab} the results of the two metrics designed to compare results are shown. }

%\begin{table}[h]
%\centering
%\begin{tabular}{|c|c|c|c|c|}
%\hline
%   & x  (mm)& y  (mm)& $M_G$ (mm)  & Area  ($mm^2$)                     \\ \hline
%M1 & 1.0700 & 1.8103 & 2.1029 & \multirow{2}{*}{0.0031} \\ \cline{1-4}
%M2 & 1.2622 & 1.7186  &  2.1323  &                          \\ \hline
%\end{tabular}
%\caption{COP metrics without using force feedback.}
%\label{Tab}
%\end{table}

\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
       & \begin{tabular}[c]{@{}c@{}}$M_1$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_2$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_G$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}Area\\ ($mm^2$)\end{tabular} \\ \hline
\textit{x-axis} & 1.0700                                               & 1.2622                                               & \multirow{2}{*}{2.9948}                              & \multirow{2}{*}{0.0031}                                 \\ \cline{1-3}
\textit{y-axis} & 1.8103                                               & 1.7186                                               &                                                      &                                                         \\ \hline
\end{tabular}
\caption{COP metrics without using force feedback.}
\label{Tab}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{Comparing the metrics of the experiment with and without force feedback, the\linebreak differences are evident. In all parameters if the force feedback is not active the metrics show higher values. M1 and M2 have values of 2.5358 and 2.9808 (mm) and a area of 0.0031, these values are too high and prove that without the use of force feedback, the tele-operation may not be considered as learning material.\paragraph{} This is also confirmed by the force generated, visible in Figure \ref{F1:Force2}. }
%
%\begin{figure}[H]
%		  \centering 
%		  \includegraphics[width=0.85\textwidth]{imgs/Chapter5/FanucL/SH/Force.eps}
%		 \caption{Force generated without using force feedback}
%		  \label{F1:Force2}
%		\end{figure}	
%
%{The generated force unlike the previous one as really high values for a long period of time. This aspect shows that the operator using only vision could not contradict the unbalance state. In the next two Figures, the variation done by the operator in the haptic device, with and without the filter, and the consequent joint angle variation can be seen. The parameter used to filter the data was $\frac{PI}{4}$.  }
%
%
%\begin{figure}[H]
%		  \centering 
%		  \includegraphics[width=1\textwidth]{imgs/Chapter5/FanucL/SH/Duo.eps}
%		 \caption{Joystick variation during the movement without using force feedback}
%		  \label{F1SFJoint}
%		\end{figure}
%		
%	\begin{figure}[H]
%		  \centering 
%		  \includegraphics[width=0.85\textwidth]{imgs/Chapter5/FanucL/SH/angle.eps}
%		 \caption{Ankle variation during the movement without using force feedback}
%		  \label{F1SFJoint}
%		\end{figure}
%
%
%		
%{The joint angle variation show that the operator tries to follow the movement done by the fanuc, when the fanuc reaches its maximum, the joints are almost in the maximum value too.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%		
\subsubsection*{Visual and Haptic Feedback}

{In this experiment the human operator uses simultaneously visual and haptic feedback to perform the same task: react to the unbalance produced by the unexpected movement of the support plate. Figure \ref{F1:ExpFF} and \ref{F1:COPXY} illustrates the COP generated in these circumstances.} 
%{In this experiment the operator uses the haptic joystick with force feedback, to \linebreak contradict the unbalance produced by the motion plate movement. In Figure \ref{F1:ExpFF} and \ref{F1:COPXY} the COP generated during this experiment can be seen.  }

\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.8\textwidth]{imgs/Chapter5/FanucL/FH/COP.eps}
		 \caption{Spatial location of the COP under the feet with force feedback.}
		  \label{F1:ExpFF}
		\end{figure}
		
\begin{figure}[H]
		  \centering 
		  \includegraphics[width=1\textwidth]{imgs/Chapter5/FanucL/FH/COPXY.eps}
		 \caption{Trajectories of the COP in the\textit{ x}- and \textit{y}-axis with force feedback.}
		  \label{F1:COPXY}
		\end{figure}
	
	%{Once the movement is made laterally it is expected that the most marked changes occur in the Y component. Another aspect is the constant \acs{COP} variation, this particular aspect show that the haptic joystick is trying to contradict the movement. The calculated metrics can be seen in the Table \ref{Met}.}
	
	{As expected in the event of a lateral disturbance, the most significant changes occur now in the \textit{y} component. At the same time, the bilateral control seems to make the operator feel more connected to the remote system and the improvements can be observed in the bottom of the Figure \ref{F1:COPXY} In the same line of thought, Table \ref{Met} presents the performance measures used to assess the improvements achieved.}

\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
       & \begin{tabular}[c]{@{}c@{}}$M_1$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_2$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_G$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}Area\\ ($mm^2$)\end{tabular} \\ \hline
\textit{x-axis} & 0.4773                                               & 0.39687                                              & \multirow{2}{*}{1.5473}                              & \multirow{2}{*}{0.0016}                                 \\ \cline{1-3}
\textit{y-axis} & 1.1209                                               & 0.86738                                              &                                                      &                                                         \\ \hline
\end{tabular}
\caption{COP metrics using force feedback.}
\label{Met}
\end{table}	
%	\begin{table}[h]
%\centering
%\begin{tabular}{|c|c|c|c|c|}
%\hline
%   & x  (mm)& y  (mm) & $M_G$  (mm)  & Area   ($mm^2$)    \\ \hline
%M1 & 0.4773 & 1.1209&  1.2183 & \multirow{2}{*}{0.0016} \\ \cline{1-4}
%M2 & 0.39687 & 0.86738  & 0.9539 &                          \\ \hline
%\end{tabular}
%\caption{COP metrics using force feedback.}
%\label{Met}
%\end{table}

	
	%{ The way that operator control is greatly influenced by the force generated, the higher the \acs{COP} the greater the force. In Figure \ref{F1:Force1}, the force created is shown. }
	{The control loop involves the output motion from the user and the input force from the humanoid robot. Figures \ref{F1:Force1} and \ref{F1:EpFFF} show the time course of the force generated on the user's hand and the joystick commands from the user, respectively. For comparative purpose, Figure \ref{F1:EpFFF} superimposes on the same graph the joystick tip position when only visual feedback (green) and when combining both visual and haptic feedback (blue). On the one hand, the force generated consists of both peaks and periods in which the values remain almost constant. On the other hand, the raw- and filtered-data (for a slope resolution of $\frac{\pi}{4}$) from the joystick indicate how the human operator tries to compensate the robot's unbalance in the different phases of the movement (the dashed line represents the angle of inclination of the support surface).}
	\begin{figure}[H]
		  \centering 
		  \includegraphics[width=1\textwidth]{imgs/Chapter5/FanucL/FH/Force.eps}
		 \caption{Force generated using visual and force feedback.}
		  \label{F1:Force1}
		\end{figure}			
	
	%{The force generated, consist mainly of force peaks and not at high constant force values. This occurs due to the force feedback effect, when the force reaches high values is quickly corrected. The joystick data and the filtered data used for controlling the humanoid robot and the corresponding joint angle values can be seen in Figure \ref{F1:EpFFF} and \ref{F1:ExpFFF}. To filter the joystick data was defined a angle parameter of $\frac{PI}{4}$.
	}
	\begin{figure}[H]
		  \centering 
		  \includegraphics[width=1\textwidth]{imgs/Chapter5/FanucL/FH/Duo.eps}
		 \caption{Joystick variation during the movement in the lateral plane.}
		  \label{F1:EpFFF}
		\end{figure}
		
	\begin{figure}[H]
		  \centering 
		  \includegraphics[width=1\textwidth]{imgs/Chapter5/FanucL/FH/Ankle.eps}
		 \caption{Ankle variation during the movement in the lateral plane.}
		  \label{F1:ExpFFF}
		\end{figure}
{To complete the picture, Figure \ref{F1:ExpFFF} shows the time evolution of the robot ankle joints. Once again, the curves relating to visual and haptic feedback (blue) are superimposed. Despite improvements, Figure \ref{F1:EpFFF} and Figure \ref{F1:ExpFFF} illustrate the major challenge in force feedback: the difficult trade-off between stability and performance. The constant variation of the angles shows that the operator is trying to reverse the unbalance phase. There is a relationship between the force felt by the operator, its control of the haptic device and, consequently, the humanoid robot actions. Observing the humanoid's motion, it is possible to view that when the slope reaches a maximum value the same happens to the joint angles of the robot.}		



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\clearpage
\subsection{Balance in the Sagittal Plane}
%{The second part of the experiment uses the fanuc joint 6 and the movement is done vertically (see Figure \ref{FanucVer}). The force generation function used was Sigmoid function with a M and B parameter of 0.015 mm.  } 
{In the second part of this experiment, the perturbation applied by the FANUC to the support plate affects the sagittal plane (see Figure \ref{FanucVer}). Here, force generation is based on the sigmoid function with the same parameter values.}
\begin{figure}[H]
		\centering
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.8\linewidth]{imgs/Chapter5/P3data/P1.png}
		  \caption{}
		  \label{sub1}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.8\linewidth]{imgs/Chapter5/P3data/P2.png}
		  \caption{}
		  \label{sub2}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.8\linewidth]{imgs/Chapter5/P3data/P3.png}
		  \caption{}
		  \label{sub3}
		\end{subfigure}
        \begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.8\linewidth]{imgs/Chapter5/P3data/P3.png}
		  \caption{}
		  \label{sub4}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.8\linewidth]{imgs/Chapter5/P3data/P2.png}
		  \caption{}
		  \label{sub5}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.8\linewidth]{imgs/Chapter5/P3data/P1.png}
		  \caption{}
		  \label{sub6}
		\end{subfigure}	
			\caption{Snapshots of the robot's balance in the sagittal plane.}
		\label{FanucVer}
		\end{figure}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection*{Only Visual Feedback}
%{In the second test, the operator attempts to operate the robot in balance but in this case, only vision is used. The COP and its two coordinates are shown in Figure \ref{F3:SForce} and \ref{F3:COPXY2}, respectively. }
{Following a procedure similar to the previous sub-section, the operator is instructed to guide the robot's behaviour using only the vision sense. The spatial variation of the COP coordinates and the respective time courses are represented in Figure \ref{F3:SForce} and Figure \ref{F3:COPXY2}, respectively.}
\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.8\textwidth]{imgs/Chapter5/FanucV/SH/COP.eps}
		 \caption{Spatial location of the COP under the feet with force feedback.}
		  \label{F3:SForce}
		\end{figure}
		
\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.8\textwidth]{imgs/Chapter5/FanucV/SH/COPXY.eps}
		 \caption{Trajectories of the COP in the x- and y-axis without force feedback.}
		  \label{F3:COPXY2}
		\end{figure}
	
%{In the two figures above the movement suffer a significant variation. To prove this mathematically, in Table \ref{Me3} the results of different metrics can be seen.}
{In this experiment, the variation of the COP's coordinates is not as pronounced as before. The same result is evidenced by the values shown in Table \ref{Me3}.}
%\begin{table}[h]
%\centering
%\begin{tabular}{|c|c|c|c|c|}
%\hline
%   & x  (mm) & y  (mm)      & $M_G$  (mm)  & Area  ($mm^2$)    \\ \hline
%M1 & 0.6309 & 0.4144 &  0.7548 & \multirow{2}{*}{0.0009} \\ \cline{1-4}
%M2 & 0.45415  & 0.26745 & 0.5271 &                         \\ \hline
%\end{tabular}
%\caption{COP metrics without force feedback.}
%\label{Me3}
%\end{table}

\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
       & \begin{tabular}[c]{@{}c@{}}$M_1$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_2$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_G$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}Area\\ ($mm^2$)\end{tabular} \\ \hline
\textit{x-axis} & 0.6309                                               & 0.45415                                              & \multirow{2}{*}{0.9206}                              & \multirow{2}{*}{0.0009}                                 \\ \cline{1-3}
\textit{y-axis} & 0.4144                                               & 0.26745                                              &                                                      &                                                         \\ \hline
\end{tabular}
\caption{COP metrics without force feedback.}
\label{Me3}
\end{table}

%{ The results of the metrics show that as noted in figure \ref{F3:COPXY2} without using force feedback, the COP variation is more significant. Although this variation is not so considerable than the one in the lateral experiment, in cases of equilibrium even the small variation can lead the humanoid robot to fall. In figure \ref{F3:ForceSF} the force generated can be seen.   }			
%		
%\begin{figure}[H]
%		  \centering 
%		  \includegraphics[width=0.85\textwidth]{imgs/Chapter5/FanucV/SH/Force.eps}
%		 \caption{Generated force without using force feedback}
%		  \label{F3:ForceSF}
%		\end{figure}
%		
%{In the force generated during movement, between 15 and 22 seconds the force starts to growing and the operator can not contradict this lack of balance using only vision. The movement done by the operator and the corresponding angle joint variation shown in the Figure \ref{F3:Angleee} and \ref{F3:ExpF}. Tthe parameter used to filter the joystick data was $\frac{PI}{4}$.}
%
%		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%	
%
%
%\begin{figure}[H]
%		  \centering 
%		  \includegraphics[width=1\textwidth]{imgs/Chapter5/FanucV/SH/Duo.eps}
%		 \caption{Joystick variation without using force feedback}
%		  \label{F3:ExpF}
%		\end{figure}
%			
%\begin{figure}[H]
%		  \centering 
%		  \includegraphics[width=0.85\textwidth]{imgs/Chapter5/FanucV/SH/Ankle.eps}
%		 \caption{Ankle variation without using force feedback}
%		  \label{F3:Angleee}
%		\end{figure}
%		
%
%	{The movement made by the operator is almost linear. Following the movement done by the fanuc is not enough and does not provide the desire balance.}	





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection*{Visual and Haptic Feedback}
{The repetition of the experiment, combining the visual and haptic modalities, led to the results presented below. First, the COP coordinates are more concentrated around the area of interest, mainly the x component (see Figure \ref{F3:Force} and Figure \ref{F3:COPXY}).} 
%{The operator tries to drive the robot in balance, counteracting the generated force. The Global COP and its two coordinates are shown in Figure \ref{F3:Force} and \ref{F3:COPXY}, respectively. }

\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.8\textwidth]{imgs/Chapter5/FanucV/FH/COP.png}
		 \caption{COP using Force Feedback.}
		  \label{F3:Force}
		\end{figure}

\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.8\textwidth]{imgs/Chapter5/FanucV/FH/COPXY.eps}
		 \caption{COPx and COPy using force feedback.}
		  \label{F3:COPXY}
		\end{figure}


{Table \ref{MET1} shows the improvements achieved, except in what concerns the performance measure M2 calculated on the \textit{y}-axis. Contrary to the lateral perturbation, the force generated is now dominated by peaks (see Figure \ref{F3:Force5}) meaning that the human operator receives a sequence of contradictory signals that must handle to accomplish the task objective.}		
%{The two Figures above show that, as expected the movement is almost done vertically, and the different COP variations are quickly contradicted. These values show that the robot did the movement in balance almost all the time. In Figure \ref{F3:COPXY}, the COPy and COPx variations last few seconds before returning to the initial position. Although visually the results show good expectations, the two metrics described earlier in this chapter were applied. Table \ref{MET1} shows the results of these metrics. }		

%\begin{table}[h]
%\centering
%\begin{tabular}{|c|c|c|c|c|}
%\hline
%   & x  (mm) & y (mm)      & $M_G$ (mm)   & Area ($mm^2$)                    \\ \hline
%M1 & 0.3107 & 0.3773  &  0.4888 & \multirow{2}{*}{0.0009} \\ \cline{1-4}
%M2 & 0.22157  & 0.29041 & 0.3653  &                         \\ \hline
%\end{tabular}
%\caption{COP metrics using force feedback.}
%\label{MET1}
%\end{table}
\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
                & \begin{tabular}[c]{@{}c@{}}$M_1$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_2$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_G$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}Area\\ ($mm^2$)\end{tabular} \\ \hline
\textit{x-axis} & 0.3107                                               & 0.22157                                              & \multirow{2}{*}{0.6102}                              & \multirow{2}{*}{0.0009}                                 \\ \cline{1-3}
\textit{y-axis} & 0.3773                                               & 0.29041                                              &                                                      &                                                         \\ \hline
\end{tabular}
\caption{COP metrics using force feedback.}
\label{MET1}
\end{table}

%{M1 and M2 show small and similar values, this proves the good results obtained in this experiment, the COP maintained throughout the movement its position with little variation from the initial point. Another important aspect is the generated force that will allow the operator to better balance the robot. The generated force can be seen, in the Figure \ref{F3:Force5}. }		
		
\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.8\textwidth]{imgs/Chapter5/FanucV/FH/Force.eps}
		 \caption{Force generated using visual and force feedback.}
		  \label{F3:Force5}
		\end{figure}
				
%{The generated force is composed essentially by peaks of force. In Figure \ref{JOYY} and \ref{F3FJoint1} the joystick coordinates with and without filter and the humanoid joint angles are shown. The angle parameter used in the filter was $\frac{PI}{4}$.} 
{The commands from the user are depicted in Figure 5.17 (for a slope resolution of $\frac{\pi}{4}$). The raw- and the filtered-data shows a tendency and the time curves a smother evolution.}
\begin{figure}[H]
		  \centering 
		  \includegraphics[width=1\textwidth]{imgs/Chapter5/FanucV/FH/Duo.eps}
		 \caption{Joystick variation during the movement in the saggital plane.}
		  \label{JOYY}
		\end{figure}
		
\begin{figure}[H]
		  \centering 
		  \includegraphics[width=1\textwidth]{imgs/Chapter5/FanucV/FH/Angles.eps}
		 \caption{Ankle variation during the movement in the saggital plane.}
		  \label{F3FJoint1}
		\end{figure}
		
		\clearpage
		
{The variation of the joint angles and the phantom's axis show that the movement done by the robot is not constant, \textit{i.e.,} the operator is constantly counteracting the movement. Another curious aspect is the small variation at the beginning of the movement, although there is no force actuating in the first 10 seconds, the operator may not have the joystick completely stopped. }{Summarizing the results obtained in this experiment, it can be stated that the role of force feedback is important, but needs to be explored in a gradual way in order to become a useful tool for the purpose of teaching maneuvers like balancing.}


\section{Down/Up Motion of the Hip}
{In the second experimental scenario, a down/up motion of the robot's hip section with both feet on the ground (crouching task) is performed with human supervision for \linebreak semi-autonomous humanoid operation. Here, the role of the human subject is to achieve an optimal trajectory by minimizing the variation of the \acs{COP} during the execution of the predefined vertical movement. The option for a semi-supervisory control is possible (and desirable) because prior knowledge about the particular task is available. More specifically, movement along the vertical axis is pre-planned in the Cartesian space using 5th-order polynomial functions, while the other two coordinates are left free for the human operator aiming to minimize online the \acs{COP} variation with respect to the initial value. \linebreak The motion performed with human supervision is compared with a perfect vertical motion planned autonomously by the humanoid robot (\textit{i.e.,} without any human intervention). After specifying the goal, the planner is invoked to compute a vertical trajectory connecting the robot's initial configuration to this target configuration. The pre-defined movement is divided into three phases: First, the hip section moves down to a predefined target height in about 1.5 seconds. Afterwards, the robot remains in that configuration for a short period of time. Finally, the robot performs the inverse movement to reach the initial height in the same 1.5 seconds. The snapshots of this experience are shown in Figure \ref{ExpMove}}

%{This experiment consist in a vertical movement. The first part of the experiment uses the PC to generate the three coordinates (X, Y and Z) to control the robot. The movement of down/up is done automatically without any external interference. In the second part, the PC is only used to generate the Z coordinate of the humanoid robot and the haptic joystick is used as an auxiliary device, will control the X coordinate of the humanoid robot. In both experiments no lateral movement was performed. One of the \acs{DOF} of the humanoid robot is blocked which makes impossible lateral movements with the knees bent. In Figure \ref{ExpMove}, the experience performed can be seen.}

\begin{figure}[H]
		\centering
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.7\linewidth]{imgs/Chapter5/P1data/P1.png}
		  \caption{}
		  \label{sub1}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.8\linewidth]{imgs/Chapter5/P1data/P2.png}
		  \caption{}
		  \label{sub2}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.7\linewidth]{imgs/Chapter5/P1data/P3.png}
		  \caption{}
		  \label{sub3}
		\end{subfigure}
        \begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.7\linewidth]{imgs/Chapter5/P1data/P4.png}
		  \caption{}
		  \label{sub4}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.7\linewidth]{imgs/Chapter5/P1data/P5.png}
		  \caption{}
		  \label{sub5}
		\end{subfigure}%
		\begin{subfigure}{.33\textwidth}
		  \centering
		  \includegraphics[width=.7\linewidth]{imgs/Chapter5/P1data/P6.png}
		  \caption{}
		  \label{sub6}
		\end{subfigure}	
			\caption{Snapshots of the down/up motion of the hip section.}
		\label{ExpMove}
		\end{figure}
		
	{Figures \ref{Exp1F} and \ref{Exp2F} show the spatial location of the COP under the feet using the two control modes in comparison. In the case of supervised control, the COP variation in the x component is higher than expected meaning the human operator was unable to find an optimal path. The differences can be better analysed from the temporal evolutions shown in Figures \ref{Exp1F1} and \ref{Exp2F1}. For example, repeating the experiment with the same robot's initial configuration gave rise to very different initial COP coordinates (\textit{x}-axis). }	
		
%\subsection{Autonomous Motion without Human Supervision}
%{In this experiment, the humanoid control is done by programming, \textit{i.e.,} there is no external interference in the movement. The three Cartesian components are generated using only the PC. The \acs{COP} generated and the evolution of its components during this experiment can be seen in Figure \ref{Exp1F} and \ref{Exp1F1}. }

\begin{figure}[H]
		  \centering 
		  \includegraphics[width=1\textwidth]{imgs/Chapter5/Novos/Exp1/COPAuto.eps}
		 \caption{Spatial location of the COP under the feet with autonomous control.}
		  \label{Exp1F}
		\end{figure}
		
		\begin{figure}[H]
		  \centering 
		  \includegraphics[width=1\textwidth]{imgs/Chapter5/Novos/Exp1/COPAux.eps}
		 \caption{Spatial location of the COP under the feet with semi-supervisory control. }
		  \label{Exp2F}
		\end{figure}
		
		
	%{The results show that as expected the \acs{COP} generated during the movement is unstable, this happens due to the movement generated only ensure that the movement is done with the hip straight forward, but does not guarantee the better path.}% The results of the metrics can be seen in Table \ref{TableExp11}.}	
	
%{ In the second part of this experiment, the vertical movement is generated by the host computer but in this case the haptic joystick is used to find a better path. The generated \acs{COP} can be seen in Figure \ref{Exp2F} and \ref{Exp2F1}.}
{Using the haptic joystick to find a better path in balance, the resultant \acs{COP} is shown in Figure \ref{Exp1F1} and \ref{Exp2F1}.}

\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.9\textwidth]{imgs/Chapter5/Novos/Exp1/Copxy1.png}
		 \caption{Trajectories of the COP in the \textit{x-} and \textit{y-}axis with autonomous.}
		  \label{Exp1F1}
		\end{figure}
		
\begin{figure}[H]
		  \centering 
		  \includegraphics[width=0.9\textwidth]{imgs/Chapter5/Novos/Exp1/COPXY2.png}
		 \caption{Trajectories of the COP in the \textit{x-} and \textit{y-}axis with semi-supervisory control.}
		  \label{Exp2F1}
		\end{figure}		
		
		
	{The reason why the differences found are not very significant may be due to the complex dynamics of the humanoid robot dominated by non-linear phenomena (\textit{e.g.,} backlash, friction, etc) that defeat the human intervention. These results indicate that one possible strategy to explore may be to combine the ground reaction forces with inertial and vision sensors to obtain more consistent information for synthetizing the forces relayed to the human operator. }	
	
		

%\subsection{Autonomous movement with Human Supervision }
%{ In the second part of this experiment, the vertical movement is generated by the host computer but in this case the haptic joystick is used to find a better path. The generated \acs{COP} can be seen in Figure \ref{Exp2F} and \ref{Exp2F1}.}
%\begin{figure}[H]
%		  \centering 
%		  \includegraphics[width=1\textwidth]{imgs/Chapter5/Novos/Exp1/COPAux.eps}
%		 \caption{Global COP  using the haptic device }
%		  \label{Exp2F}
%		\end{figure}
%		
%\begin{figure}[H]
%		  \centering 
%		  \includegraphics[width=1\textwidth]{imgs/Chapter5/Novos/Exp1/COPXYAux.eps}
%		 \caption{Component X and Y of the Global COP}
%		  \label{Exp2F1}
%%		\end{figure}		
%		
%		{Comparing the \acs{COP} generated in this experiment with the one generated in the Section Autonomous Motion without Human Supervision, it is observable that the new \acs{COP} is lower. Despite the difference between the two experiments, with and without haptic joystick, this difference is not so pronounced than expect. The experiment was done in short time, only 4.5 seconds, and this time is not enough to see a real actuation of the haptic joystick. 
{In Table \ref{1111} the metric results are shown. }
%	
	
%\begin{table}[h]
%\centering
%\begin{tabular}{|c|c|c|c|c|c|}
%\hline
%                                &    & x (mm)  & y (mm)  & $M_G$ (mm) & Area ($mm^2$)               \\ \hline
%\multirow{2}{*}{Without Haptic} & M1 & 1.139   & 0.69769 & 1.3357     & \multirow{2}{*}{0.0072} \\ \cline{2-5}
%                                & M2 & 0.99219 & 0.7028  & 1.2159      &                         \\ \hline
%\multirow{2}{*}{With Haptic}    & M1 & 1.2156  & 0.3805  & 1.2738     & \multirow{2}{*}{0.0047} \\ \cline{2-5}
%                                & M2 & 0.95426 & 0.40699 & 1.0374     &                         \\ \hline
%\end{tabular}
%\caption{COP metrics.}
%\label{1111}
%\end{table}
		
\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\multicolumn{1}{|l|}{}          &                                      & \begin{tabular}[c]{@{}c@{}}$M_1$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_2$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$M_G$\\ (mm)\end{tabular} & \begin{tabular}[c]{@{}c@{}}Area\\ ($mm^2$)\end{tabular} \\ \hline
\multirow{2}{*}{full-autonomous robot} & \textit{x-axis}                      & 1.139                                                & 0.99219                                              & \multirow{2}{*}{1.8062}                              & \multirow{2}{*}{0.0072}                                 \\ \cline{2-4}
                                & \textit{y-axis}                      & 0.69769                                              & 0.7028                                               &                                                      &                                                         \\ \hline
\multirow{2}{*}{supervised control }    & \textit{x-axis}                      & 1.2156                                               & 0.95426                                              & \multirow{2}{*}{1.6428}                              & \multirow{2}{*}{0.0047}                                 \\ \cline{2-4}
                                & \multicolumn{1}{l|}{\textit{y-axis}} & \multicolumn{1}{l|}{0.3805}                          & \multicolumn{1}{l|}{0.40699}                         &                                                      &                                                         \\ \hline
\end{tabular}
\caption{COP metrics.}
\label{1111}
\end{table}


{The metrics clearly demonstrate that the COP of the humanoid robot suffers a large displacement. The results using haptic feedback are slightly better, but, as mentioned before, the difference is not considerable enough to allow definitive conclusions.}
%{Both metrics indicate that the \acs{COP} of the humanoid robot suffer a large displacement (\textit{i.e.,} the humanoid robot was constantly in an unbalance state). Using haptic joystick presents slightly better results, but as observable in the COP figures the difference are not considerable enough to take conclusions of the improvement of use haptic joystics in this case. }


\section{Discussion of Results}

%{It should be mentioned that the proposed approach is not expected to require \linebreak specific prior knowledge on robot tele-operation from the user. Anyway, a user may need to \linebreak practice the tele-operation skills in order to perform repeatable and coherent experiments. As a matter of fact, a training phase was essential to allow the human operator to \linebreak better understand what force rendering algorithm is most effective, what sensorial \linebreak information reflects the real-word dynamics and how the robot reacts to the human intentions. \paragraph{} Performance metrics to help the human teacher understand the level of improvement achieved and the repetition over time were two fundamental factors contributing to improve the overall tele-operation's performance.\paragraph{} Although globally the results obtained show that the using of haptic joysticks with force feedback is an important aspect to consider in the future, a further study should be conducted in order to fully understand the true potential of this kind of equipments and its functionalities in robotic tele-operation.}

{Globally, the results obtained show that the use of haptic joysticks with force feedback is an important aspect to consider, while leveraging the skills and capabilities of human users. However, further study should be conducted in order to fully understand their potential and implications in tele-operation of humanoid robots. Although the proposed approach is not expected to require specific prior knowledge on robot tele-operation from the user, practicing tele-operation skills seems essential in order to perform repeatable and coherent experiments. In this work, it was not possible to extend the training phase to allow the human operator to better understand what force rendering algorithm is most effective, what sensorial information reflects the real-word dynamics and how the robot reacts to the human intentions. Thus, further study will be required to understand the implications of these important factors on the overall system's performance.
Nevertheless, the experiments presented in the later sections illustrate one of the basic challenges in force feedback: the difficult trade-off between stability and performance. Stability analysis is difficult task because any model of the system depends on the user and the environment itself (\textit{i.e.,} the humanoid robot). As an alternative, performance metrics to help the human teacher understand the level of improvement achieved when repeating the same task over time is a fundamental factor to consider in future.
}