%###########################################################################
%
%   Literature Review
%
%###########################################################################
\chapter{Literature Review} \label{chap:literature}
In this chapter we briefly have a look at the history of state estimation in legged robots locomotion, and review the related works and notable techniques in this field. Furthermore, we elaborate on the relevance of these literature to our work, and finally we reason about why we choose the proposed state estimation framework in this project.
%
\section{Background}
Legged robots are a subclass of mobile robots that locomote through direct and switching contact with the environment. Legged robot locomotion inherently involves intermittent contacts, and this makes stability a main concern. One of the main control challenge for Legged robots is that they require knowledge of the full 6 DoF placement of the base. These robots typically contain proprioceptive sensors, such as IMU, joint encoders, and force/torque and contact sensors. In addition, some legged robots also have access to exteroceptive sensors, namely cameras and LiDARs. As with all mobile robots, state estimation for legged robots is critical for mapping, planning, designing feedback controllers, and developing general autonomy.\par
%
The majority of legged robot estimation works to date have focused on base state estimation. This problem is particularly difficult for floating base systems, as the base pose cannot be measured directly. One of the most widely used choices for base state estimation is the Extended Kalman Filter (EKF) \cite{MBloesch}, \cite{Rotella}, \cite{Fallon}. Although, there have been recent attempts to use more advanced approaches based on the use of factor graphs \cite{Fourmy}, and invariant Kalman Filters \cite{Hartley}, the EKF framework is commonly used due to its compromise between simplicity, efficiency, and performance.\par
%
For base state estimation, most works have fused Inertial Measurement Unit (IMU) data with leg odometry to estimate the base position and velocity as well as its orientation \cite{Bloesch}, \cite{Rotella}. Furthermore, to compensate for the drift of the unobservable base position while simultaneously mapping the environment, sensor modalities like LiDARs and cameras are often added.
%
\section{State Estimation}
As described in \cite{Camurri}, the literature on the state estimation for legged robots can be classified according to several criteria: the type of sensors used (proprioceptive, exteroceptive, or both); the output frequency (at control rate, e.g., $400\: \unit{Hz}$ or camera/LiDAR rate, e.g., $10\: \unit{Hz}$); state definition (placement, velocity, joint states, contact points, etc.); the presence of loop closures (odometry vs. SLAM); the degree of marginalization of past states (from filtering to full batch optimization). Finally, if there is fusion of proprioceptive and exteroceptive signals, this can be performed in a loosely or tightly coupled manner.\par
%
The related work can be divided into three main categories:
\begin{itemize}
	\item Proprioceptive state estimation, which includes filtering methods to fuse only the high-frequency signals, such as IMU and kinematics. 
	\item Multi-sensor filtering, which covers filtering methods with proprioceptive and exteroceptive sensor fusion.
	\item Multi-sensor smoothing, which typically involves fusion of visual odometry (VO), IMU, and kinematics in a tightly coupled manner within probabilistic graphical model frameworks, such as factor graphs \cite{Camurri}.
\end{itemize}
%
\cite{Roston} presented one of the earliest navigation system which extracts information from leg kinematics. By matching the foot positions between two consecutive time steps they compute the incremental motion of the main body. Further, they introduce a slip detection method which relies on the invariance of the distance between feet that are in contact with the ground.\par
%
One of the first approach exploiting information given by the leg kinematics was implemented by \cite{Lin} on a hexapod robot. Assuming that the robot is in contact with three of its six feet at all times and assuming completely flat terrain, they implemented a leg-based odometer. Their method requires the robots to follow a tripod gait and is affected by drift. The same group fused the leg-based odometer with data from an IMU and thus is able to handle tripod running.\par
%
Using the assumption of knowing the precise relief of the terrain, \cite{Chitta} implemented a pose estimator based on a particle filter. It fuses leg kinematics and IMU in order to globally localize a robot.\par
%
Given the above assessment of previous works, it is conjectured that a suitable filter for general legged robot state estimation should:
\begin{itemize}
	\item Make no assumptions about the gait or terrain.
	\item Be easily adapted to any legged robot platform.
	\item Use as little computational resources as possible.
\end{itemize}
\cite{MBloesch} were the first to introduce a novel EKF for state estimation on the quadruped starlETH which fused leg odometry and IMU data to estimate the full pose of the robot without making these assumptions (the EKF-based state estimator did not depend on a specific type of gait or number of legs). By choosing an appropriate state vector, they broke down the estimation problem to the proper formulation of a few simple measurement equations. Further, it was shown that as long as at least one foot is in contact with the ground then all states other than absolute position and yaw (neither of which matters for stability) are observable.\par
%
As an extension to this study, the same group presented an estimation framework in \cite{Bloesch} based on unscented Kalman filtering. While following a similar overall approach, in the sense that accurate estimates of the full body pose were obtained by fusing information from an on-board IMU and kinematic measurements, the latter approach extended and improved different aspects of the previous methodology. By deriving velocity constraints from the feet that are in contact with the ground, simple measurement equations were obtained which reduced the size of the state and which were more suitable for slippage detection. Since angular velocity from the IMU appeared on both the inertial process model and the measurement update, the authors proposed the use of the Unscented Kalman Filter (UKF) instead of an EKF to better handle the correlation between the joint and gyroscope noises. Further, a robot-centric formulation of the state space was chosen in order to appropriately partition the filter states and avoid problems with unobservable states.\par
%
When foot sensors are unavailable, the contact feet are detected by putting thresholds on the Ground Reaction Forces (GRF), which are estimated from the joint torques. \cite{MCamurri} proposed a method that evaluates GRF discontinuities to discard invalid leg odometry velocity measurements on the quadruped robot. \par
%
In this work, we prefer to utilize a Kalman-based filtering in order to fuse IMU data with leg kinematics, for several reasons. First, comparing to more sophisticated methods, Kalman-based filtering framework is simpler and computationally less expensive. Second, our quadruped is equipped with an onboard accurate IMU device, with small noise and bias terms, and by the integration of the dynamics of the robot by the measured linear acceleration and angular velocity, we can have a good process model with small drifts in time. Additionally, we have an almost precise kinematics of the joints for our robot which makes it a reliable measurement model for the base linear velocity. Furthermore, in order to reduce weight and increase agility, our quadruped robot is not equipped with force sensors on the end effectors, but contact forces from ground can be estimated with the current measurement of the motors, which can be used as a model for contact detection in any gaiting pattern.