Isaac-Sim OIGE - Collision Filters Error

The code for OIGE and the robot usd can be found at the end.

The Spot Robot clips through the ground plane, the collision filters seem to be making the robots filter the ground plane collision.

When I manually stoped the simulation and added an ground plane they seemed to collide. But that wouldnt work with the Terrain environment.
The terrain that is programatically added has a collision mesh that is being filtered by all robots in the “env”

I added a Spot robot, files can be found in

  • Tasks - &
  • robots - and
  • cfg task - Spot.yaml & SpotTerrain.yaml
  • cfg train - SpotPPO.yaml & SpotTerrainPPO.yaml


You can find my code on the dev tree:

Robot USD

Hi there, thanks for reporting the issue. The terrain prim path should be added to the collision_filter_global_paths list to enable collision. We can expose this variable to the task class so that it can be set directly from the task.

I imagine the problem might be that Spot has a much more complex collision mesh.

Below we can see that the code is adding the colliders properly. But for some reason it is not handling the more complex collision mesh of Spot. I fail to understand why.

Here are the Colliders for Anymal

Here are the Colliders for Spot

It is interesting that the terrain util creates a mesh with an outdate collider that kit seems to ignore. Maybe this issue is deeper.
I can create terrains with kit commands and they work fine. Just the terrains created with OIGE code that doesnt collide with the robots I import.
Duct tape solution is to use omni.kit.commands :

            stage = omni.usd.get_context().get_stage()
                position=Gf.Vec3f(0, 0, -50),

Inside of utils/terrain_utils/
I found at line 367 the add_terrain_to_stage method.
I played by addind different types of colliders with some success, my guess is that something changed on physx and it no longer works as supposed to. Need to figure out now how to wrap a high detailed collision mesh and it should work.

def add_terrain_to_stage(stage, vertices, triangles, position=None, orientation=None):
    num_faces = triangles.shape[0]
    terrain_mesh = stage.DefinePrim("/World/terrain", "Mesh")

    terrain = XFormPrim(prim_path="/World/terrain",
    # Addind a simple Collider does not work
    # omni.kit.commands.execute('SetStaticCollider',
    #     path=Sdf.Path('/World/terrain'),
    #     approximationShape='none')

    collision_api = UsdPhysics.MeshCollisionAPI.Apply(terrain.prim)
    physx_collision_api = PhysxSchema.PhysxCollisionAPI.Apply(terrain.prim)