# Add missing collision approximation option for python omni.physx.scripts.utils.setCollider

**URL:** <https://forums.developer.nvidia.com/t/add-missing-collision-approximation-option-for-python-omni-physx-scripts-utils-setcollider/250479>\
**Category:** Isaac Sim\
**Tags:** collision, physx\
**Created:** [April 19, 2023, 10:45am UTC](https://forums.developer.nvidia.com/t/add-missing-collision-approximation-option-for-python-omni-physx-scripts-utils-setcollider/250479 "2023-04-19T10:45:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristjan.laht](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kristjan.laht](https://forums.developer.nvidia.com/u/kristjan.laht)\
**Post date:** [April 19, 2023, 10:45am UTC](https://forums.developer.nvidia.com/t/add-missing-collision-approximation-option-for-python-omni-physx-scripts-utils-setcollider/250479/1 "2023-04-19T10:45:01Z")

</div>

Hello,

I’m using issac sim 2022.2.0-rc.15 with kit SDK 104.1 and client library 2.21.2  
In the Isaac sim GUI physics collider approximation has these options: Triangle Mesh, Convex Decomposition, Convex Hull, Bounding Sphere, Bounding Cube, Mesh Simplification and SDF Mesh.

While when using the python function omni.physx.scripts.utils.setCollider, the mapping for possible meshApproximations is defined as:

```python
    meshApproximations = {
        "none": PhysxSchema.PhysxTriangleMeshCollisionAPI,
        "convexHull": PhysxSchema.PhysxConvexHullCollisionAPI,
        "convexDecomposition": PhysxSchema.PhysxConvexDecompositionCollisionAPI,
        "meshSimplification": PhysxSchema.PhysxTriangleMeshSimplificationCollisionAPI,
        "convexMeshSimplification": PhysxSchema.PhysxTriangleMeshSimplificationCollisionAPI,
        "boundingCube": None,
        "boundingSphere": None,
    }

```

The option I’m interested in, `SDF Mesh`, is missing. A small one line addition to the dictionary seems to work:

```python
    meshApproximations = {
        "none": PhysxSchema.PhysxTriangleMeshCollisionAPI,
        "convexHull": PhysxSchema.PhysxConvexHullCollisionAPI,
        "convexDecomposition": PhysxSchema.PhysxConvexDecompositionCollisionAPI,
        "meshSimplification": PhysxSchema.PhysxTriangleMeshSimplificationCollisionAPI,
        "convexMeshSimplification": PhysxSchema.PhysxTriangleMeshSimplificationCollisionAPI,
        "boundingCube": None,
        "boundingSphere": None,
        "sdfMesh": PhysxSchema.PhysxSDFMeshCollisionAPI,
    }

```

I would have created a PR, but couldn’t find the extension source on github/anywhere. (that means also couldn’t check if it’s actually fixed on master or something). Hopefully someone from Nvidia can pick up the change.

---

<div class="post-metadata">

**Author:** ![AlesBorovicka](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/alesborovicka/32/21824_2.png) [@AlesBorovicka](https://forums.developer.nvidia.com/u/AlesBorovicka)\
**Post date:** [April 20, 2023, 7:53am UTC](https://forums.developer.nvidia.com/t/add-missing-collision-approximation-option-for-python-omni-physx-scripts-utils-setcollider/250479/2 "2023-04-20T07:53:07Z")

</div>

That looks like an oversight when we added the new approximation type, will fill in a Jira ticket internally and fix it for next release. Thanks for reporting!

---

<div class="post-metadata">

**Author:** ![mhapala](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mhapala/32/54431_2.png) [@mhapala](https://forums.developer.nvidia.com/u/mhapala)\
**Post date:** [April 24, 2023, 8:55pm UTC](https://forums.developer.nvidia.com/t/add-missing-collision-approximation-option-for-python-omni-physx-scripts-utils-setcollider/250479/3 "2023-04-24T20:55:34Z")

</div>

Thanks for the catch @kristjan.laht! I’ve submitted a fix a few days ago which will eventually get to a public build :) I used “sdf” as the identification string, since it was actually already implemented as such in other places and I missed this method (so a part of the fix was creating a centralized dictionary of the identifiers which is now used from different extensions so this oversight should not happen again should we add more approximations in the future…). Thanks again for reporting this!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [May 8, 2023, 8:55pm UTC](https://forums.developer.nvidia.com/t/add-missing-collision-approximation-option-for-python-omni-physx-scripts-utils-setcollider/250479/4 "2023-05-08T20:55:35Z")

</div>

Closed on May 8, 2023, 8:55pm UTC

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