# SoRoMan

 博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

http://blog.donews.com/wanderpoet/archive/2005/07/04/453608.aspx

Gimbal Lock

。。。
Maybe it's a bit difficult to understand. OK, let me show you a real sence.

Say that we have a telescope and a tripod to put the telescope on. The tripod is put on the ground. The top of the tripod holding the telescope is leveled with the horizon (reference plane) so that a vertical rotation axis (we call it X axis) is perfectly vertical to the ground plane. The telescope can then be rotated around 360 degrees in X axis so that it can scan the horizon in all the directions of the compass. Zero degrees azimuth is usually set toward a heading of true north. A second horizontal axis parallel to the ground plane (we call it Y axis), enables the telescope to be rotated in elevation upward or downward from the horizon. The horizon is usually set at zero degrees and the telescope can be rotated +90 degrees upward in elevation so that it is looking straight up toward the zenith or rotated -90 degrees downward so that it is looking vertically at the ground plane.

OK, that's all we needed. every point in the sky (and the ground) can be referenced by only ONE unique pair of X and Y readings. For example an X of 90 degrees and Y of 45 degrees specifies a point exactly due east of the telescope and in a skyward direction half way up toward the zenith.

Now let me show you how the gimal lock occurred. We detect a high flying aircraft, near the horizon, due east from the telescope (X = 90 degrees, Y = 10 degrees) and we follow it (track it) as it comes directly toward us. The X angle stays at 90 degrees and the Y angle slowly increases. As the aircraft comes closer the Y angle increases more rapidly and just as the aircraft reaches an Y of 90 degrees (exactly overhead), it makes a sharp turn due south. We find that we cannot quickly move the telescope toward the south because the Y angle is exactly +90 degrees so we loose sight (loose track) of the aircraft . We have GIMBAL LOCK!

(译注：为什么说不能将望远镜朝向南方呢，让我们看看坐标变化，从开始的（x=90度，y=10度）到（x=90度，y=90度），这个过程没有问题，望远镜慢慢转动跟踪飞行器。当飞行器到达（x=90度，y=90度）后，坐标突然变成（x=180度，y=90度）（因为朝南），x由90突变成180度,所以望远镜需要饶垂直轴向x轴旋转180-90=90度以便追上飞行器,但此时，望远镜已经是平行于x轴，我们知道饶平行于自身的中轴线的的旋转改变不了朝向，就象拧螺丝一样，螺丝头的指向不变。所以望远镜的指向还是天顶。而后由于飞行器飞远，坐标变成（x=180度，y<90度）时，y向角减小，望远镜只能又转回到正东指向，望'器'兴叹。这说明用x,y旋转角（又称欧拉角）来定向物体有时并不能按照你想像的那样工作，象上面的例子中从（x=90度，y=10度）到（x=90度，y=90度），坐标值的变化和飞行器空间的位置变化一一对应，但是从（x=90度，y=90度）到（x=180度，y=90度），再到（x=180度，y<90度）这个变化，飞行器位置是连续的变化，但坐标值的变化却不是连续的（从90突变到180），其原因在于（x=90度，y=90度）和（x=180度，y=90度）甚至和（x=任意度，y=90度）这些不同的坐标值对应空间同一个位置，这种多个坐标值对应同一个位置的不一致性是造成死锁的根源。【感谢zeroyear, fatfatson 等的深层解释，原先解释的不够清晰，故修改如上。原文：按照欧拉角旋转确实可以正确地定向，但从（x=90度，y=90度）到（x=180度，y=90度），再到（x=180度，y<90度）,按照欧拉角旋转后的定向并非正确】)

It's a example of 2D coordinate frame. It's very similar in 3D frame. We say that you have a vector which is parellel to the X axis. And we rotate it around  Y axis so that the vector is parellel to the Z axis. Then we find that any rotations around  Z axis will have no effect on the vector. We say that we have a GIMBAL LOCK

(译注：3维的万向节死锁情况分析见：http://www.cnblogs.com/soroman/archive/2008/03/24/1118996.html)

posted on 2006-10-11 13:14  SoRoMan  阅读(15740)  评论(39编辑  收藏  举报