From what I observed, the teachers simply want us to be able to derive some forms we are using in the algorithms. These either imply some partial derivatives, or simply substituting some variables for others.
Closed-Form Scan Matching via Rotation-Translation Separation
Context
As in ICP, we consider two lidar scans represented as corresponding 3D point sets
where we would like to align the data scan to its corresponding point in the model scan (reference) . The rigid alignment problem seeks the transform
that maximizes the least-squares cost
It is stated in the lecture notes that centering the point sets allows the translation to be removed from the minimization over , leading to a closed-form solution for both and .
Exercises
- Show that the optimal translation satisfies
- Substitute into and show that the problem reduces to
- Show that minimizing is equivalent to maximizing
Solutions
(a) We differentiate w.r.t. time and set to zero.
therefore,
(b) Insert into the error term:
Hence
(c) Expand the squared norm:
Apparently, if the angle between two vectors and is 0, then . It’s the case for and . The rest is covered in ICP, but the idea is that the first two terms do not depend on R since they refer to the centroid, and so we minimize only the cross-term.
Okk, I actually want to see why those two terms nullify.
First of all, does not depend on R.
It’s the second term I’m more interested in: . By definition of the Euclidean norm, . So, = . And here is the actual trick: since the Rotation matrix is orthogonal, then , so the final term itself does not depend on .
Then, since the first two terms are constants,
Minimizing a negative quantity is the same as maximizing the positive one
Thus, minimizing E is equivalent to maximizing . I did mix the notation here and there, but the idea remains. I got lost in the transposes and everything.
This does not mean that rotation and translation are geometrically independent in ; rather, the particular structure of the Euclidean least-squares cost combined with centroid subtraction yields a decomposition that is valid only for this point-set alignment objective. This separation does not generalize to pose residuals in the logarithmic error used in SLAM.
Deriving the Recursive Bayesian SLAM Update
Context
Consider the SLAM state
- is the robot pose at time ,
- is the static map.
Assume the motion model , the measurement model , and the posterior at the previous timestep .
We remember the proportional Bayesian update rule and the fact that in Markov processes, the current robot state depends only on the previous state and the current IMU data (or the control input) , not on earlier states.
Exercises
- Derive the general recursive Bayes filter update for SLAM:
- Show that the Bayes filter update translates into minimizing the Graph-SLAM least-squares objective:
Clarifications
The process is mainly converting probabilities to penalties. The goal of Graph-SLAM is to find the most likely trajectory and map (the Maximum A Posteriori or MAP estimate) given all our sensor data and movements.
Some clarifications first, because I’m dumb as shit when it comes to mathematics.. I really need to pick up a probabilistics book :)
- is the normalization factor. Because the products and integrals on the right side of the equation often result in a number that is much smaller or larger than 1, we use to scale the result back into a valid probability distribution.
- is the respective landmark. Covered its usage in SLAM.
- is the “is proportional to”
- So we can frame it as
- “The posterior probability of the state at time , given all measurements, controls, and landmarks from zero to …
- is equal to the normalizer …
- times the likelihood of the current measurement given the current state and landmark…
- times the integral over the previous state …
- of the motion model (you see it takes in consideration)…
- multiplied by the previous posterior.
- don’t judge me.
Solutions
(a)
We formulate the posterior at using the Bayes update rule. I remind myself that the measurement update is only dependent on the current state and the landmark association . Same for the others (motion depends on controls and current state), etc.
Thus, the explicit (unmarginalized) posterior is: (I guess we just generalize, because it’s true for both cases?)
Step 2: Posterior at
By substituting the equation from before:
And if we go one more step, we can see the general pattern for .
(b)
As discussed in SLAM, the MAP aims to maximize the current estimate
Step 1: To compute the errors, we need to go into Log space. It makes computations much easier. This is where we shift from maximizing the probability to minimizing the cost/penalty:
Using the factorization above:
Step 2: Assume Gaussian noise for motion and measurement models. This step helps us convert distances into likelihood . And the inverse of the covariance matrix represents the information matrix — trust.
and a Gaussian prior
Reminder that
Step 3: Substitute the Gaussian forms into . Since natural logarithm is the inverse of the exponential function, they cancel each other out.
We obtain
As we want to minimize these differences, we drop the term and we obtain what we were after