一、UR机械臂的DH参数

1.1 UR机械臂连杆坐标系图

图中红色为x轴,橘色为z轴。

1.2 UR机械臂的DH参数表

上图中的尺寸并不是完全精准尺寸,因此下面DH参数表中尺寸是从三维模型中测量的。

a i a_i ai​ α i \alpha_i αi​ d i d_i di​ θ i \theta_i θi​
1 0 π / 2 \pi/2 π/2 89.15 θ 1 \theta_1 θ1​
2 -425 0 0 θ 2 \theta_2 θ2​
3 -392.25 0 0 θ 3 \theta_3 θ3​
4 0 π / 2 \pi/2 π/2 109.15 θ 4 \theta_4 θ4​
5 0 − π / 2 -\pi/2 −π/2 94.65 θ 5 \theta_5 θ5​
6 0 0 82.30 θ 6 \theta_6 θ6​

二、UR机械臂正运动学分析

2.1 正运动学建模

从坐标系 i i i到坐标系 i − 1 i-1 i−1的通用变换矩阵公式为:
i − 1 i T = R o t z i − 1 ( θ i ) T r a n s z i − 1 ( d i ) R o t x i ( α i ) T r a n s x i ( a i ) = [ c o s θ i − s i n θ i 0 0 s i n θ i c o s θ i 0 0 0 0 1 0 0 0 0 1 ] ⋅ [ 1 0 0 0 0 1 0 0 0 0 0 d i 0 0 1 1 ] ⋅ [ 1 0 0 0 0 c o s α i − s i n α i 0 0 s i n α i c o s α i 0 0 0 0 1 ] ⋅ [ 1 0 0 a i 0 1 0 0 0 0 1 0 0 0 0 1 ] = [ c o s θ i − s i n θ i ⋅ c o s α i s i n θ i ⋅ s i n α i a i c o s θ i s i n θ i c o s θ i ⋅ c o s α i − c o s θ i ⋅ s i n α i a i s i n θ i 0 s i n α i c o s α i d i 0 0 0 1 ] _{i-1}^{i}\textrm{T}=Rot_{z_{i-1}}(\theta_i)Trans_{z_{i-1}}(d_i)Rot_{x_i}(\alpha_i)Trans_{x_i}(a_i)\\ =\begin{bmatrix} cos\theta_i & -sin\theta_i & 0 & 0\\ sin\theta_i & cos\theta_i & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}\cdot \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & d_i\\ 0 & 0 & 1 & 1 \end{bmatrix}\cdot \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & cos\alpha_i & -sin\alpha_i & 0\\ 0 & sin\alpha_i & cos\alpha_i & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}\cdot \begin{bmatrix} 1 & 0 & 0 & a_i\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}\\ =\begin{bmatrix} cos\theta_i & -sin\theta_i \cdot cos\alpha_i & sin\theta_i \cdot sin\alpha_i & a_i cos\theta_i\\ sin\theta_i & cos\theta_i \cdot cos\alpha_i & -cos\theta_i \cdot sin\alpha_i & a_i sin\theta_i\\ 0 & sin\alpha_i & cos\alpha_i & d_i\\ 0 & 0 & 0 & 1 \end{bmatrix} i−1i​T=Rotzi−1​​(θi​)Transzi−1​​(di​)Rotxi​​(αi​)Transxi​​(ai​)=⎣⎢⎢⎡​cosθi​sinθi​00​−sinθi​cosθi​00​0010​0001​⎦⎥⎥⎤​⋅⎣⎢⎢⎡​1000​0100​0001​00di​1​⎦⎥⎥⎤​⋅⎣⎢⎢⎡​1000​0cosαi​sinαi​0​0−sinαi​cosαi​0​0001​⎦⎥⎥⎤​⋅⎣⎢⎢⎡​1000​0100​0010​ai​001​⎦⎥⎥⎤​=⎣⎢⎢⎡​cosθi​sinθi​00​−sinθi​⋅cosαi​cosθi​⋅cosαi​sinαi​0​sinθi​⋅sinαi​−cosθi​⋅sinαi​cosαi​0​ai​cosθi​ai​sinθi​di​1​⎦⎥⎥⎤​
将上述DH参数代入到上述公式,可以得到变换矩阵:
1 0 T = [ c o s θ 1 0 s i n θ 1 0 s i n θ 1 0 − c o s θ 1 0 0 1 0 d 1 0 0 0 1 ] _{1}^{0}\textrm{T}=\begin{bmatrix} cos\theta_1 & 0 & sin\theta_1 & 0\\ sin\theta_1 & 0 & -cos\theta_1 & 0\\ 0 & 1 & 0 & d_1\\ 0 & 0 & 0 & 1 \end{bmatrix} 10​T=⎣⎢⎢⎡​cosθ1​sinθ1​00​0010​sinθ1​−cosθ1​00​00d1​1​⎦⎥⎥⎤​

