Page 1 of 1

need help with sim.generateikpath

Posted: 25 Apr 2021, 20:45
by georgeyhere
I'm working on a 4-dof manipulator and I'm trying to use sim.generateIkPath to perform a short linear motion to a dummy, but it keeps returning a singular value instead of a table of configurations.

print(path) returns '0.015674195407679' .

All joints are in torque/force mode, path planning via OMPL works, just not sim.generateIkPath. Any help would be really appreciated!

https://drive.google.com/file/d/1KyByzs ... sp=sharing

Re: need help with sim.generateikpath

Posted: 28 Apr 2021, 14:29
by coppelia
Hello,

the function doesn't return that, since it is never called. You are printing velCorrectionFactor.
We recommend to move to CoppeliaSim V4.2.0+, then you will be able to handle all kinematic tasks programmatically and you'll be much more flexible. Also, all IK functions will then be grouped under the simIK namespace.

Cheers

Re: need help with sim.generateikpath

Posted: 07 May 2021, 19:37
by georgeyhere
I updated to version 4.20, and am attempting to use simIK.generatePath now. It returns an error that traces back to simIK.lua:

Here's the full error:

Code: Select all

[Bob@childScript:error] 369: Invalid joint handle: 43 (in function 'simIK.getJointPosition@simExtIK')
    stack traceback:
        [C]: in function 'simIK.getJointPosition'
        ...gram Files/CoppeliaRobotics/CoppeliaSimEdu/lua/simIK.lua:369: in function 'simIK.generatePath'
        [string "Bob@childScript"]:187: in function 'moveIK'
        [string "Bob@childScript"]:82: in function 'coroutineMain'
    stack traceback:
        [C]: in function 'error'
        [string "Bob@childScript"]:9: in function 'sysCall_actuation'
OMPL functions still work fine, sim.generateIkPath works inconsistently, simIK.generatePath has not worked.

Updated Scene:
https://drive.google.com/file/d/1iT5wUY ... sp=sharing

Re: need help with sim.generateikpath

Posted: 11 May 2021, 13:16
by coppelia
Check your input arguments. Instead of using jointHandles, use ikJoints when calling simIK.generatePath. The first are the handles of the joints in the scene, the second are the corresponding handles inside the IK environment.

Cheers