When I set up IK for a robot and later on I move the target from external python script and read the torques on joints using sim.getJointForce(), after plotting them it seems to have two different signals in it for each. The line looks like a noise on first glance, but it is because the two sinusoid-like signals overlap and the final line jumps between them. My knowledge of the mechanics isn't deep, but although the torque compensates the gravity and in addition it tries to move the joint to the desired position, I would expect for the signal to still be just one line and not oscilating between the pair.https://imgur.com/a/KzDriue
My question is, whether this behaviour is correct, what those two signals mean and whether it can be read separately using some other commands.
sim.getJointForce() in IK mode returns two signals
Re: sim.getJointForce() in IK mode returns two signals
Hello,
if you are using internal controllers for e.g. position or velocity control of a joint, you won't obtain meaningful forces/torques for that joint. Instead, you should use an inverse dynamics controller: have a look at the demo scene scenes/inverseDynamics.ttt
Cheers
if you are using internal controllers for e.g. position or velocity control of a joint, you won't obtain meaningful forces/torques for that joint. Instead, you should use an inverse dynamics controller: have a look at the demo scene scenes/inverseDynamics.ttt
Cheers