Question about sim.setJointTargetPosition vs. sim.setJointPosition

Typically: "How do I... ", "How can I... " questions
Post Reply
Lnferior
Posts: 23
Joined: 20 Jul 2022, 17:49

Question about sim.setJointTargetPosition vs. sim.setJointPosition

Post 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

fferri
Posts: 1233
Joined: 09 Sep 2013, 19:28

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

Post by fferri »

Wether you can directly set the joint position or not depends in which joint mode and control mode the joint is.

Post Reply