We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d43b3df commit a930335Copy full SHA for a930335
vmas/simulator/core.py
@@ -2321,8 +2321,13 @@ def _get_constraint_forces(
2321
2322
# softmax penetration
2323
k = self._contact_margin
2324
- penetration = (((dist_min - dist) * sign / k).exp() + 1.0).log() * k
2325
-
+ penetration = (
+ torch.logaddexp(
2326
+ torch.tensor(0.0, dtype=torch.float32, device=self.device),
2327
+ (dist_min - dist) * sign / k,
2328
+ )
2329
+ * k
2330
2331
force = (
2332
sign
2333
* force_multiplier
0 commit comments