Sitemap
A list of all the posts and pages found on the site. For you robots out there, there is an XML version available for digesting as well.
Pages
Posts
Occupancy Grid Mapping
Published:
Besides state estimation or localization, which provide a robot with knowledge of where it is, it’s equally important for a mobile robot to perceive its surrounding and form a knowledge of where is occupied, that’s where mapping comes in. This note covers a fundamental mapping algorithm, occupancy grid mapping.
Problem Statement
In occupancy grid mapping, a map is discretized into different cells, where each cell is a binary random variable that models the occupancy, and is the probability of a cell being occupied. The map is assumed to be static. The goal is to find the belief , where is the observation and is the state of the robot.
Two assumptions are made for tractability
- The robot state are known.
- The occupancy of individual cells are independent, and thus
At each timestep , the sensor performs some measurement and provide the information of whether a cell is believed to be occupied or not, in terms of , which is known as the inverse sensor model.

One simple inverse sensor model is shown in the figure above. Consider a laser beam range sensor that provides the reading , where and are the range and bearing of the -th beam. For grid , let and be the range and bearing of the grid as observed from the current robot pose , and be the beam going through that gird. Based on the relation of a grid’s position relative to the robot, we have three different cases:
- If or , then return , the sensor has no information about this grid.
- Else if and , then return , the sensor think the grid is occupied.
- Else if and , then return , the sensor think the grid is free.
where is a sensor-specific parameter representing the maximum detectable range, is the grid size and is the width of each beam.
Mapping Algorithm
Following the Bayes filtering framework, a general algorithm can be derived for the occupancy grid mapping [2]. Starting from equation 1,
Further notice that the map is independent of the robot state , we obtain
Similarly, for the negation
Compute the ratio of equation (2) and (3), we get
Then, change to log odds form by defining
and the product chain turns into a sum
Bayes Inference using Conjugate Prior
The previous section derived an equation for updating the belief of the map under the Bayes framework, however, it lacks the notion of uncertainty (i.e., how confident we are about the map). With the notion of conjugate prior, a proper selection of the underlying distribution function for can both simplifies the updating rule and provide a closed form formula for uncertainty.
Recall that from Bayes rule
Bernoulli Likelihood and Beta Prior
First consider the case where the occupancy of a grid is binary, i.e., . Let be the unknown occupancy probability. From the inverse sensor model described above, we know that each sensor measurement provide a binary result, denoted as , where
Then, the likelihood is modeled as a Bernoulli with parameter , i.e.,
Furthermore, if we model the prior as a Beta distribution, i.e.,
where is the beta function.
Then, it follows from the Bayes rule that the posterior is
which still follows a Beta distribution, , where
In this case, we call beta distribution the conjugate prior for the Bernoulli likelihood.
Conjugate Distribution and Conjugate Prior [2]
- If the posterior distributions are in the same probability distribution family as the prior probability distribution, the prior and posterior are then called conjugate distributions.
- The prior is called a conjugate prior for the likelihood function.
Note that the choice of modeling the prior as a Beta distribution here is an algebraic convenience, which provides a closed-form expression for the posterior. Then the mean and covariance can be easily obtained
<figure id="32b45435-6ef1-80d4-abf7-d3e0db4a4e80" class="equation" data-notion-equation="\begin{align*} \mathbb{E}[\theta_i]=\frac{\alpha_i}{\alpha_i + \beta_i} && \text{and} && \mathbb{V}[\theta_i]=\frac{\alpha_i\beta_i}{\left(\alpha_i+\beta_i\right)^2\left(\alpha_i+\beta_i+1\right)}Lie Theory in Robot Motion
Published:
This note covers some of the fundamental concepts in Lie group and Lie algebra, and their applications to representing rigid body motion in robotics.
Matrix Lie Groups
A group is a set equipped with a binary map satisfying the following properties:
- Closure: .
- Associativity: .
- Identity: .
- Inverse: .
Here, it’s better to understand the element of a group as a kind of operation or transformation (e.g., a rotation or a rigid body transformation) rather than a number or a vector. These groups turn out to be also differentiable manifolds, which makes them Lie groups.
Special Orthogonal Group,
To represent a rotation formally, we need to consider the properties that define a rotation. In general, a rotation should be
- Linear, so it can be represented as a matrix .
- Preserves length and angles, so for any vector and , .
Note, from this property,
which means the matrix has to satisfy the following
- Preserves orientation (no mirroring), so .
Given the previous property
we have
In fact, these properties give rise to a group called the special orthogonal group,
which is a group of all rotations about the origin in an dimensional Euclidean space.
Special Euclidean Group,
The general way to represent the motion of a rigid body is a transformation that
- Preserves the Euclidean distance, .
- Preserves the orientation.
All such transformation forms a group called the special Euclidean group, .
Intuitively, such transformation can be represented by a function , where
However, the function is not linear and thus cannot be represented by a matrix, which causes inconvenience. The general trick to solve this problem is to augment the dimension by 1. For , define and such that
so the transformation becomes matrix vector multiplication.
The special Euclidean group now can be written as
which represents all poses an object can take in an dimensional space.
Lie Algebra
A Lie algebra is a vector space together with a binary operation called the Lie bracket satisfying the following properties
- Bilinearity: , .
- Alternating: .
- Jacobi identity: .
Importantly, every Lie algebra is associated to a Lie group , which is the tangent space of the identity of the Lie group, denoted as , and it completely captures the local structure of the group. In the case of robot motion, we can think of a trajectory that lives in the Lie group while the velocity lives in the Lie algebra.