2 1 T = [ c o s θ 2 − s i n θ 2 0 a 2 c o s θ 2 s i n θ 2 c o s θ 2 0 a 2 s i n θ 2 0 0 1 0 0 0 0 1 ] _{2}^{1}\textrm{T}=\begin{bmatrix} cos\theta_2 & -sin\theta_2 & 0 & a_2 cos\theta_2\\ sin\theta_2 & cos\theta_2 & 0 & a_2 sin\theta_2\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix} 21​T=⎣⎢⎢⎡​cosθ2​sinθ2​00​−sinθ2​cosθ2​00​0010​a2​cosθ2​a2​sinθ2​01​⎦⎥⎥⎤​

3 2 T = [ c o s θ 3 − s i n θ 3 0 a 3 c o s θ 3 s i n θ 3 c o s θ 3 0 a 3 s i n θ 3 0 0 1 0 0 0 0 1 ] _{3}^{2}\textrm{T}=\begin{bmatrix} cos\theta_3 & -sin\theta_3 & 0 & a_3 cos\theta_3\\ sin\theta_3 & cos\theta_3 & 0 & a_3 sin\theta_3\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix} 32​T=⎣⎢⎢⎡​cosθ3​sinθ3​00​−sinθ3​cosθ3​00​0010​a3​cosθ3​a3​sinθ3​01​⎦⎥⎥⎤​

4 3 T = [ c o s θ 4 0 s i n θ 4 0 s i n θ 4 0 − c o s θ 4 0 0 1 0 d 4 0 0 0 1 ] _{4}^{3}\textrm{T}=\begin{bmatrix} cos\theta_4 & 0 & sin\theta_4 & 0\\ sin\theta_4 & 0 & -cos\theta_4 & 0\\ 0 & 1 & 0 & d_4\\ 0 & 0 & 0 & 1 \end{bmatrix} 43​T=⎣⎢⎢⎡​cosθ4​sinθ4​00​0010​sinθ4​−cosθ4​00​00d4​1​⎦⎥⎥⎤​

5 4 T = [ c o s θ 5 0 − s i n θ 5 0 s i n θ 5 0 c o s θ 5 0 0 − 1 0 d 5 0 0 0 1 ] _{5}^{4}\textrm{T}=\begin{bmatrix} cos\theta_5 & 0 & -sin\theta_5 & 0\\ sin\theta_5 & 0 & cos\theta_5 & 0\\ 0 & -1 & 0 & d_5\\ 0 & 0 & 0 & 1 \end{bmatrix} 54​T=⎣⎢⎢⎡​cosθ5​sinθ5​00​00−10​−sinθ5​cosθ5​00​00d5​1​⎦⎥⎥⎤​

5 6 T = [ c o s θ 6 − s i n θ 6 0 0 s i n θ 6 c o s θ 6 0 0 0 0 1 d 6 0 0 0 1 ] _{5}^{6}\textrm{T}=\begin{bmatrix} cos\theta_6 & -sin\theta_6 & 0 & 0\\ sin\theta_6 & cos\theta_6 & 0 & 0\\ 0 & 0 & 1 & d_6\\ 0 & 0 & 0 & 1 \end{bmatrix} 56​T=⎣⎢⎢⎡​cosθ6​sinθ6​00​−sinθ6​cosθ6​00​0010​00d6​1​⎦⎥⎥⎤​

