本文讲解车体坐标系与世界坐标系互相转换的数学推导,如下图所示
将waypoint坐标从车体坐标系转换到世界坐标系:
[ x ′ y ′ z ′ ] = [ x y z ] [ cos θ sin θ 0 − sin θ cos θ 0 0 0 1 ] \left[\begin{array}{lll} x^{\prime} & y^{\prime} & z^{\prime} \end{array}\right]=\left[\begin{array}{lll} x & y & z \end{array}\right]\left[\begin{array}{ccc} \cos \theta & \sin \theta & 0 \\ -\sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{array}\right] [x′y′z′]=[xyz] cosθ−sinθ0sinθcosθ0001
将waypoint坐标从世界坐标系转换到车体坐标系:
[
x
y
z
]
=
[
x
′
y
′
z
′
]
[
cos
θ
−
sin
θ
0
sin
θ
cos
θ
0
0
0
1
]
\left[\begin{array}{lll} x & y & z \end{array}\right]=\left[\begin{array}{lll} x^{\prime} & y^{\prime} & z^{\prime} \end{array}\right]\left[\begin{array}{ccc} \cos \theta & -\sin \theta & 0 \\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{array}\right]
[xyz]=[x′y′z′]
cosθsinθ0−sinθcosθ0001