Default contact offset is 10cm?

Hi,

Just a question about the default value of contact offset: 0.1 (1,2). Based on the default Isaac sim units (3), this means that the metric used is meters, which means that the default contact offset is 10cm? Is that correct?

Its a bit more complicated that that, the default value when unauthored is -inf. Which means that the contact offset is computed based on the geometry size, the code looks like this:

            const PxVec3 extents = aabbLocalBounds.getDimensions();

            const PxReal g = physxScene->getScene()->getGravity().magnitude();
            const PxReal dt = 1.0f / physxScene->getTimeStepsPerSeconds();
            const PxReal dynamicLowerThreshold = 2.0f * dt * dt * PxMax(g, 1.0f); //Make sure the lower bound is not exacly zero in case of zero gravity

            const PxReal minContactOffset = extents.minElement() * 0.02f;
            contactOffset = fmaxf(dynamicLowerThreshold, minContactOffset);

            if (isfinite(desc.restOffset) && desc.restOffset > 0.0f)
                contactOffset += desc.restOffset;

            shape->setContactOffset(contactOffset);

If the value is authored, meaning its value says 0.1, then if you load it in a stage with meters or cm it will always be 0.1 unless you have units conversion tools active, like omni.metrics.assembler.physics, which when you drag and drop the asset into a stage will make sure the units are adjusted.

Ales

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.