I have created a very simple scene with a Sawyer robot, and introduced a tip-target setup with an IK calculation module. The target is 10cm away from the tip in each of the (x, y, z) directions, and has the same orientation as the tip. I then added a child script to the robot which calls the following in "sysCall_actuation()":
Code: Select all
number_of_points = 30
joint_handles = {}
for i=1,7,1 do
joint_handles[i] = sim.getObjectHandle('Sawyer_joint'..i)
end
ik_group_handle = sim.getIkGroupHandle('Sawyer_IK_group')
path = sim.generateIkPath(ik_group_handle, joint_handles, number_of_points)
if path == NULL then
print('Could not compute IK path')
else
print(path)
end
I have tried varying the following, but they all result in NULL being returned:
- the number of points specified for the path
- the desired angular and positional precisions in the IK group
- the IK calculation method, and max iterations
- the position of the target
Any advice?
A minimal version of my scene can be downloaded from here: https://ufile.io/q3h8w, and you can just press "Play" to see it printing out "Could not compute IK path".