1.5 VREP之仿生机器人

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lwz45698752/article/details/84678622

说明

本章只是看tutorial的一些要点记录,比较零碎,仅作个人笔记之用,有所叨扰,敬请原谅!

记录

  • shift+select可对场景中物体进行框式选择
  • 三角形编辑模式式为了便于观察,可切换PAGE SELECTOR
  • 提取形状,添加关节,位置修改,根据关节朝向与世界坐标系的关系,姿态修改,即

All joints are in position now, however, only the first added joint has the correct orientation. Select the two last added joints, then enter (-90,0,0) for the Alpha, Beta and Gamma items in the orientation dialog, on the orientation tab, then click the Apply to selection button.

  • 设置初始关节值,使得机器人水平伸展时所有关节值为0.

Now let’s set the initial joint values so that when the leg is horizontally stretched, all joint values are zero: in the joint dialog, item Position, set -30 and +120 for “hexa_joint2” and “hexa_joint3”

  • 想要控制机器人关节处于逆运动模式,并且希望逆运动学结果能作为动态位置控制值被使用,所以set the joints in inverse kinematics mode

In our case we want to be able to control those joints in inverse kinematics mode, but we also want the inverse kinematics results to be applied as dynamics position control values. To do this, we will set the joints in inverse kinematics mode

  • 作如上设置后要为机器人指定逆运动学任务(defined an inverse kinematics task for our kinematic chain representing the leg)

  • Hybrid operation表示逆运动学结果将作为动态目标值被应用到关节上(?)
    activate the Hybrid operation for that joint (this tells V-REP that the inverse kinematics calculation results will be applied to the joint as dynamic target value

defined an inverse kinematics task

添加dummy,并将其放在机器人leg的tip处,接着在层次树中拖拽到与其相连的连杆上,此命名为hexa_footTip,再复制粘贴一份,命名为hexa_footTarget,接着让这两个dummy成为逆运动解析的tip-target对,具体参照运动学模块内容,最后要将target和基座绑定

控制脚本

  • 控制方式:先产生一条腿的运动方式,然后将其应用到所有的六条腿,但每条腿有不同的delay
  • 实现:一个child script来产生一条腿的移动方式,然后用六个child scripts来将这种运动方式以delay的形式应用到六条腿上,选中关节,然后绑定脚本,即 [Menu bar --> Add --> Associated child script --> Non threaded]

We will control the hexapod robot by generating the movement for one leg, and applying it in a delayed way for all 6 legs, where each leg will have a different delay. We implement this by having one child script generating the movement sequence for one leg, and having 6 additional child scripts applying that movement sequence in a delayed manner. Select “hexa_joint1” and click [Menu bar --> Add --> Associated child script --> Non threaded]. We just attached a child script to the “hexa_joint1” object.


add a new dummy to the scene and rename it “hexa_base”. Also send it to the visibility layer 11. Then make it child of “hexapod”. “hexa_base” represents the position of our hexapod robot, that we selected to be (0;0;0)

Tips

disable动力学的方法:open the general dynamics properties dialog, then unchecking Dynamics enabled

猜你喜欢

转载自blog.csdn.net/lwz45698752/article/details/84678622
1.5