For the baxter_ik_demo.py, there is a minor issue with the accurateIK(bodyId, ....) function, numJoints = p.getNumJoints(baxterId) #line 109 it should be: numJoints = p.getNumJoints(bodyId) The code works, but not if the function is imported separately.