正运动学的最终变换矩阵为:
T = 1 0 T ⋅ 2 1 T ⋅ 3 2 T ⋅ 4 3 T ⋅ 5 4 T ⋅ 6 5 T \textrm{T}=_{1}^{0}\textrm{T} \cdot _{2}^{1}\textrm{T} \cdot _{3}^{2}\textrm{T} \cdot _{4}^{3}\textrm{T} \cdot _{5}^{4}\textrm{T} \cdot _{6}^{5}\textrm{T} T=10​T⋅21​T⋅32​T⋅43​T⋅54​T⋅65​T

2.2 正运动学MATLAB编程

T_param.m:用于获取坐标系 i i i到坐标系 i − 1 i-1 i−1的通用变换矩阵

function T = T_param(theta, d, a, alpha)
% 输入:theta,d,a和alpha为变量,两个相邻连杆坐标系之间DH参数
% 输出:机械臂两个相邻连杆坐标系的正运动学变换矩阵T = [cos(theta), -sin(theta)*cos(alpha), sin(theta)*sin(alpha) , a*cos(theta);sin(theta), cos(theta)*cos(alpha) , -cos(theta)*sin(alpha), a*sin(theta);0         , sin(alpha)            , cos(alpha)            , d           ;0         , 0                     , 0                     , 1            ];end

myfkine.m:用于获取UR机械臂的坐标变换矩阵

function T = myfkine(theta, d, a, alpha)
% 输入:theta,d,a和alpha为数组,存储机械臂DH参数
% 输出:机械臂正运动学变换矩阵T01 = T_param(theta(1), d(1), a(1), alpha(1));T12 = T_param(theta(2), d(2), a(2), alpha(2));T23 = T_param(theta(3), d(3), a(3), alpha(3));T34 = T_param(theta(4), d(4), a(4), alpha(4));T45 = T_param(theta(5), d(5), a(5), alpha(5));T56 = T_param(theta(6), d(6), a(6), alpha(6));T = T01*T12*T23*T34*T45*T56;end

main.m:比较机器人工具箱建立的机器人模型和自编代码输出结果

%% 启动机器人工具箱
% startup_rvc %% 使用机器人工具箱建立机器人模型
% UR5机械臂参数
a = [0, -0.42500, -0.39225, 0, 0, 0];
d = [0.089159, 0, 0, 0.10915, 0.09465, 0.08230];
alpha = [pi/2, 0, 0, pi/2, -pi/2, 0];% 建立UR5机械臂模型
L1 = Link('d', d(1),  'a', a(1), 'alpha', alpha(1),  'standard');
L2 = Link('d', d(2),  'a', a(2), 'alpha', alpha(2),  'standard');
L3 = Link('d', d(3),  'a', a(3), 'alpha', alpha(3),  'standard');
L4 = Link('d', d(4),  'a', a(4), 'alpha', alpha(4),  'standard');
L5 = Link('d', d(5),  'a', a(5), 'alpha', alpha(5),  'standard');
L6 = Link('d', d(6),  'a', a(6), 'alpha', alpha(6),  'standard');
tool_robot = SerialLink([L1,L2,L3,L4,L5,L6], 'name', 'UR5');
% tool_robot.display();
% view(3); % 必须添加,否则报错,错误是由版本引起
% tool_robot.teach();%% 验证机器人正运动学模型
theta = [1,1/2,1,1,1,1];
T_tool = tool_robot.fkine(theta)    %机器人工具箱建立模型输出位姿信息TT = myfkine(theta, d, a, alpha)    %编写代码输出位姿信息

输出结果:

