三维旋转沿轴分解

将旋转分解为固定参考坐标系的绕轴n\bold{n}n的旋转和正交轴旋转:
R=R⊥R∥ \bold{R}= \bold{R}{\perp} \bold{R}{\parallel} R=R⊥R∥
R∥=cos⁡θI+(1−cos⁡θ)nnT+sin⁡θn∧ \bold{R}_{\parallel}=\cos \theta \bold{I}+\left( 1-\cos \theta \right) \bold{n}\bold{n}^{T}+\sin \theta \bold{n}^{\wedge } R∥=cosθI+(1−cosθ)nnT+sinθn∧

使用最小二乘法估计绕轴旋转,目标函数是使正交轴旋转的角度最小
min⁡θarccos⁡(tr(RR∥−1)−12) \min_{\theta}\arccos\left(\dfrac{\rm{tr}\left(\bold{RR}_{\parallel}^{-1}\right)-1}{2}\right) θminarccos 2tr(RR∥−1)−1

上面的式子使用了旋转矩阵转欧拉角 的公式

由于arccos⁡\arccosarccos函数单调递减,原问题变为

max⁡θtr(RR∥−1)=max⁡θtr(R(cos⁡θI+(1−cos⁡θ)nnT−sin⁡θn∧))=max⁡θ(cos⁡θtr(R−RnnT)−sin⁡θtr(Rn∧)) \begin{aligned} \max_{\theta} \rm{tr}\left(\bold{RR}{\parallel}^{-1}\right) &=\max{\theta}\rm{tr}\left(\bold{R}\left(\cos \theta \bold{I}+\left( 1-\cos \theta \right) \bold{n}\bold{n}^{T}-\sin \theta \bold{n}^{\wedge } \right)\right)\\ &=\max_{\theta}\left(\cos \theta \rm{tr}\left(\bold{R} - \bold{R}\bold{n}\bold{n}^{T}\right)-\sin\theta\rm{tr}\left(\bold{R}\bold{n}^{\wedge }\right)\right) \end{aligned} θmaxtr(RR∥−1)=θmaxtr(R(cosθI+(1−cosθ)nnT−sinθn∧))=θmax(cosθtr(R−RnnT)−sinθtr(Rn∧))

对θ\thetaθ求导得
−sin⁡θtr(R−RnnT)−cos⁡θtr(Rn∧)=0tan⁡θ=tr(Rn∧)tr(nTRn)−tr(R)θ=arctan⁡(tr(Rn∧)tr(nTRn)−tr(R)) \begin{aligned} -\sin\theta\rm{tr}\left(\bold{R} - \bold{R}\bold{n}\bold{n}^{T}\right)-\cos\theta\rm{tr}\left(\bold{R}\bold{n}^{\wedge }\right)&=0\\ \tan\theta&=\dfrac{\rm{tr}\left(\bold{R}\bold{n}^{\wedge }\right)}{\rm{tr}\left(\bold{n}^{T}\bold{R}\bold{n}\right)-\rm{tr}\left(\bold{R}\right) }\\ \theta&=\arctan\left(\dfrac{\rm{tr}\left(\bold{R}\bold{n}^{\wedge }\right)}{\rm{tr}\left(\bold{n}^{T}\bold{R}\bold{n}\right)-\rm{tr}\left(\bold{R}\right) }\right) \end{aligned} −sinθtr(R−RnnT)−cosθtr(Rn∧)tanθθ=0=tr(nTRn)−tr(R)tr(Rn∧)=arctan(tr(nTRn)−tr(R)tr(Rn∧))

相关推荐
呆呆的小鳄鱼2 分钟前
leetcode:322. 零钱兑换[完全背包]
算法·leetcode·职场和发展
PNP机器人4 分钟前
普林斯顿大学DPPO机器人学习突破:Diffusion Policy Policy Optimization 全新优化扩散策略
人工智能·深度学习·学习·机器人·仿真平台·franka fr3
Gyoku Mint11 分钟前
深度学习×第7卷:参数初始化与网络搭建——她第一次挑好初始的重量
人工智能·pytorch·rnn·深度学习·神经网络·算法·机器学习
mit6.82422 分钟前
[Vroom] 位置与矩阵 | 路由集成 | 抽象,解耦与通信
c++·人工智能·算法
用户403159863966327 分钟前
在工作中学算法——专线配置
java·算法
用户403159863966330 分钟前
在工作中学算法——基于日志的系统故障预测
java·算法
এ᭄画画的北北32 分钟前
力扣-240.搜索二维矩阵 II
算法·leetcode·矩阵
浩瀚星辰202440 分钟前
C++树状数组详解
java·数据结构·算法
强盛小灵通专卖员1 小时前
【中文核心期刊推荐】中国农业科技导报
人工智能·计算机视觉·期刊·中文核心期刊·导师·小论文
JJ1M81 小时前
前缀和+贪心总结,基于每日一题力扣3439、3440
python·算法·leetcode