%###########################################################################
%
%   Introduction
%
%###########################################################################
\chapter{Introduction} \label{chap:introduction}
In this work we address the state estimation problem for legged robot, which is one of the main challenges in legged robot locomotion. In order to develop and have efficient motion planning schemes with different controllers for a free floating base robot, accurate estimates of the robot’s states are needed. Some states, such as joint angles are directly accessible through encoders (and also joint velocities, by taking the differentiation from encoders’ measurements), while other states, such as the robot’s base position, velocity and orientation require additional sensor.\par
%
We show that by fusing different sensory data with an estimation framework, we can have an accurate estimation of the robot’s base states. The advantage of this framework comparing to the alternative approaches is simplicity and being computationally efficient.\par
%
In our work, we only rely on using common proprioceptive sensors and knowledge of leg kinematics. The key idea is to extract information from the kinematic constraints given through the intermittent contacts with the ground and to fuse this information with inertial measurements coming from the onboard sensors. The estimation framework accommodates contact switching and makes no assumptions about gait or terrain, making it applicable on any quadruped or biped platform.\par
%
In order to develop and implement the estimation algorithm, we first briefly mention the importance of this study for legged robot locomotion, and present the research objectives, and contributions of this work.\par
%
\section{Legged Robots Locomotion} \label{sec:legged-robots}
Legged robotics is rapidly transitioning from research laboratories into the real world, as demonstrated by the recent introduction of several commercial quadruped platforms. They have the potential and promising applications in a wide range of usage such as logistics, delivery industry, aid in search and rescue and assistants in different fields.\par
%
In the recent times, there are commercial platforms, such as Spot \cite{boston} from Boston Dynamics that are capable of walking on different terrains. They are currently used primarily for indoor mapping and construction site applications. Another equally popular robot is ANYmal from Anybotics \cite{Peter}, a Switzerland-based company. They focus both on the commercial application and research work. They maintain close ties with ETH Zurich to contribute extensively to the community.~\figref{fig:legged_robots} shows these quadruped robots along with one of the first legged robots designed and developed in 1970's by McGhee and his group at Ohio State University \cite{Schneider}.\par
%
\begin{figure}[!htbp]
	\begin{center}
		\includegraphics[scale = 0.24]{Bilder/History_of_robots.png}
		\caption{From left to right: Boston Dynamics Spot, Anybotics ANYmal, and OSU Hexapod.}
		\label{fig:legged_robots}
	\end{center}
\end{figure}
%
To be truly useful, legged robots must be able to reliably and rapidly navigate across rough terrain and be stable in the presence of disturbances, such as slips or pushes. They must also be able to perceive and manipulate the environment whilst avoiding collisions with obstacles and people. In order to develop and have efficient motion planning schemes and robust feedback controllers for these robots to handle these tasks with different gaiting patterns on diverse train, accurate estimates of the robot’s states are needed. The robot’s state is used to plan and track body trajectories, to balance and recover from external disturbances, and to map the environment and navigate through it. Since the base of legged robots is a free flyer with 6 degrees of freedom (DoF) in space, and they make intermittent contact with the ground, this contact switching poses a challenge for obtaining robot's state.\par
%
Mobile robots are equipped with different sensors, and they are categorized in two main types, \enquote{Exteroceptive}, and \enquote{Proprioceptive}. In order to differentiate between these two categories of sensors, it is first necessary to define the general characteristics that are important for their use in mobile robotics. All sensors are characterized by; an acquisition frequency (response time), a measurement resolution, and a noise on the measured physical quantity (defined by its repeatability). In addition, the measurement principle defines whether the sensor performs an absolute measurement (always with respect to a known reference frame) or a relative one. Proprioceptive sensors such as inertial measurement unit (IMU), and encoders measure the state of the robot itself (acceleration, joint position or velocity, etc.), while exteroceptive sensors such as cameras or GPS units, measure the state of the environment (mapping, temperature, etc.).\par
%
While wheeled robots are assumed to remain in contact with the ground at all times, legged robot locomotion inherently involves intermittent contacts. This makes stability a main concern as well as complicates odometry-based estimation approaches. The main control challenge for Legged robots is that they require knowledge of the full 6 DOF placement of the base. As mentioned, legged robot locomotion is inherently unstable, and it forces the tasks of control and localization to depend on internal (proprioceptive) sensing. Therefore, the problem of state estimation for legged robots is fundamentally different than that of estimation for wheeled robots (which is generally a localization task).\par 
%
Most legged robots are equipped with an inertial measurement unit (IMU) that can measure linear acceleration and angular velocity, although with noise and bias disturbances. Additionally the leg kinematics are available from intermittent contacts of the robot locomotion through the encoders. Therefore, because of nonlinear dynamics of these robots, nonlinear observers are typically utilized to fuse these data to estimate the robot’s states.\par
%
The advantage of this approach is that the whole localization task and estimation process is relying on internal (proprioceptive) sensing. Furthermore, additional sensory data such as visual and LiDAR can be integrated later to the observer in order to correct the position and yaw angle drift and also to build maps of the environment for the navigation task.\par
%
\section{Open Robot Dynamic Initiative} \label{sec:mpi}
It is often difficult to test advanced control and learning algorithms for legged robots without significant hardware development efforts or maintenance costs. Present-day hardware is often mechanically complex and costly, different robot systems are hard to compare to one another, and many systems are not commercially available. To support rapid and broad progress in academic research, the project \enquote{open robot dynamic initiative} (ODRI) was started by movement generation and control group. This group is led by Prof. Ludovic Righetti in the autonomous motion department at Max Planck Institute for Intelligent Systems. Their main research topics are focused on understanding the fundamental principles for robot locomotion and manipulation that will endow robots with the robustness and adaptability necessary to efficiently and autonomously act in an unknown and changing environment.\par
%
With the help of modular design, several open source robotics platforms under ODRI project have been designed and developed, such as biped (Bolt), manipulator (Tri-finger), and quadruped (Solo12) as shown in~\figref{fig:odri_robots}.\par
%
\begin{figure}[!htbp] 
	\begin{center}
		\includegraphics[scale = 0.115]{Bilder/ODRI_robots.png}
		\caption{From left to right: Solo, Bolt, and Tri-finger Robots from ODRI.}
		\label{fig:odri_robots}
	\end{center}
