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学习笔记:机器人逆运动学解算

V-rep学习笔记:Geometric Constraint Solver(几何约束求解)

V-rep学习笔记:并联机构正逆运动学的更多相关文章

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

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

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

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

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

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

  4. V-rep学习笔记:机器人逆运动学数值解法(The Jacobian Transpose Method)

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

  5. 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 ...

  6. python 学习笔记 10 -- 正則表達式

    零.引言 在<Dive into Python>(深入python)中,第七章介绍正則表達式,开篇非常好的引出了正則表達式,以下借用一下:我们都知道python中字符串也有比較简单的方法, ...

  7. shell脚本学习笔记 (正則表達式)

    正則表達式一般有三个部分组成,他们各自是:字符类,数量限定符,位置限定符. 规定一些特殊语法表示字符类.数 量限定符和位置关系,然后用这些特殊语法和普通字符一起表示一个模式,这就是正則表達式(Regu ...

  8. C#学习笔记---协变和逆变

    http://www.cnblogs.com/alphafly/p/4048608.html 协变是指方法能从委托的返回类型派生的一个类型. 逆变之方法获取的参数可以是委托参数类型的基类.

  9. V-rep学习笔记:Geometric Constraint Solver(几何约束求解)

    The geometric constraint solver is slower and less precise at solving kinematic problems, but might ...

随机推荐

  1. 京东的Netty实践,京麦TCP网关长连接容器架构

    背景 早期京麦搭建 HTTP 和 TCP 长连接功能主要用于消息通知的推送,并未应用于 API 网关.随着逐步对 NIO 的深入学习和对 Netty 框架的了解,以及对系统通信稳定能力越来越高的要求, ...

  2. 解决在非Activity中使用startActivity

    错误提示信息: Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an ...

  3. asp.net网站发布

    1.iis里面新建一个网站,目录可以新建(例如:F:\dotNetWeb),还可以创建子文件夹如:F:\dotNetWeb\my,网站路径是可以自己设置的,也可以使用IIS默认的网站. 2.vs201 ...

  4. 以相声之名说android四大对象

    当里个当,当里个当,Android此系统,易用有好用.谁为其奉献,只靠四巨头. 当里个当,当里个当,老大唤activity,界面缔造者.清水出芙蓉,天然来雕饰. 当里个当,当里个当,你若明白他,周期咋 ...

  5. 【ElasticSearch】ElasticSearch-SQL插件

    ElasticSearch-SQL插件 image2017-10-27_11-10-53.png (1067×738) elastic SQL_百度搜索 Druid SQL 解析器的解析过程 - be ...

  6. 文本分类(六):使用fastText对文本进行分类--小插曲

    http://blog.csdn.net/lxg0807/article/details/52960072 环境说明:python2.7.linux 自己打自己脸,目前官方的包只能在linux,mac ...

  7. Kafka:ZK+Kafka+Spark Streaming集群环境搭建(八)安装zookeeper-3.4.12

    如何搭建配置centos虚拟机请参考<Kafka:ZK+Kafka+Spark Streaming集群环境搭建(一)VMW安装四台CentOS,并实现本机与它们能交互,虚拟机内部实现可以上网.& ...

  8. Cognos11第三方权限认证之OpenDJ

      一.安装OpenDJ 安装java环境,配置OPENDJ_JAVA_HOME环境变量指向java,然后傻瓜安装,出现下面的界面则说明安装成功 注意安装的过程中会指定管理用户cn的密码,默认的cn是 ...

  9. 一个ActiveX control的创建过程

    创建 根据这篇文章的介绍:http://www.cnblogs.com/time-is-life/p/6354152.html 来创建,里面包含了创建的基本过程以及属性事件方法的使用. 使用: 参考文 ...

  10. HTTPS证书撤销

    如果浏览器信息被拦截,可以选择清洗掉之前的证书 关闭浏览器,在CMD中输入命令 certutil -urlcache * certutil -urlcache * delete certutil -u ...