### Camera Calibration

Extrinsic and Intrinsic Camera Calibration. We use the right camera model, calibration pattern and algorithms for your specific use case.

Read Camera CalibrationPosted on 23 January 2023

**Part 1: Before You Start** and **Part 3: The Extended Kalman Filter** !

*if* it can be used to enhance sensor quality and build real-time robotics applications.

In Part 1, we explored ways to reduce jitter, but that does not eliminate slip, drift and noise in a robotic control system. It only allows us to start working on the real-time data readings. There’s many ways to reduce these three sources of error, but in this article, we’ll focus on one very popular filter: *The Kalman filter*.

The Kalman filter is a mathematical algorithm that uses a combination of sensor measurements and a model of the robot's movement to estimate the true values of the robot's position and orientation. The Kalman filter can help to reduce the effects of slip, drift and noise by filtering out erroneous sensor readings and estimating the true values based on a combination of past measurements and a model of the robot's movement.

The Kalman Filter is a *real-time* optimal estimation algorithm that uses a series of measurements to estimate the state of a system. It was developed in the 1960s by Rudolf Kalman and is used in a wide range of applications, from robotics to finance. *The Kalman Filter works by combining multiple measurements together to generate an estimate that is more accurate than any single measurement.*

The Kalman Filter works by taking the current state of the system and predicting the state of the system at the next time step. This prediction is based on the measurements taken at the current time step. The Kalman Filter then compares the predicted state with the actual measurements taken at the next time step and uses this difference to refine its prediction. This process is repeated until the Kalman Filter converges on a state that is close to the actual state of the system.

To use a Kalman filter, you will need to have a system with the following properties:

**Dynamic or Static system**: The Kalman filter was originally designed to estimate the state of a dynamic system. You can however also use it to estimate the state of a non-moving, static system.**Linear system**: The Kalman filter can only be used for linear systems, which means that the system dynamics can be described by a set of linear differential equations.**Continuous-time or discrete-time system**: The Kalman filter can be used for both continuous-time and discrete-time systems. For continuous-time systems, the filter is typically implemented using continuous-time state-space models and differential equations. For discrete-time systems, the filter is typically implemented using discrete-time state-space models and difference equations.**Known system dynamics**: The Kalman filter requires a model of the system dynamics, which means that you must have good understanding of how the system behaves and how it is influenced by external inputs and internal processes.**Properly measured inputs**: The Kalman filter uses measurements of the system to estimate the true state of the system. These measurements must be available in*real-time*and must be accurate enough to provide useful information about the state of the system.**Known measurement noise**: The Kalman filter requires information about the noise in the measurement process, which is used to weight the importance of the measurement in the filter's estimates. This noise can be due to a variety of factors, including measurement errors, sensor noise, and environmental interference, and is assumed to be white Gaussian noise.

If your system meets these requirements, you should be able to use a Kalman filter to estimate the state of the system and improve the accuracy of your estimates over time.

**Now wait…did it say ‘linear system’ ? As in, a robot that moves on a rail back and forth ? No turning ??**

Well, not without modifications... The original Kalman filter works pretty well to measure simple linear systems, like a temperature reading, current reading or light intensity. But we can’t use it to measure the position and velocity of a robot, *because these are unfortunately almost never linear…* your robot can turn, can’t it ?

There are many other real-time filters that can be used instead to measure the position and velocity of a robot accurately, such as the extended Kalman filter, the unscented Kalman filter, and the particle filter.

In Part 3, we’ll dive a little bit deeper into the Extended Kalman Filter, also known as the ‘EKF’.

Although popular by name, the *original* Kalman Filter will probably not be part of your next robotics project. We will finish this mini series in the third and last part, where we dive into the rabbit hole of the Extended Kalman Filter and conclude with some popular libraries to implement one.

Extrinsic and Intrinsic Camera Calibration. We use the right camera model, calibration pattern and algorithms for your specific use case.

Read Camera CalibrationIntermodalics has been at the core development of the Kinematics and Dynamics Library (KDL).

Read Inverse and Forward KinematicsWe are a ROS-native company, standardising all our tooling on the ROS ecosystem. We offer ROS Consulting and best practices for standard ROS paradigms and insights into ROS design decisions its shortcomings.

Read Robot Operating System ROS