V-rep学习笔记:并联机构正逆运动学
Solving the FK problem of simple kinematic chains is trivial (just apply the desired joint values to all joints in the chain to obtain the position and orientation of the tip or end effector). However it is less trivial to solve the IK and FK problem for closed mechanisms. 计算串联机构(或开链机构)的运动学正解很简单,但是对于并联机构或者闭链机构(若运动链的各构件构成了首末封闭的系统,则称其为闭式运动链)来说运动学正解的计算就比较复杂。

Solving IK and FK for closed mechanisms
In the case of an FK problem, identify the joints that you want to control (i.e. the joints that are driving the mechanism, the active joints—select the joint mode different from inverse kinematics mode). Then, identify which kinematic chain needs to be closed. Closing will be handled by loop closure constraints in the form of tip-target pairs as shown in following figure:

[Forward Kinematics solving method for closed mechanisms]
Then, set the desired joint values for the active joints and call the inverse kinematics functionality to handle loop closure constraints. (the default main script handles all IK groups that are not marked as explicit handling). Following example shows some additional functionality that can be used to solve complicated kinematic problems:

[Inverse kinematics task]
Most of the time there are several different ways of solving the IK or FK of a mechanism, and it is always worth considering various alternatives before implementing the most complicated one!
参考V-REP_PRO_EDU\scenes\ik_fk_simple_examples\7-fkAndIkResolutionForParallelMechanisms.ttt中的例子,实现了闭链机构的运动学正解与逆解:

根据这个例子我们来搭建一个平行四边形机构。构建树形层级结构:以frame作为机座,然后将运动链上的节点依次串联起来,最后将target和tip连接起来构成闭环(loop closure)。target和tip的类型设置为IK,tip-target,然后在Calculation Modules的IK选项卡中添加IK group,并将其设为显式处理(Explicit handling):
[模型结构]

[IK设置]
给第一个关节(主动控制关节。其它关节从动但要设为IK模式,而不是passive模式)施加一个正弦规律的往复摆动,可以看出机构能跟着一起运动而不散开。添加Graph记录末端关节转角和运动链上倒数第二个关节的转角,可以看出末端关节转角为0且始终保持不变(其实这里末端的Joint并没有什么作用,因为在IK的计算下tip和target已经能重合。比如上面官方的那个例子中最后一根杆L5就没有接Joint而是直接连着tip)。

