I follow this code refer to Regular API reference (https://manual.coppeliarobotics.com/en/apiFunctions.htm):
Code: Select all
sim.setObjectPosition(int objectHandle, list position, int relativeToObjectHandle = sim.handle_world)
Code: Select all
sim.setObjectOrientation(Obj_handle, (0 * np.pi/180, -90 * np.pi/180, -33.999 * np.pi/180), sim.handle_world)
Exception: 44: in sim.setObjectOrientation: one of the function's argument type is not correct.
Later, I read some code in a project and change my code into:
Code: Select all
sim.setObjectOrientation(Obj_handle, -1, (0 * np.pi/180, -90 * np.pi/180, -33.999 * np.pi/180))
I wanna ask that why I got the error when I ran my code refer to Regular API reference.
And for the working code, It looks so different from the Regular API reference. Why does it work?
May I do something wrong here? I'm looking forward to hearing from you.
Thanks !!!