need help with sim.generateikpath

Typically: "How do I... ", "How can I... " questions
Post Reply
georgeyhere
Posts: 3
Joined: 01 Apr 2021, 00:56

need help with sim.generateikpath

Post 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

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

Re: need help with sim.generateikpath

Post 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

georgeyhere
Posts: 3
Joined: 01 Apr 2021, 00:56

Re: need help with sim.generateikpath

Post 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

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

Re: need help with sim.generateikpath

Post 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

Post Reply