Lecture 14 on Visual SLAM——Review and summary of ch3 and solutions to after-school exercises
Written at the top:
Before learning, first of all, I would like to thank the blogger lessLe6 at station b, what the young lady said is very easy to understand.
First understand the transformation of coordinates, so there is a matrix to help understand, but because the matrix is too redundant , a rotation vector is proposed ; and because the rotation vector is not intuitive , there is Euler angle ; but Euler angle also has a universal lock . Situations lead to singularities, hence quaternions .
In visual SLAM, we also use quaternions.
0. Some basics
It is best to have some mathematical foundation before learning, here are some of my summary: https://blog.csdn.net/qq_44164791/article/details/131503895?spm=1001.2014.3001.5501
In addition, there are some related The basic knowledge about visual SLAM is listed below
0.1 Summary
- Three-dimensional space is composed of three axes, and the position of a point in space can be determined by three coordinates, that is, any point exists in our three-dimensional coordinate system.
- Our research is mainly aimed at rigid bodies. For a rigid body, it not only has a position, but also its own posture. The camera can be regarded as a rigid body in three-dimensional space, so the position refers to where the camera is in space, and the attitude refers to the orientation of the camera (for example: the camera is at (0,0,0) in space, facing straight ahead) Description
:
Rigid body: After motion and stress, the shape and size of the object remain unchanged, and the relative positions of the internal points remain unchanged
0.2 Mathematical language
If we want to describe our generalization in mathematical language, we first need to know a few concepts:
Point: No length and volume
Vector: Directional arrow
Coordinate: Can be understood as a position
coordinate system: A set of bases that constitute a linear space, divided into left-handed and right-handed systems
In visual SLAM, we willcamera as point, SLAM is real-time positioning and mapping. In this process, the camera must be moving, and the movement will change. At this time, we willcamera movementrepresented by a vector; in order to have better mathematics to quantify it, we place the camera inin world coordinate system, you can get the camera in world coordinatescoordinate, the change of the camera can be further described in mathematical language.
0.3 Some knowledge mentioned
So far you can formally learn
1. Rotation matrix R and transformation matrix T
The reason why these two matrices are proposed is because we regard the camera as a point, which exists in the world coordinate system. But the realization of the complete function of our SLAM needs to process the pictures captured by the camera. Therefore, the camera coordinate system is involved. However, the world coordinate system and the camera coordinate system are different coordinate systems, so there is a problem of how to convert the world coordinate system and the camera coordinate system . We call this transformation the Euclidean transformation.
The Euclidean transformation consists of rotation and translation. Discuss the rotation first and then the translation. Here, the unit orthogonal basis is used to represent the coordinate system.
1. Rotate
Assumption: a coordinate system ( e 1 , e 2 , e 3 ) (e_1,e_2,e_3)(e1,e2,e3) , after one rotation becomes( e 1 ′ , e 2 ′ , e 3 ′ ) (e^{'}_1,e^{'}_2,e^{'}_3)(e1′,e2′,e3′)
for a fixeda ⃗ \vec{a}a, we explore how its coordinates change. ( Note: The fixed here means that the length direction of the vector itself remains unchanged)
Since the vector is fixed before and after rotation, there is:
the transposition of the initial coordinate system multiplied by the left, then there is:
the 3×3 matrix in the above formula denoted as RRR , which we call the rotation matrix. The rotation matrix isan orthogonal matrix and its determinant is +1 or -1.The rotation matrix can be used to describe the transformation of two coordinates
- a ⃗ 1 = R 12 a ⃗ 2 \vec{a}_1 = R_{12}\vec{a}_2a1=R12a2It is said that it is transformed from coordinate system 2 to coordinate system 1
- a ⃗ 2 = R 21 a ⃗ 1 \vec{a}_2 = R_{21}\vec{a}_1a2=R21a1It is said that the transformation from coordinate system 1 to coordinate system 2
- From 1 and 2, R 21 = R 21 − 1 = R 12 T R_{21}=R^{-1}_{21}=R^{T}_{12}R21=R21−1=R12T
At this point, we only describe the rotation, and if we add the translation, we can fully describe the rigid body motion of the two coordinate systems.
After adding translation:
a ′ = R a + t a' = Ra + ta′=Ra+t
1.2 Transformation matrix
Now there is a problem that when the coordinate system is continuously changed, the lion will become very complicated, for example: c = R 1 a + t 1 , c = R 2 b + t 2 c=R_1a+t_1,c=R_2b +t_2c=R1a+t1,c=R2b+t2fromaa _a toccc becomesc = R 2 ( R 1 a + t 1 ) + t 2 c=R_2(R_1a+t_1)+t_2c=R2(R1a+t1)+t2, so it looks very complicated. At this time, we can combine rotation and translation to add a dimension to it, as shown below: In this way,
the following formula can be obtained:
By putting rotation and translation in the same matrix, we get Out of the transformation matrix, the reverse transformation can also be performed, that is:
in general :
- The three-dimensional rotation matrix has nine quantities, but a rotation has only three degrees of freedom. So this expression is redundant.
- And the rotation matrix itself has constraints: it must be an orthogonal matrix with a determinant of 1. The same goes for transformation matrices. When we want to estimate or optimize a rotation matrix°transformation matrix, these constraints make it more difficult to solve.
Then, the next step is to explore a more compact representation