PxJointAngularLimitPair invalid limit equivalence?

The issue I am seeing is in version 3.3.4 but looking at the documentation for 3.4 it looks like it’s probably still applicable.

I have configured a PXD6Joint which is locked in all axes except twist and is limited in the twist axis. I would like my joint to be able to twist from 0.8 radians to 3.6 radians. According to the documentation for PxJointAngularLimitPair my limits can go all the way from -2pi to 2pi but my lower must be less than my upper so I set lower=0.8 and upper=3.6. This works perfectly at the lower limit but as I rotate towards the upper limit my system explodes when my twist angle hits exactly pi. I haven’t totally stripped down my system to the simplest possible case but I believe I’ve removed all joints connecting the two actors except my twist joint.

Next I observe that 0.8 radians is the same angle as -5.5 radians and 3.6 radians is the same as -2.7 radians so I change my limits to lower=-5.5 and upper=-2.7. This still satisfies the -2pi to 2pi range and lower is still less than upper. As far as I can see this should give the exact same behavior as before but this setup explodes immediately.

My question then are:

  • Is there a difference in expected behavior when setting up a twist joint with lower=L and upper=U vs lower=L-2pi and upper=U-2pi provided L, U, L-2pi and U-pi are all in the range [-2pi, 2pi]?
  • Are there further undocumented requirements on the values provided to PxJointAngularLimitPair?
  • Is my joint expected to go crazy in this way when transitioning twist from pi to -pi?

The documentation is incorrect here - the limits must be specified in range (-Pi,Pi) rathber than the documented limits.

Releases > 3.4 will support the (-2Pi,2Pi) range but if you are on 3.4 or earlier then the supported range is actually (-Pi,Pi)

Thanks for your reply. That’s very useful to know.

So how would I express that I would like my joint to range from 0.8 to 3.6? Should I set the limits to Lower=0.8, Upper=-2.6? Is the bit about the lower being required to be less than the upper accurate?

If not then presumably I should adjust the local constraint frames such that the twist range is easier to work with?

thanks again

Yes, you will need to adjust the local frames so that your min and max sit inside the range (-Pi,Pi).

Cheers,

Gordon

great. I can do that. Thanks for the assistance Gordon.