Strong differences behavior CPU / GPU gear joints

Hello,

I’m reporting here DRAMATIC differences which I have found whlie working with simualtion and gear joints, betweeb gpu and cpu simulation. Basically I work with a robot with 8 gear joints (with gear ratio -1) and a loop joint also.

I have tried to just send a sinusoid as targets to the gear joints and look at the average difference between the positions of each pair of joints. I have tried several setups:

1/ without the gear option and sending opposite targets to each joints normally constrained by the gear ‘notgear’

2 / 3/ 4/ 5 : with the gear option is activated i tried 4 settings

  • setting gains at 0 (or not) of one of the two joints of each gear constraint (dggTrue / dgg False)
  • sending opposite targets to the two joints of each gear constraint, versus sending 0 (sctTrue / sct False).

I then tried both in gpu and cpu, which is 10 settings, for which I report the error in real positions measured in simulation. Anything > 0.02 reports strong gear errors.

_32_16_notgear_10_0.2_cpu_dggFalse_sctTrue 0.026357614
_32_16_gear_10_0.2_cpu_dggTrue_sctTrue 0.0055296985 –
_32_16_gear_10_0.2_cpu_dggTrue_sctFalse 0.0055296985 –
_32_16_gear_10_0.2_cpu_dggFalse_sctTrue 0.014545715
_32_16_gear_10_0.2_cpu_dggFalse_sctFalse 0.04246392

_32_16_notgear_10_0.2_gpu_dggFalse_sctTrue 0.024247162
_32_16_gear_10_0.2_gpu_dggTrue_sctTrue 0.081808455
_32_16_gear_10_0.2_gpu_dggTrue_sctFalse 0.081808455
_32_16_gear_10_0.2_gpu_dggFalse_sctTrue 0.021585925 –
_32_16_gear_10_0.2_gpu_dggFalse_sctFalse 0.06230142

What we oberseve is that in CPU, the “best” setting is to disable the gains of one of the two joints, and it doesn’t matter whereas you send opposite targets or 0 then. This seem like the most logical case, where the gear constraint actually does its jobs quite well.

In GPU however, this setting has MASSIVE ERRORS (0.08 is visually very big), however the best is to have BOTH joints in a gear constraint having gains and opposite targets sent to them.

The solver iterations values are 32/16

Conclusion : I do suspect there’s a BIG implementation issue of the Gear constraint in the GPU solver.

Regards

Hi @rochmollero ,

That does sound like an issue we should have a look into.

Would you be able to share a USD, plus ideally a Python script that we could use to reproduce the issue?

Thank you,
Philipp