没有合适的资源?快使用搜索试试~ 我知道了~
在机器人运动中经常涉及到坐标变换,而根据旋转矩阵求欧拉角需要考虑坐标轴的旋转顺序,文档中列出了不同选择顺序对应的旋转矩阵以及相应的求解欧拉角公式
资源推荐
资源详情
资源评论
Euler Angle Formulas
David Eberly, Geometric Tools, Redmond WA 98052
https://www.geometrictools.com/
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy
of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons,
PO Box 1866, Mountain View, CA 94042, USA.
Created: December 1, 1999
Last Modified: April 28, 2020
Contents
1 Introduction 3
2 Factor as a Product of Three Rotation Matrices 3
2.1 Factor as R
x
R
y
R
z
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Factor as R
x
R
z
R
y
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Factor as R
y
R
x
R
z
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Factor as R
y
R
z
R
x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 Factor as R
z
R
x
R
y
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.6 Factor as R
z
R
y
R
x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.7 Factor as R
x
0
R
y
R
x
1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.8 Factor as R
x
0
R
z
R
x
1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.9 Factor as R
y
0
R
x
R
y
1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.10 Factor as R
y
0
R
z
R
y
1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.11 Factor as R
z
0
R
x
R
z
1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.12 Factor as R
z
0
R
y
R
z
1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3 Factor as a Product of Two Rotation Matrices 17
3.1 Factor P
x
P
y
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 Factor P
y
P
x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3 Factor P
x
P
z
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4 Factor P
z
P
x
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.5 Factor P
y
P
z
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1
1 Introduction
Rotations about the coordinate axes are easy to define and work with. Rotation about the x-axis by angle
θ is
R
x
(θ) =
1 0 0
0 cos θ − sin θ
0 sin θ cos θ
(1)
where θ > 0 indicates a counterclockwise rotation in the plane x = 0. The observer is assumed to be
positioned on the side of the plane with x > 0 and looking at the origin. Rotation about the y-axis by angle
θ is
R
y
(θ) =
cos θ 0 sin θ
0 1 0
− sin θ 0 cos θ
(2)
where θ > 0 indicates a counterclockwise rotation in the plane y = 0. The observer is assumed to be
positioned on the side of the plane with y > 0 and looking at the origin. Rotation about the z-axis by angle
θ is
R
z
(θ) =
cos θ − sin θ 0
sin θ cos θ 0
0 0 1
(3)
where θ > 0 indicates a counterclockwise rotation in the plane z = 0. The observer is assumed to be
positioned on the side of the plane with z > 0 and looking at the origin. Rotation by an angle θ about an
arbitrary axis containing the origin and having unit length direction U = (U
x
, U
y
, U
z
) is given by
R
U
(θ) = I + (sin θ)S + (1 − cos θ)S
2
(4)
where I is the identity matrix,
S =
0 −U
z
U
y
U
z
0 −U
x
−U
y
U
x
0
(5)
and θ > 0 indicates a counterclockwise rotation in the plane U · (x, y, z) = 0. The observer is assumed to be
positioned on the side of the plane to which U points and is looking at the origin.
2 Factor as a Product of Three Rotation Matrices
A common problem is to factor a rotation matrix as a product of rotations about the coordinate axes.
The form of the factorization depends on the needs of the application and what ordering is specified. For
example, one might want to factor a rotation as R = R
x
(θ
x
)R
y
(θ
y
)R
z
(θ
z
) for some angles θ
x
, θ
y
, and θ
z
.
The ordering is xyz. Five other possibilities are xzy, yxz, yzx, zxy, and zyx. It is also possible to factor
as R = R
x
(θ
x
0
)R
y
(θ
y
)R
x
(θ
x
1
), the ordering referred to as xyx. Five other possibilites are xzx, yxy, yzy,
zxz, and zyz. These are also discussed here. The following discussion uses the notation c
a
= cos(θ
a
) and
s
a
= sin(θ
a
) for a = x, y, z.
3
2.1 Factor as R
x
R
y
R
z
Setting R = [r
ij
] for 0 ≤ i ≤ 2 and 0 ≤ j ≤ 2, formally multiplying R
x
(θ
x
)R
y
(θ
y
)R
z
(θ
z
), and equating yields
r
00
r
01
r
02
r
10
r
11
r
12
r
20
r
21
r
22
=
c
y
c
z
−c
y
s
z
s
y
c
z
s
x
s
y
+ c
x
s
z
c
x
c
z
− s
x
s
y
s
z
−c
y
s
x
−c
x
c
z
s
y
+ s
x
s
z
c
z
s
x
+ c
x
s
y
s
z
c
x
c
y
(6)
The simplest term to work with is s
y
= r
02
, so θ
y
= asin(r
02
). There are three cases to consider.
Case 1: If θ
y
∈ (−π/2, π/2), then c
y
6= 0 and c
y
(s
x
, c
x
) = (−r
12
, r
22
), in which case θ
x
= atan2(−r
12
, r
22
),
and c
y
(s
z
, c
z
) = (−r
01
, r
00
), in which case θ
z
= atan2(−r
01
, r
00
). In summary,
θ
y
= asin(r
02
), θ
x
= atan2(−r
12
, r
22
). θ
z
= atan2(−r
01
, r
00
) (7)
Case 2: If θ
y
= π/2, then s
y
= 1 and c
y
= 0. In this case
r
10
r
11
r
20
r
21
=
c
z
s
x
+ c
x
s
z
c
x
c
z
− s
x
s
z
−c
x
c
z
+ s
x
s
z
c
z
s
x
+ c
x
s
z
=
sin(θ
z
+ θ
x
) cos(θ
z
+ θ
x
)
− cos(θ
z
+ θ
x
) sin(θ
z
+ θ
x
)
. (8)
Therefore, θ
z
+ θ
x
= atan2(r
10
, r
11
). There is one degree of freedom, so the factorization is not unique. In
summary,
θ
y
= π/2, θ
z
+ θ
x
= atan2(r
10
, r
11
) (9)
Case 3: If θ
y
= −π/2, then s
y
= −1 and c
y
= 0. In this case
r
10
r
11
r
20
r
21
=
−c
z
s
x
+ c
x
s
z
c
x
c
z
+ s
x
s
z
c
x
c
z
+ s
x
s
z
c
z
s
x
− c
x
s
z
=
sin(θ
z
− θ
x
) cos(θ
z
− θ
x
)
cos(θ
z
− θ
x
) − sin(θ
z
− θ
x
)
. (10)
Therefore, θ
z
− θ
x
= atan2(r
10
, r
11
). There is one degree of freedom, so the factorization is not unique. In
summary,
θ
y
= −π/2, θ
z
− θ
x
= atan2(r
10
, r
11
) (11)
Pseudocode for the factorization is listed below. To avoid the arcsin call until needed, the matrix entry r
02
is tested for the three cases.
i f ( r02 < +1)
{
i f ( r02 > −1)
{
thetaY = a s i n ( r 0 2 ) ;
thetaX = at a n 2(−r12 , r2 2 ) ;
t h e t a Z = a t a n 2 (−r01 , r0 0 ) ;
}
e l s e // r 0 2 = −1
{
// Not a un i q u e s o l u t i o n : th e t a Z − t h e t a X = a t a n 2 ( r1 0 , r1 1 )
thetaY = −P I / 2 ;
thetaX = −a t a n 2 ( r10 , r1 1 ) ;
t h e t a Z = 0 ;
}
}
4
剩余17页未读,继续阅读
资源评论
V0ldemort
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于springboot+vue实现的在线考试系统+源代码+文档
- RTL8723DS 2022 版本 Linux驱动,android驱动 支持4.0-10x
- 要玩NDS的遊戲,必須要先下載三個bios檔案到你的檔案資料夾
- 各类型数据库4月排名,基于排名网站数据爬虫json结果
- 基于springboot+vue实现的在线考试系统+源代码+文档
- 淮北市杜集区人才补贴+生活补贴
- JAVA-JSP技术文档
- 课内实验02-决策表(共享单车月卡).docx
- 基于【React + Node+SpringBoot】疫情数据查看系统的设计与实现【源码+lw+部署+讲解】
- 基于【React + Node】云课堂系统设计与实现【源码+lw+部署+讲解】
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功