Page 1 of 1

Question about sim.setJointTargetPosition vs. sim.setJointPosition

Posted: 25 Apr 2024, 05:05
by Lnferior
I'm doing joint angle control in my script via these two function commands, and I'm finding that sim.setJointPosition doesn't achieve the movement I want, while sim.setJointTargetPosition does. And according to the definition of the function to come, my understanding is that setJointPosition can be set directly to the desired target position, is my understanding wrong, or the function itself has a bug? The following is the effect of the implementation when I use the two functions for testing.
I hope you can give me an answer, thank you very much.

Image
Image

Re: Question about sim.setJointTargetPosition vs. sim.setJointPosition

Posted: 25 Apr 2024, 08:00
by fferri
Wether you can directly set the joint position or not depends in which joint mode and control mode the joint is.