API to check collision (self-collision)

Hi, I am importing my own URDF (mobile manipulator). But when I enable the self-collision option, my robot will lose control. Because of that, I didn’t check that option, causing its arm can “go through” the robot’s body.

I wonder if we have an API to check this kind of collision in Python?

Thank you.

You can run the overlap_shape function to detect the collision.
Please open Window->Simulation->Physics->Demos and run the OverlapShape demo. If you open the script file you can see the usage:

        path_tuple = PhysicsSchemaTools.encodeSdfPath(Sdf.Path(self._cone_path))
        numHits = get_physx_scene_query_interface().overlap_shape(path_tuple[0], path_tuple[1], self.report_hit, False)            


1 Like

Thank you, but I think I don’t have that option. I am using the latest version of Isaac Sim (see the first picture).

There is an option called “Demos” in Isaac Examples but no OverlapShape demo (see the second picture).

You should have it, on the screen below - Physics Demo Scenes thats the right tab, there search for overlap and it will give you the demo.

Oh. I found it! Thank you so much.
And, I tried it, and it is working.

However, I have one more question:
Would it be possible if I can treat multiple meshes as a shape?
In the program, the API seems only can handle one mesh.

For example (see Figure below), I want to check collision for the whole robot body EXPECT the gripper. Is that possible?

Thank you.

No right now this takes only one mesh, however in next release we will expose this through OmniGraph where you can specify any bundle of meshes.

But for now you would have to pass one mesh after another.


Alright, thank you so much!

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