机器人运动学逆解的问题经常出现在动画仿真和工业机器人的轨迹规划中:We want to know how the upper joints of the hierarchy would rotate if we want the end effector to reach some goal.

IK Solutions:

Analytical solutions are desirable because of their speed and exactness of solution.

For complex kinematics problems, analytical solutions may not be possible.

Use iterative methods (迭代法)--Optimization methods (e.g., minimize the distance between end effector and goal point)

机器人学的教材上一般只介绍了运动学逆解的解析解法,很少涉及数值解(迭代解法)。其中有两方面的原因,一是数值解相对于解析解需要的运算量更大,不太适合实时性要求较高的场合;另一方面是因为一般在设计机器人的结构时就会考虑其逆解的可解性,比如相邻的三个关节轴线相交即存在解析解。下面以最简单的二连杆机构为例子,研究一下机器人运动学逆解的数值解法。如下图所示,其运动学正解很容易得到,根据运动学正解可以写出机器人的雅克比矩阵J。

What is Jacobian? A linear approximation to f(x). 雅克比矩阵相当于函数f(x)的一阶导数,即线性近似。

Computing the Jacobian Numerically:(

下面是Jacobian Transpose方法的主要推导过程:

It is recommended that you choose a small positive scalar α < 1 and update the joint angles θ by adding Δθ. Then proceed iteratively by recomputing the Jacobian based on the updated angles and positions, finding new values for Δθ and again updating with a small fraction α. This is repeated until the links are sufficiently close to the desired positions. The question of how small α needs to be depends on the geometry of the links; it would be a good idea to keep α small enough so that the angles are updated by at most 5 or 10° at a time.

这一方法运用了最速降法(梯度法)的思想,利用目标函数在迭代点的局部性态,每步搜索都沿着函数值下降最快的方向,即负梯度方向进行搜索。迭代过程的几何概念较为直观,方法和程序简单,容易实现,不足之处是每次迭代都是沿着迭代点的负梯度方向搜索,搜索路径较为曲折,收敛慢。

Operating Principle:

Project difference vector DX on those dimensions qwhich can reduce it the most. It is a plausible, justifyable approach, because it is related to the method of steepest decent.( It follows a force that pulls the end-effector towards its desired target location).

Advantages:

1. Simple computation (numerically robust)

2. No matrix inversions

Disadvantages:

1. Needs many iterations until convergence in certain configurations

2. Unpredictable joint configurations

3. Non conservative

下面以V-rep中官方自带的例子(在文件夹scenes/ik_fk_simple_examples中)为基础进行修改,添加代码手动实现运动学逆解的求解。为了实现同样的功能先将两个旋转关节从Inverse kinematics mode设为Passive mode,然后将target和tip的Linked dummy设为none,并在Calculation Modules的Inverse kinematics选项卡中取消IK groups enabled。下图中红色的dummy为target dummy,仿真开始后程序会计算连杆末端(tip dummy)与target之间的误差,然后根据Jacobian Transpose方法不断计算关节调整量,直到误差小于容许值。

如下图所示,迭代计算61次收敛后,点击图中的Compute IK按钮,连杆末端能根据计算出的关节角q1,q2移动到target的位置(可以随意拖动target的位置,在合理的范围内经过逆解计算tip都会与target重合)

在child script中由lua API实现了该方法

if (sim_call_type==sim_childscriptcall_initialization) then

ui=simGetUIHandle('UI')

J1_handle = simGetObjectHandle('j1')

J2_handle = simGetObjectHandle('j2')

target_handle = simGetObjectHandle('target')

consoleHandle = simAuxiliaryConsoleOpen('info', , +, {,},{,})

--link length

L1 = 0.5

L2 = 0.5

gamma = --step size

stol = 1e-2 --tolerance

nm = --initial error

count = --iteration count

ilimit = --maximum iteratio

--initial joint value

q1 =

q2 =

end

if (sim_call_type==sim_childscriptcall_actuation) then

local a=simGetUIEventButton(ui)

local target_pos = simGetObjectPosition(target_handle, -)

if(nm > stol)

then

simAuxiliaryConsolePrint(consoleHandle, nil)

local x, y = L1*math.cos(q1)+L2*math.cos(q1+q2), L1*math.sin(q1)+L2*math.sin(q1+q2)

local delta_x, delta_y = target_pos[] - x, target_pos[] - y

local dq_1 = (-L1*math.sin(q1)-L2*math.sin(q1+q2))*delta_x + (L1*math.cos(q1)+L2*math.cos(q1+q2))*delta_y

local dq_2 = (-L2*math.sin(q1+q2))*delta_x + (L2*math.cos(q1+q2))*delta_y

q1, q2 = q1 + gamma*dq_1, q2 + gamma*dq_2

nm = math.sqrt(delta_x * delta_x + delta_y * delta_y)

count = count +

if count > ilimit then

simAuxiliaryConsolePrint(consoleHandle,"Solution wouldn't converge\r\n")

end

simAuxiliaryConsolePrint(consoleHandle, string.format("q1:%.2f", q1*/math.pi)..' '..string.format("q2:%.2f", q2*/math.pi)..'\r\n')

simAuxiliaryConsolePrint(consoleHandle, string.format("x:%.2f",x)..' '..string.format("y:%.2f", y)..'\r\n')

simAuxiliaryConsolePrint(consoleHandle, string.format("%d", count)..'iterations'..' '..string.format("err:%.4f", nm)..'\r\n')

end

-- if the button(a is the button handle) is pressed

if a== then

simSetJointPosition(J1_handle, q1+math.pi/) -- the angle between L1 and X-axis is 90 degree

simSetJointPosition(J2_handle, q2)

end

end

V-rep学习笔记:机器人逆运动学数值解法(The Pseudo Inverse Method)

There are two ways of using the Jacobian matrix to solve kinematics. One is to use the transpose of ...

V-rep学习笔记:机器人逆运动学数值解法(Cyclic Coordinate Descent Method)

When performing inverse kinematics (IK) on a complicated bone chain, it can become too complex for a ...

V-rep学习笔记:机器人逆运动学数值解法(Damped Least Squares &sol; Levenberg-Marquardt Method)

The damped least squares method is also called the Levenberg-Marquardt method. Levenberg-Marquardt算法 ...

V-rep学习笔记:机器人逆运动学解算

IK groups and IK elements VREP中使用IK groups和IK elements来进行正/逆运动学计算,一个IK group可以包含一个或者多个IK elements: I ...

matlab学习笔记10&lowbar;6 字符串与数值间的转换以及进制之间的转换

一起来学matlab-matlab学习笔记10 10_6 字符串与数值间的转换以及进制之间的转换 觉得有用的话,欢迎一起讨论相互学习~Follow Me 参考书籍

ES6学习笔记(四)-数值扩展

PS: 前段时间转入有道云笔记,体验非常友好,所以笔记一般记录于云笔记中,每隔一段时间,会整理一下, 发在博客上与大家一起分享,交流和学习. 以下:

python学习笔记(五)数值类型和类型转换

Python中的数值类型有: 整型,如2,520 浮点型,如3.14159,1.5e10 布尔类型 True和False e记法: e记法即对应数学中的科学记数法 >>> 1.5e1 ...

ES6学习笔记(四)数值的扩展

1.二进制和八进制表示法 ES6 提供了二进制和八进制数值的新的写法,分别用前缀0b(或0B)和0o(或0O)表示. 0b111110111 === 503 // true 0o767 === 503 ...

Python学习笔记(2)数值类型

进制转换 int函数任意进制转换为10进制 第一个参数传入一个字符串,任意进制的,第二个参数传入对这个字符串的解释,解释他为几进制 hex oct bin转换进制为16 8 或者2进制 例题中石油87 ...

随机推荐

UITableViewHeaderFooterView的封装

UITableViewHeaderFooterView的封装 特点 1. 封装的 UITableViewHeaderFooterView 能够让用户更好的自定义自己的 headerView; 2. 封 ...

sql 语句纵表变横表

现把转换方法列举如下: 1.纵表转横表: 纵表结构 TableA Name Course Grade 张三 语文 75 张三 数学 80 张三 英语 90 李四 语文 95 李四 数学 55 横表结构 ...

自动生成build&period;xml文件

使用Eclipse 自动生成 Ant的Build.xml 配置文件,选择要生成Build.xml文件的项目,鼠标右键, Export-> General -> Ant Buildfiles ...

Python环境变量设置

在Windows环境下安装了python后,为了方便运行.py文件,可以设置环境变量如下: 环境变量位置 添加值 添加后效果 系统变量中的PATH python.exe所在目录,比如D:\Python ...

Webstorm编译TypeScript报错

Accessors are only available when targeting ECMAscript 5 and higher. 解决办法: File Watchers 在tsc.cmd命令上 ...

java&lowbar;分解质因数

题目内容: 每个非素数(合数)都可以写成几个素数(也可称为质数)相乘的形式,这几个素数就都叫做这个合数的质因数.比如,6可以被分解为2x3,而24可以被分解为2x2x2x3. 现在,你的程序要读入一个 ...

C&num;并行编程(1):理解并行

什么是并行 并行是指两个或者多个事件在同一时刻发生. 在程序运行中,并行指多个CPU核心同时执行不同的任务:对于单核心CPU,严格来说是没有程序并行的.并行是为了提高任务执行效率,更快的获取结果. 与 ...

OTG作为大容量设备

/********************************************************************************* * OTG作为大容量设备 * 说明 ...

JS属性描述符之Object&period;defineProperty&lpar;&rpar;定义对象属性特性

一.Object.defineProperty的作用 用来给对象新增属性,和修改对象中的属性. 二.JS对象中的描述符 js对象中两种属性描述符:数据描述符和存取描述符(访问描述符). 注意事项: 1 ...

linux系统上项目部署

步骤:(特别注意:虚拟机安装的一般是32位的操作系统,jdk也必须使用32位的)查看虚拟机版本:sudo uname --m i686 //表示是32位 x86_64 // 表示是64位 查看是否已经 ...

python计算机器人运动学分析_V-rep学习笔记:机器人逆运动学数值解法(The Jacobian Transpose Method)...相关推荐

  1. python web开发入门_python大佬整理的python web开发从入门到精通学习笔记

    原标题:python大佬整理的python web开发从入门到精通学习笔记 Python(发音:英[?pa?θ?n],美[?pa?θɑ:n]),是一种面向对象.直译式电脑编程语言,也是一种功能强大的通 ...

  2. setup.s 分析—— Linux-0.11 学习笔记(二)

    更新记录 版本 时间 修订内容 1.0 2018-4-14 增加了"获取显示模式"这一节,AL取值的表格 标题: setup.s 分析-- Linux-0.11 学习笔记(二) 老 ...

  3. 《软件调试分析技术》学习笔记

    <软件调试分析技术>学习笔记(一) 今天开始写写一些心得体验. <软件调试分析技术>是好友Monster的处女作品.作为一直以的好伙伴,他是我看着长大的,(*^__^*) 嘻嘻 ...

  4. 《python(廖雪峰课程)》学习笔记

    <python(廖雪峰课程)>学习笔记(个人检索) 1. 第一个python程序 input & output print输出字符串可以用""or'' prin ...

  5. 嵌入式之uboot源码分析-启动第二阶段学习笔记(下篇)

    接上部分---->嵌入式之uboot源码分析-启动第二阶段学习笔记(上篇) 注:如下内容来自朱老师物联网大讲堂uboot课件 3.2.14 CFG_NO_FLASH (1)虽然NandFlash ...

  6. SGX技术的分析与研究 学习笔记

    SGX技术的分析与研究 学习笔记 SGX技术的分析与研究 学习笔记 1 SGX架构概述 2 SGX关键技术 2.1 Enclave安全容器 2.2 Enclave保护机制 2.2.1 内存访问语义 2 ...

  7. 用python计算1乘到10_从零开始学习PYTHON3讲义(十一)计算器升级啦

    (内容需要,本讲中再次使用了大量在线公式,如果因为转帖网站不支持公式无法显示的情况,欢迎访问原始博客.) <从零开始PYTHON3>第十一讲 第二讲的时候,我们通过Python的交互模式来 ...

  8. python列表乘数值_《利用Python进行数据分析》十一章· 时间序列·学习笔记(一)...

    一.时间序列 时间序列(time series)数据是一种重要的结构化数据形式,应用于多个领域,包括金融学.经济学.生态学.神经科学.物理学等.在多个时间点观察或测量到的任何事物都可以形成一段时间序列 ...

  9. python基础语法 第0关print-python学习笔记1,新手小白也能看得懂

    这是酸菜在风变编程上学习python时积累的学习笔记,希望能帮到同样也在学习中的小伙伴.持续更新~ 第0关 Print()函数 (1)不带引号:让计算机读懂括号里的内容,打印最终的结果 例:print ...

最新文章

  1. 以太坊源码linux下如何编译,以太坊教程:搭建环境、编写编译一个智能合约
  2. C语言记录元音字母的位置,算法训练 确定元音字母位置
  3. python下载网络错误_下载失败,出现“网络错误”+40000
  4. 倒计时或按任意键返回首页_超实用excel小技巧之时间倒计时及动态显示
  5. python打开excel表_Python启动Excel
  6. Qt下Tcp传输文件
  7. php 元素插入数组指定位置,数组任意位置插入元素,删除特定元素的实例
  8. 方差、标准差、均方根误差
  9. 51CTO寄来的奖品
  10. 删除链表的倒数第n个节点 python_LeetCode 19.删除链表的倒数第N个节点(Python)
  11. cp和scp复制命令
  12. 线程池的使用和工作原理
  13. 使用Easy CHM工具对文件生成API文档
  14. 猫眼电影的android源代码!,微信小程序入门demo之猫眼电影
  15. 12.2.1 QTcpSocket类介绍
  16. Element plus:将组件中英文转为中文
  17. Android 动态获取控件的宽高,并动态设置控件宽高
  18. 如何快速理解TCP协议
  19. cmd命令查询电脑序列号_如何使用指令提示符查看电脑序列号
  20. DOM clobbering(DOM破坏)

热门文章

  1. 一款开源免费的办公套件系统:DzzOffice详细部署
  2. OC方法以及文件编译
  3. python打印A-Z
  4. 图形编辑器:对齐功能的实现
  5. 微信小程序 关于下载文件、打开文件预览文件(wx.downloadFile和wx.openDocument)
  6. 开启微信悬浮窗权限有什么用_新版微信功能!微信也可以设置主题皮肤了,不再是单调的白色,这也太好看了吧!...
  7. 大数据工程师的日常工作是什么?要掌握哪些核心技术?
  8. 32bit转64bit,使用anaconda实现python64位与32位共存【多次踩雷后的正确解决方法】
  9. 7-6 福到了 (15分)
  10. Unity_粒子特效