Exponential Map
Let be a Lie group and be its Lie algebra, first we need to define a few notations:
- A curve in is defined as a function that maps each real number to an element of the group .
The derivative of , denoted as , evaluated at a specific time , , is a vector in the tangent space. Suppose , then .
- Left translation: For a specific element , define the map as the left translation. Example: if , and , then .
- Left-invariant vector field: For a vector , the left-invariant vector field is defined at any point by .
Basically, start from a velocity vector , which has to stars at the origin (identity). Then, you map this velocity vector to another vector in the tangent space to a group element , i.e., .
Now, suppose you have a curve that starts at the identity with velocity , then, for any , we have
The above equation can be thought of as a “differential equation” whose solution is
Let , the exponential map can be defined as
<figure id="31d45435-6ef1-80af-a7dd-d01910f6388a" class="equation" data-notion-equation="\begin{align} \exp:\mathfrak{g}\to G,&& \exp(\xi)=\gamma_\xi(1)Bayes Filtering and State Estimation
Published:
In robot state estimation, the Bayes filter is a probabilistic approach that estimates the state from a sequence of controls and measurements by recursively performing prediction with a motion model and correction with a measurement model. In practice, some common instantiations of the Bayes framework are the Kalman filter, information filter, and particle filter.
Mathematical Formulation of Bayes Filter
Given a sequence of measurements and controls , and a measurement model and a motion model . The Bayes filter provides a recursive framework for estimating the state in terms of a probability distribution function, known as the belief , or posterior.

The filtering algorithm is built upon two assumptions of conditional independence:
- Motion model is (1st-order) Markov:
- The measurement model is memoryless:
Given these two assumptions, we can propagate the belief over time:
We can define the predicted belief of the state at time to be the probability distribution before knowing the current measurement, i.e., . Then, the above equation becomes
where is the normalization coefficient, and
which is essentially a correction applied to the belief after observing the current measurement.
What remains to be done, obviously, is to predict the belief from the previous state:
Then, recognizing , we have
In summary, the Bayes filter provides a two-step framework for updating the belief of the current state from the belief of the previous state :
- Prediction using the motion model (Equation 1);
- Correction using the measurement model (Equation 2).
These two steps can be performed recursively to estimate the state over time.
Kalman Filter
The Kalman filter is an instantiation of the Bayes filter with the assumption of linear Gaussian models. This means the motion model and the measurement model should be
- linear with respect to their arguments:
Specifically, suppose , , and . Let , , and be matrices (linear maps).
- Motion model:
- Measurement model:
where and are white noise with variance and , respectively.
White noise
A discrete-time random process (a sequence of random vectors), , is called white noise if
- following a multivariate Gaussian distribution:
Specifically,
- Motion model: ;
- Measurement model: .
Note: here we need to interpret as a realization rather than a random variable.
Multivariate Gaussian PDF
is the probability distribution function of a random variable that follows a Gaussian distribution with mean and covariance matrix ,
Before deriving the algorithm for the Kalman filter, there are two important properties of the multivariate Gaussian distribution that are useful here.
- Affine transformation:
Let be a random vector following a Gaussian distribution , then the random vector follows a Gaussian distribution .
Proof
Will come later
- Conditional distribution:
Let be a random vector of dimension . Partition into a vector of dimension , and a vector of dimension , , and partition and respectively,
then, the conditional distribution , where
Proof
Will come later
Now, if we assume the initial belief to be Gaussian, i.e., . Then, from equations (1) and (2), we can see that all subsequent beliefs will be Gaussian. Thus,
Then, we only need to track in the prediction step and in the correction step.
For the prediction step, use the joint distribution and realize
Derivation [2]
From equation (3),
Compute the mean and covariance,
Then can be obtained by marginalize ,
For the correction step, form a joint distribution and realize
Derivation [2]
Since and , where . From property 1, we have
Furthermore,
Thus, , where
Finally, normalize for numerical stability
Extended Kalman Filter (EKF)
One way to handle the case where motion model and measurement model are not linear is to approximate the functions via local linearization (Taylor expansion). Specifically, we extend the Kalman filter algorithm to cases where models are non-linear:
- Motion model
- Measurement model
Let
The EKF algorithm is
Unscented Kalman Filter (UKF)
Another non-linear Kalman filter is the unscented Kalman filter which uses deterministic sampling to approximate the distribution.
Let a function be a non-linear transformation. Suppose and . We draw a set of sigmapoints, , and compute a weight for each sigma point by executing
Further let , then , where
The UKF algorithm is
Reference
[1] S. Thrun, W. Burgard, and D. Fox, Probabilistic Robotics. Mit Press, 2010.
[2] M. Ghaffari, ROB530 Lecture Slides — Kalman Filtering. University of Michigan, 2026.
portfolio
INSIGHT: Smart Assistive Glass for Visually Impaired
In-device navigation and scene interpretation glasses for low-vision users.
Lumen Grid: Competitive Multi-Robot Parking Game
A fast-paced, interactive parking game using four Zumo robots on an LED-marked field.
Transformable Wheel
An autonomous vehicle equipped with transformable wheels for complex terrain locomotion.
research
PHAROS: Highly Deformable Proprioceptive Membrane for Real-Time 3D Shape Reconstruction
A soft, stretchable optical waveguide sensor with embedded LEDs and photodiodes for learning-based 3D deformation reconstruction.
talks
Talk 1 on Relevant Topic in Your Field
Published:
This is a description of your talk, which is a markdown file that can be all markdown-ified like any other post. Yay markdown!
Conference Proceeding talk 3 on Relevant Topic in Your Field
Published:
This is a description of your conference proceedings talk, note the different field in type. You can put anything in this field.
teaching
Teaching experience 1
Undergraduate course, University 1, Department, 2014
This is a description of a teaching experience. You can use markdown like any other post.
Teaching experience 2
Workshop, University 1, Department, 2015
This is a description of a teaching experience. You can use markdown like any other post.
