DH参数(Denavit-Hartenberg parameters)
為什么
- 機械臂關節通常只關于一個軸進行移動(旋轉或者平移),兩段手臂的坐標系之間的變換可以由原本的6變量(3位移+3旋轉)簡化成4變量(DH參數)
- 關節自由度高(例如手腕可繞3個軸旋轉),也可以分解成多個單軸
是什么
圖源《Introduction to Robotics Mechanics and Control》
四個參數中,有兩個表示關節軸相對前一關節軸的變化,另外兩個表示關節沿軸的運動。
軸到軸的變化
設兩個相鄰關節的軸i?1_{i-1}i?1?和軸i_{i}i?的公共垂線為lll,方向為i?1{i-1}i?1到i{i}i,軸的變化可以表示為倆個參數
- 軸間距離ai?1a_{i-1}ai?1?
- 軸i?1_{i-1}i?1?旋轉到軸i_ii?的角度αi?1\alpha_{i-1}αi?1?,沿著lll右手系旋轉
關節的運動
- 沿軸平移did_idi?
- 繞軸旋轉θi\theta_iθi?
通常其中一個為常數,另一個為變量,根據不同關節類型而定
坐標系
將軸i?1_{i-1}i?1?到軸i_{i}i?中間的連接稱為linki?1link_{i-1}linki?1?,靠近軸i_{i}i?的稱為前端,靠近軸i?1_{i-1}i?1?的稱為后端,則有兩種坐標系建立的方式,對應不同的變換矩陣Tii?1T^{i-1}_iTii?1?,坐標系iii到i?1i-1i?1的變換。
設在后端
垂線lll設為Xi?1X_{i-1}Xi?1?,軸i?1_{i-1}i?1?設為Zi?1Z_{i-1}Zi?1?,轉換和(ai?1,αi?1,di,θia_{i-1}, \alpha_{i-1},d_i,\theta_iai?1?,αi?1?,di?,θi?)有關
Tii?1=[cθi?sθi0ai?1sθicαi?1cθicαi?1?sαi?1?sαi?1disθisαi?1cθisαi?1cαi?1cαi?1di0001]T^{i-1}_{i} = \left[ \begin{array}{c} c\theta_i & -s\theta_i & 0 & a_{i-1} \\ s\theta_i c\alpha_{i-1} & c\theta_i c\alpha_{i-1} & -s\alpha_{i-1} & -s\alpha_{i-1} d_i \\ s\theta_i s\alpha_{i-1} & c\theta_i s\alpha_{i-1} & c\alpha_{i-1} & c\alpha_{i-1} d_i \\ 0 & 0 & 0 & 1\\ \end{array} \right]Tii?1?=?????cθi?sθi?cαi?1?sθi?sαi?1?0??sθi?cθi?cαi?1?cθi?sαi?1?0?0?sαi?1?cαi?1?0?ai?1??sαi?1?di?cαi?1?di?1??????
圖源《Introduction to Robotics Mechanics and Control》
設在前端
同樣垂線lll設為Xi?1X_{i-1}Xi?1?,但是將軸i_{i}i?設為Zi?1Z_{i-1}Zi?1?,轉換和(ai,αi,di,θia_i, \alpha_i,d_i,\theta_iai?,αi?,di?,θi?)有關
Tii?1=[cθi?sθicαisθisαiaicθisθicθicαi?cθisαiaisθi0sαicαidi0001]T^{i-1}_{i} = \left[ \begin{array}{c} c\theta_i & -s\theta_i c\alpha_i & s\theta_i s\alpha_i & a_i c\theta_i \\ s\theta_i & c\theta_i c\alpha_i & -c\theta_i s\alpha_i & a_i s\theta_i \\ 0 & s\alpha_i & c\alpha_i & d_i \\ 0 & 0 & 0 & 1\\ \end{array} \right]Tii?1?=?????cθi?sθi?00??sθi?cαi?cθi?cαi?sαi?0?sθi?sαi??cθi?sαi?cαi?0?ai?cθi?ai?sθi?di?1??????
圖源《Robotics Vision And Control》
怎么用
參數表
求機械臂運動學正解(forward kinematics)
將多個關節串聯起來,獲得末端位姿
例:UR5
ur5 ros github 參數 (以設在前端的方式建立坐標)
| 1 | 0 | 1.570796327 | 0.089159 | θ1\theta_1θ1? |
| 2 | -0.42500 | 0 | 0 | θ2\theta_2θ2? |
| 3 | -0.39225 | 0 | 0 | θ3\theta_3θ3? |
| 4 | 0 | 1.570796327 | 0.10915 | θ4\theta_4θ4? |
| 5 | 0 | -1.570796327 | 0.09465 | θ5\theta_5θ5? |
| 6 | 0 | 0 | 0.0823 | θ6\theta_6θ6? |
q_home_offset = [0, -1.570796327, 0, -1.570796327, 0, 0]
joint_direction = [-1, -1, 1, 1, 1, 1]
末端位姿T60=T10T21T32T43T54T65T^{0}_{6} = T^{0}_{1}T^{1}_{2}T^{2}_{3}T^{3}_{4}T^{4}_{5}T^{5}_{6}T60?=T10?T21?T32?T43?T54?T65?
總結
以上是生活随笔為你收集整理的DH参数(Denavit-Hartenberg parameters)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 三津谈保险系统建设(一): 现状分析和建
- 下一篇: 基础Astar算法及节点优化python