UR5机械臂正向运动学相关推荐

  1. ROS下如何使用moveit驱动UR5机械臂

    转载:http://blog.csdn.net/jayandchuxu/article/details/54693870 原来的moveit实在Ubuntu12.04上安装的,ros版本是hydro, ...

  2. vrep和matlab,VREP与MATLAB联合仿真程序--UR5机械臂动力学控制

    [实例简介] VREP与MATALB联合仿真,针对UR5机械臂进行PD加重力补偿控制. [实例截图] [核心代码] UR5_TEST_VREP └── UR5_TEST_VREP ├── Bloque ...

  3. 在ROS上实现Seed robotics R8HD机械手与Ur5机械臂的连接与轨迹规划(上)模型连接

    本部分讲解R8HD的模型与ur5机械臂的连接并在rviz中正常显示 前言:本文运行环境: Ubuntu 20.04 ROS noetic 工作空间ur_ws fmauch_universal_robo ...

  4. Dynamic Movement Primitives与UR5机械臂仿真

    Dynamic Movement Primitives (DMP),中文译名为动态运动基元.动态运动原语等,最初是由南加州大学的Stefan Schaal教授团队在2002年提出来的,是一种用于轨迹模 ...

  5. ROS-Melodic-Moveit 实时控制UR5机械臂

    ROS-Melodic-Moveit 实时控制UR5机械臂 文章目录 前言 一.Universal_robot的软件包安装 二.ur_modern_driver驱动修改 三.设置ployscope和电 ...

  6. UR5机械臂仿真环境搭建

    UR5机械臂仿真环境搭建 重要参考: ROS官网教程 前段时间,实验室采购了一台UR5机械臂,今天花了一下午,对照官网教程,完成了仿真环境搭建,期间遇到了一些问题,好在最后都解决了.机械臂的运动规划和 ...

  7. 机械臂正向运动学原理通俗解释

    机械臂正向运动学理解原理通俗解释 正向运动学可以理解为关节运动量的传递. 定性理解:关节的运动量都是以在前面一个关节上建立的坐标系为参考旋转多少角度,一个关节运动会带动后面的关节运动,会导致固定在关节 ...

  8. UR5机械臂与realsense相机在Gazebo仿真环境下的手眼标定(眼在手上)

    简介 这是一个Gazebo仿真环境下利用UR5机械臂和realsense相机进行手眼标定的教程(眼在手上). 准备相关文件 # UR5 git clone https://github.com/Uni ...

  9. 【机器人1】基于POE公式的UR5机械臂正运动学建模求解与matlab仿真

    基于PoE公式的UR5机械臂正运动学建模求解与matlab仿真 基于PoE公式的UR5机械臂正运动学分析 1.1 运动旋量的螺旋释义(理论基础) 1.2 基于PoE公式的UR5机械臂正运动学模型 1. ...

最新文章

  1. Thread和Object类中关于线程的相关方法
  2. 局域网服务器共享文件怎么设置,【局域网共享文件】局域网如何文件共享_局域网共享设置文件夹_佰佰安全网...
  3. 作文第一次用计算机350,第一次考试作文350字
  4. 洛谷 P1309 瑞士轮 解题报告
  5. 查看wcf服务中方法测试客户端
  6. Spring学习笔记1
  7. 对SqlServer2008中的日志进行截断的方法
  8. Python 中 异步协程 的 使用方法介绍
  9. 【Docker】Error: No such image: gotok8s/kube-proxy:v1.16.5
  10. UniTask使用笔记
  11. C# 运行时中的泛型
  12. CentOS桥接网卡配置
  13. 数字电路实验四选一数据选择器行为级模型
  14. mysql 用户授权授权_mysql的用户权限如何授权
  15. 详解验证码与打码平台的攻防对抗
  16. [Github实战]双重认证2FA 如何 设置/更改[手把手][2022]
  17. windows在cmd中用cl、link工具编译生成dll与lib
  18. html标签-meta
  19. 基于C语言的AES加密算法实现
  20. (PTA)数据结构(作业)3、链表

热门文章

  1. 《机器学习实战》kNN学习笔记
  2. 信息安全-六: 审计
  3. Riccati 方程求解及MATLAB function遇到的代码生成问题
  4. 【软件质量】软件健壮性
  5. 爱拼t6输入法 v3.10 完整版 免费下载
  6. 游戏人视角看游戏 之 《长生劫》
  7. Learning from the enemy
  8. 程序员常用的网站(转)
  9. 一位大佬的亲身经历总结:简历和面试的技巧
  10. 如果你的App发生闪退,一般是什么原因造成的?