This week we will learn about the Kalman filter for Bayesian estimation in robotics. The Kalman Filter is an optimal tracking algorithm for linear systems that is widely used in many applications. Examples of tracking includes pedestrian and vehicle tracking for self-driving cars or items traveling along a conveyor belt on an assembly line. We will start by discussing the system model and the measurement model of the Kalman filter. And then we will talk about the maximum-a-posterior estimates in the filter. Finally, we will extend the concept of the linear Kalman filter to nonlinear models. In this lecture we will explore time series modeling using a Kalman filter to help estimate the state of the world. Our soccer playing robot is trained to detect colored soccer balls. However, in a game of soccer, the ball will not stay in the same place. The robot should track the trajectory of the ball and even predict its future destinations. This is not a problem just for soccer. Many real robots must maintain similar estimates. In the above figure, a ball is rolling along the ground but encountering friction that slows it down. In addition to measuring position, the robot should identify the dynamics of the ball in the environment. Another common occurrence of dynamic forces that affect real world objects is gravity. Here the ball is accelerating down towards the ground. A filter that tracks the ball should model this behavior. Robots should be able to react to events before they happen. Here the Japanese team is able to prevent a goal by diving before the ball reaches the net. By the end of this module, you will be able to program a goalie robot to behave in the same way. To prevent poor behavior, the robot should maintain a notion of uncertainty. If the robot has no idea how the ball is moving, it should not dive based on a single bad measurement. When a robot is deployed in the real world, it will receive a steady stream of visual data from its camera. Applying the principles from module one, the robot can identify the position of the ball from the sensor data. However, due to noise, the position may not be very accurate. Thus the robot has a collection of multiple measurements of noisy data. These measurements can approximate the true state of the ball at any given time, and this module focuses on the calculation of this state. The concepts of measurements should be disambiguated from the concepts of state. There's a true state of the world, but the robots can only observe a shadow of that world. For instance, the true position of the soccer ball may be 11 meters away from the robot, but the robot thinks that it is 11.32567 meters away. The robot observes this position of the ball through its camera, and this measurement through the camera gives a noisy estimate of the state. One source of the noise is the collection of pixels that can be misclassified between the ball and the surrounding area. We saw this kind of noise in module one. The robot is interested in the high-level concept of the hidden state in order to make decisions about how to act. The state of an object includes specific information to the task at hand. A soccer playing robot may care only about the position and velocity of a ball. For other tasks, such as aircraft control, orientation can represent a critical aspect of state, where the inertial measurement units and the GPS provide measurement data. A firefighting robot may care to track a fire and require temperature information to augment color and size estimates. Each task is different, so it is very important to delineate what constitutes the state. For this module we simply will track our position and velocity. Thus we declare our state to be a collection of x, y, z, dx, dy, and dz. When measuring the state, we do not always receive information in the same units as the state. For instance, to track the orientation of an aircraft, we may only receive angular velocity measurements and an the indication of where the gravity vector is pointing. In the case of tracking ball velocity, we only observe position measurements. No direct velocity observations are made. This discrepancy between measurements and state makes tracking hard. To motivate this module, here's an example of data captured from our trusty soccer playing robot. The robot uses its head camera and vision algorithms to observe the position of the ball in time. The critical decision that the robot goalie needs to make is when to dive. If you look at the plot on the right, the position measurements are quite noisy. In the next lecture, we will provide Bayesian filtering methods to estimate the true state of the ball from these noisy measurements.