sim.computeJacobian() is returning -1

Typically: "How do I... ", "How can I... " questions
Post Reply
johnrowlay
Posts: 21
Joined: 09 Aug 2017, 18:52

sim.computeJacobian() is returning -1

Post by johnrowlay » 13 Feb 2019, 16:24

I am having trouble retrieving the Jacobian using the regular API.

So, I have created a new scene, and then imported the Sawyer robot. Then, I created an IK group using the calculation modules, with a tip and a target, and explicit handling not checked. Then, I added a child script for the Sawyer robot, and edited the actuation code as follows:

Code: Select all

function sysCall_actuation()
    print('Actuation ...')
    ik_group_handle = sim.getIkGroupHandle('Sawyer_IK_group')
    print('handle:')
    print(ik_group_handle)
    result = sim.computeJacobian(ik_group_handle, 0)
    print('result:')
    print(result)
    jacobian = sim.getIkGroupMatrix(ik_group_handle, 0)
    print('jacobian:')
    print(jacobian)
    print('... Done')
end
This prints out the following:

Code: Select all

Actuation ...
handle:
2030003
result:
-1
jacobian:

... Done
So what I am finding, is that "sim.computeJacobian()" is returning -1, which is an error. And subsequently, the Jacobian is empty.

What do I need to change?

Post Reply