How to reproduce the manipulator motion controlled by IK(DLS)?

Typically: "How do I... ", "How can I... " questions
Post Reply
zhangm365
Posts: 46
Joined: 19 Jun 2021, 12:58

How to reproduce the manipulator motion controlled by IK(DLS)?

Post by zhangm365 »

HELLO, admin

I am reproducing the manipulator motion controlled by the haptic device (Touch) through IK.cals(DLS) method in lastest software(V4.2), which is different from the previous version, but the result is not well.

The main problem is whether the script code in the scene is correct?

Can you give me a hand?

There are my scenes and scripts:
https://vrep.oss-cn-shenzhen.aliyuncs.c ... E3NmNlMzJm

Best wishes.

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

Re: How to reproduce the manipulator motion controlled by IK(DLS)?

Post by coppelia »

Hello,

not sure how you built up your IK task: there are two ways of doing this: implicitly and explicitly. You are mixing both approaches. We recommend doing it implicitly, which all demo scenes use. e.g.:

Code: Select all

-- in init:
ikEnv=simIK.createEnvironment()
-- Prepare the ik group, using the convenience function 'simIK.addIkElementFromScene':
ikGroup=simIK.createIkGroup(ikEnv)
local ikElement=simIK.addIkElementFromScene(ikEnv,ikGroup,simBase,simTip,simTarget,simIK.constraint_x+simIK.constraint_y)

--in actuation:
simIK.applyIkEnvironmentToScene(ikEnv,ikGroup)
see e.g. demo scene scenes/kinematics/singleIkGroupWithSingleIkElement-damped.ttt for instance.

Cheers

Post Reply