当前位置:网站首页>Robot mathematics foundation 3D space position representation space position
Robot mathematics foundation 3D space position representation space position
2022-07-28 14:51:00 【Love the west wind】
3D There are many ways to express posture . Common ones are Euler angle 、 Four yuan number 、 Rotating vector 、 Rotation matrix, etc .
One 、 Euler Angle
Euler angle can express 3D Any rotating in space 3 It's worth . Altogether 3 Kind of Euler angle : Pitch angle (Pitch)、 Yaw angle (Yaw) And roll angle (Roll).

The pitch angle is the angle that looks up or down , The first picture . The second picture shows the yaw angle , The yaw angle indicates how far we look left and right . The roll angle represents how we roll the camera , Usually used in spacecraft Cameras . Each Euler angle has a value to represent , Combining the three angles, we can calculate 3D Any rotation vector in space .
At the same time, about these three rotation angles , We have two ways to select the rotation axis , Thus, two different Euler angles are derived :
- Static Euler angle , As is often said in graphics World coordinate system Benchmarking , The coordinate system is stationary , So it is called static .
- Dynamic Euler angle , With object Self coordinate system Benchmarking , The coordinate system is stationary relative to the object itself , But after each rotation , Will change relative to the world coordinate system .
Four yuan number
Quaternions are simple Super complex number . The plural By The set of real Numbers add An imaginary unit i form , among i²= -1. Similarly , Quaternions are real numbers plus three imaginary units i、j and k form , And they have the following relationship : i² = j² = k² = -1, iº = jº = kº = 1 , Every quaternion is 1、i、j and k The linear combination of , That is, quaternions can generally be expressed as a + bi+ cj + dk, among a、b、c 、d Is the set of real Numbers .
about i、j and k The geometric meaning of itself can be understood as a kind of rotation , among i Rotation represents Z Shaft with Y In the plane where the axes intersect Z Axial forward direction Y Positive rotation of the shaft ,j Rotation represents X Shaft with Z In the plane where the axes intersect X Axial forward direction Z Positive rotation of the shaft ,k Rotation represents Y Shaft with X In the plane where the axes intersect Y Axial forward direction X Positive rotation of the shaft ,-i、-j、-k Represent the i、j、k Reverse rotation of rotation .
Rotating vector
In mathematics , vector ( Also known as Euclidean vectors 、 Geometric vectors 、 vector ), Of having size (magnitude) And the amount of direction .
It can be visualized as a line with an arrow . The arrow points to : Represents the direction of the vector ; segment length : Represents the size of the vector .
The quantity corresponding to a vector is called quantity ( It's called scalar in physics ), Number ( Or scalar ) Only in size , No direction .
A*R = B
This formula says , Yes A、B Two coordinate systems , from B Coordinate to A The rotation transformation of coordinates can be determined by this R The matrix represents ; among ,R Each column of the matrix is B Coordinate x, y, z Axis in A Representation in coordinates ; Because the transpose of the rotation matrix is its inverse ,R Each row of the matrix is A Coordinate x, y, z Axis in B Representation in coordinates .

for instance , The above two coordinate systems , We can put R Write out : First column , because XB Shaft with ZA Axis coincidence , So it is [0; 0; 1]; Second column ,YB Shaft with YA The axis direction is exactly the opposite , So it is [0; -1; 0]; Empathy , The third column is [1; 0; 0]. If you write according to each line , Then the first line is with ZB Coincident XA Axis [0,0,1], The second line is with YB The axis is in the opposite direction YA Axis [0, -1, 0], The third line is with XB Axis coincident ZA Axis [1, 0, 0].
If we want to add displacement , What shall I do? ; It is the following rotation matrix ;
Rotation matrix
3D Transformation matrix : translation 、 The zoom 、 rotate .

3D The transformation matrix is a 4x4 Matrix , by 16 A two-dimensional array of real numbers , In 3D space , Any linear transformation can be represented by a transformation matrix . This paper introduces how to extract translation matrix from transformation matrix 、 The zoom 、 The method of rotating a vector , The complexity of the extraction formula is “ translation ;
The last column is the translation vector ; front 3*3 For rotation , The zoom ;
The following picture can be seen intuitively , translation 、 The zoom 、 The positional relationship of rotation in the transformation matrix

边栏推荐
猜你喜欢
随机推荐
How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally
&0xffffffff(0x08)
基于 MinIO 对象存储保障 Rancher 数据
Redis redis use in jedis
(function(global,factory){
C# 获取当前路径7种方法
How long can we "eat" the dividends of domestic databases?
C language: mathematical method of converting decimal system into binary system
&0xffffffff(0x08)
为自定义属性包装类型添加类 @Published 的能力
Read the introduction tutorial of rainbow
Swiftui layout - size (top)
如何在 Core Data 中进行批量操作
linux安装redis
How to use the C language library function getchar ()
How does core data save data in SQLite
9、 Uni popup usage popup effect at the bottom of the drop-down box
ssh服务
Redis-Redis在Jedis中的使用
C # read INI file and key value pair operation







