[robot]Quaternions and Rigid Transformations
来源:互联网 发布:手机 Ubuntu 编辑:程序博客网 时间:2024/05/18 13:10
四元数定义
单位四元数
这一性质十分有用。
由于多次的旋转矩阵间相乘会导致误差累积,相乘次数越多误差越大。
如果利用单位四元数表示旋转矩阵,相乘后得到另一个单位四元数,这时对这个四元数进行renormalize就可以提高精度。
群
共轭
先进性
这一表示形式在机器人学,计算机视觉有着广泛应用。
旋转表示方式的总结
rigid-transformation
inverting rigid transformation
SpecialEulerianGroup
exercise
code
function q=quatprod(q1,q2) % All quaternions q, q1 and q2 are represented as 1-by-4 row vectors q=zeros(1,4); u0 = q1(1); u = q1(2:end); v0 = q2(1); v = q2(2:end); q(1)= u0 * v0 - u * v'; temp = u0 * v + v0 * u + cross(u, v); q(2)=temp(1); q(3)=temp(2); q(4)=temp(3);end
visualized rotation
% rand(3,1) generates a random 3 by one column vector. We use this u to plotu=rand(3,1)*2-1;% plot the originplot3(0,0,0,'.k')% axis settingaxis vis3daxis off% generate a random rotation matrix Rtheta = 2*pi*rand();w = rand(1,3);w = w / norm(w);k0 = cos(theta/2);k = sin(theta/2) * w;R = (k0^2 - (k*k'))*eye(3) + 2*k0*[0,-k(3),k(2);k(3),0,-k(1);-k(2), k(1),0] + 2 * (k' * k);% plot the x axis plot3([0,1],[0,0],[0,0],'r');text(1,0,0,'x');hold on;% plot the y axis plot3([0,0],[1,0],[0,0],'g');text(0,1,0,'y');hold on;% plot the z axis plot3([0,0],[0,0],[1,0],'b');text(0,0,1,'z');hold on;% plot the original vector uplot3([0,u(1)],[0,u(2)],[0,u(3)],'k--'); % black-dashed-linetext(u(1),u(2),u(3),['u','(',num2str(u(1),'%.3f'),',',num2str(u(2),'%.3f'),',',num2str(u(3),'%.3f'),')']);hold on;% apply rotation and calcuate v plot the vector after rotation vv = R * u;% plot the new vector vplot3([0,v(1)],[0,v(2)],[0,v(3)],'k:'); % black-dotted-linetext(v(1),v(2),v(3),['v','(',num2str(v(1),'%.3f'),',',num2str(v(2),'%.3f'),',',num2str(v(3),'%.3f'),')']);hold on;
0 0
- [robot]Quaternions and Rigid Transformations
- Rigid Motion and Homogeneous Transformation
- [crytek]Spherical Skinning withDual-Quaternions and QTangents
- Viewing and Transformations
- Rigid Body Velocity and Manipulator Jacobian
- Intensity Transformations and Histogram Equalization
- Transformations
- Transformations
- Transformations
- Transformations
- Transformations
- Transformations
- Transformations
- Transformations
- Transformations
- Transformations
- Transformations
- Transformations
- 原型模式
- Intent 传递对象 Serializable/Parcelable
- 起步-封装组件
- Codeforces Round #413 Div. 1 + Div. 2 A. Carrot Cakes
- Oracle
- [robot]Quaternions and Rigid Transformations
- 启动活动的最佳写法
- js运动--同时运动框架
- 【C++后台开发面试】C++语言相关
- Spyder使用和调试方法
- 使用 `text-align:justify;` 实现横栏自适应布局
- Oracle(PL/SQL编程基础(PL/SQL程序块与PL/SQL语句)、异常、游标、数据类型)
- [LeetCode: Python]190. Reverse Bits
- MD5