\end{figure}
%
Solo12 quadruped~\figref{fig:solo12} \cite{Grimminger}, is a torque-controlled modular robot architecture for legged locomotion research. This is a new research robot, developed as an open-source project in collaboration among Max Planck Institute for Intelligent System (MPI-IS), Laboratory for Analysis and Architecture of Systems (LASS), and NYU Tandon School of Engineering. All designs are open-sourced; including mechanical drawings, electronic circuits, and control software. The dog-resembling, torque-controlled quadruped is capable of very dynamic movements. It is made entirely of 3D printed parts and off-the-shelf components, which makes it an easy to replicate platform ideal for fundamental research in legged locomotion and robotic education.\par
%
\begin{figure}[!htbp] 
	\begin{center}
		\includegraphics[scale = 0.4]{Bilder/Solo_12.png}
		\caption{Solo12 quadruped robot with 12 DoF in the revolute joints.}
		\label{fig:solo12}
	\end{center}
\end{figure}
%
\section{Research Objectives} \label{sec:objectives}
In order to control a free floating base legged robot platform, we need accurate estimates of the robot’s states; namely robot configuration $(\boldsymbol{q} \in \mathit{SE}(3) \! \times \! \mathbb{R}^n)$, and robot generalized velocity $(\boldsymbol{v} \in \mathbb{R}^{n+6})$, which $n$ is the number of degrees of freedom on the robot.\par
In this work, we will focus on Solo12 robot with $n = 12$, (12 DoF in revolute joints), and 6 DoF in the free floating base. The robot is equipped with encoders at each joint and an onboard inertial measurement unit (IMU). The joints positions and joints velocities are accessible at each time step through the encoders, and the angular velocity of the base is measured by the gyroscope of the IMU. Furthermore, since we are using torque control robot, the joint torques are estimated from motors current at each joint. In order to obtain the base position, orientation and linear velocity (called robot's base states in this work), we use an external sensory data as motion capturing system.\par
%
This setup imposes some challenges for our robot locomotion, that is to say the range of robot's motion is limited by the motion capturing system around the robot. Therefore, we wish to design and develop an alternative way to obtain robot's base state without using any external sensing device.\par
%
Accordingly, the goal of this work is to develop a \enquote{state estimation framework}, entirely based on proprioceptive sensory data (onboard sensing devices on the robot), in order to \enquote{track the pose $\mathit{SE}(3)$, and the linear velocity of an articulated floating base robot}.\par
%
\section{Contributions} \label{sec:contributions}
The main contributions of this work are as follows:
\begin{itemize}
	\item We implement a state estimation framework based on the fusion of IMU data and leg kinematics as two sources of proprioceptive sensory data on robot.
	\item We design and implement the EKF in simulation and on the real hardware, based on the formulation of underlying stochastic process and measurement models.
	\item We present a way of contact detection for our quadruped, to determine which leg is in contact with the ground at each time step in order to use the kinematics information of that leg in the measurement model of our estimator.
	\item We perform an extensive set of experiments on Solo12 with different motions, in order to evaluate the performance and reliability of the proposed estimation framework.
	\item We use the designed EKF with a nonlinear feedback MPC scheme to show the advantage of this framework in legged robot locomotion, which eliminates any external sensing and all robot's states are accessible through onboard sensing devices.
\end{itemize}
%
\section{Overview} \label{sec:overview}
The rest of this work is organized as follow. Chapter~\ref{chap:literature} provides a brief introduction to the related literature on the state estimation for legged robots, and discusses different approaches in this field, and the advantage of the proposed estimation method over alternative approaches. Chapter~\ref{chap:estimation} explains the state estimation framework chosen in this study in details with the mathematical derivation, and presents the implementation in simulation and on the real robot. Chapter~\ref{chap:controllers} mentions the different types of controllers, which are used in the experiments, and their structures. Finally, in Chapter~\ref{chap:results}, we present and discuss the results obtained from an extensive set of experiments with different gaits on the real quadruped robot Solo12, followed by challenges faced in this estimation framework, and avenues for related future research in Chapter~\ref{chap:conclusion}.