DeepMimic icon indicating copy to clipboard operation
DeepMimic copied to clipboard

Something went wrong in HasJointLim() function

Open harrison84125 opened this issue 4 years ago • 3 comments

Hi Peng, As I used these function, it didn't return correct value. https://github.com/xbpeng/DeepMimic/blob/50bcc866b924fb425da7b492965c2d871fa82a8c/DeepMimicCore/sim/SimBodyJoint.cpp#L329-L335 https://github.com/xbpeng/DeepMimic/blob/50bcc866b924fb425da7b492965c2d871fa82a8c/DeepMimicCore/sim/SimJoint.cpp#L340-L346 I think it should be modified into these below:

	return (mParams.mLimLow[0] <= mParams.mLimHigh[0]
			|| mParams.mLimLow[1] <= mParams.mLimHigh[1]
			|| mParams.mLimLow[2] <= mParams.mLimHigh[2]
			|| mParams.mLimLow[3] <= mParams.mLimHigh[3]);

I hope this can help someone use the same function.

harrison84125 avatar Jan 26 '21 08:01 harrison84125

ah, you are right. How did i miss that?! Thanks a lot for the fix! I'll check this in.

xbpeng avatar Jan 26 '21 17:01 xbpeng

For the sake of completeness, the same error is still present in 'SimJoint.cpp' (same method 'HasJointLim').

AGPX avatar Jun 27 '21 22:06 AGPX

Thanks a lot for pointing that out, should be fixed now.

xbpeng avatar Jun 28 '21 16:06 xbpeng