代码如下,在设置主动关节角度后可以调用simHandleIkGroup函数来计算IK,使机构保持闭环:
if (sim_call_type==sim_childscriptcall_initialization) then
ikGroup=simGetIkGroupHandle('ik')
tipDummy=simGetObjectHandle('tip')
motor=simGetObjectHandle('Revolute_joint0')
-- set the motor joint into ik mode
simSetJointMode(motor,sim_jointmode_ik,)
-- close the mechanism (if it was open)
simHandleIkGroup(ikGroup)
end
if (sim_call_type==sim_childscriptcall_actuation) then
-- First set the motor joint into passive mode
simSetJointMode(motor,sim_jointmode_passive,)
-- Set the desired joint angle
local angle=*math.pi/*math.sin(math.pi*simGetSimulationTime())
simSetJointPosition(motor, angle)
-- Compute
simHandleIkGroup(ikGroup)
end
注意使用几何约束求解器GCS也能实现类似的功能,只是相比IK存在着一些差异:The geometric constraint solver is slower and less precise at solving kinematic problems, but might be easier and more intuitive to use. Moreover, it allows interacting with a mechanism in a more flexible way than the inverse kinematics calculation module.
下面场景中可以拖拽机构上的任意杆件来直观地控制其运动。这里使用的是Geometric Constraint Solver(注意要设置好General damping参数,否则可能出现拖拽时机构不动、动的很迟缓或者约束broken的现象)

参考:
Solving IK and FK for any type of mechanism
V-rep学习笔记:Geometric Constraint Solver(几何约束求解)
V-rep学习笔记:并联机构正逆运动学的更多相关文章
- V-rep学习笔记:机器人逆运动学解算
IK groups and IK elements VREP中使用IK groups和IK elements来进行正/逆运动学计算,一个IK group可以包含一个或者多个IK elements: I ...
- 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 / Levenberg-Marquardt Method)
The damped least squares method is also called the Levenberg-Marquardt method. Levenberg-Marquardt算法 ...
- V-rep学习笔记:机器人逆运动学数值解法(The Jacobian Transpose Method)
机器人运动学逆解的问题经常出现在动画仿真和工业机器人的轨迹规划中:We want to know how the upper joints of the hierarchy would rotate ...
- 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 ...
- python 学习笔记 10 -- 正則表達式
零.引言 在<Dive into Python>(深入python)中,第七章介绍正則表達式,开篇非常好的引出了正則表達式,以下借用一下:我们都知道python中字符串也有比較简单的方法, ...
- shell脚本学习笔记 (正則表達式)
正則表達式一般有三个部分组成,他们各自是:字符类,数量限定符,位置限定符. 规定一些特殊语法表示字符类.数 量限定符和位置关系,然后用这些特殊语法和普通字符一起表示一个模式,这就是正則表達式(Regu ...
- C#学习笔记---协变和逆变
http://www.cnblogs.com/alphafly/p/4048608.html 协变是指方法能从委托的返回类型派生的一个类型. 逆变之方法获取的参数可以是委托参数类型的基类.
- V-rep学习笔记:Geometric Constraint Solver(几何约束求解)
The geometric constraint solver is slower and less precise at solving kinematic problems, but might ...
随机推荐
- 如果类型是dynamic的且其属性也是dynamic的
在 MVC 中,如果尝试如下的编码: public ActionResult TeacherInfo(string courseId) { var x = LearningBll.GetTea ...
- 在ubuntu中搜索文件或文件夹的方法
版权声明:本文为博主原创文章,转载请注明出处. https://blog.csdn.net/dcrmg/article/details/78000961 1. whereis+文件名 用于程序名的搜索 ...
- 微信Access Token 缓存方法
微信Access Token默认缓存是2小时,但是需要特别强调,微信服务号和微信企业号缓存并不相同. (1)微信公众号号:每次Http请求Access Token 系统会返回不同的Token,并附带超 ...
- 使用ASP.NET+Jquery DataTables的服务器分页
(1)先建立表,看看表结构 (2)建立存储过程 DataTables是服务器分页,GetWxUsers存储过程使用了4个参数 (1) @start--表示当前第几页,例如第3页,start是从0开始 ...
- C#7.0新增功能点
原文地址: https://www.cnblogs.com/runningsmallguo/p/8972678.html 第二部分:C#7.0新增的功能 (1)数字字面量的提升: C#7中的数字文字 ...
- Spring boot Unable to start embedded Tomcat报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()
Spring boot Unable to start embedded Tomcat 报错 java.lang.NoSuchMethodError: javax.servlet.ServletCon ...
- centos配置ssh免密码登录
master.slave1两台机器实现ssh免密码登录,user:hadoop,passwd:123456 1.设置master: vi /etc/sysconfig/network hostname ...
- Magento错误 Illegal scheme supplied, only alphanumeric characters are permitted
1.检查表core_config_data 'web/unsecure/base_url' 和'web/secure/base_url' 的值是否是正确的链接地址 2.删除系统目录var下所有子目录及 ...
- 【nodejs】理想论坛帖子下载爬虫1.07 使用request模块后稳定多了
在1.06版本时,访问网页采用的时http.request,但调用次数多以后就问题来了. 寻找别的方案时看到了https://cnodejs.org/topic/53142ef833dbcb076d0 ...
- iOS 两个应用之间的切换
A 跳到B NSURL *urlT = [NSURL URLWithString:@"TestB://XXXXXXX"]; //注意“://”后面可以任意传参数.这些参数传过去后当 ...