Creating a collision shape and having a ROS Topic for collision detection

I have a mobile robot spawned in Isaac Sim, and I have a couple of questions regarding collisions as follows.

  1. If I have understood it correctly, irrespective of my robot shape, I can make proxy shapes just for collision. I have a rather complicated and intricate robot, and I think it will be beneficial if I could have a simple collision structure since it simplifies the collision solver and greatly improves performance. I’m not clear on how to do this though.

  2. Right now I have 3 ROS interfaces with my robot. One is the ROS Differential base, one is the ROS Lidar and one is the ROS Camera. In addition to these, my intention is to have a ROS Topic which continuously publishes the message whether the robot has collided or not. The first thing is, how do I detect a collision in Isaac Sim. And once that is detected, how do I create and send the message to a ROS Topic for the same?

Thanks in advance for your help!

The basic structure can be:
XForm prim with RigidBodyAPI + MassAPI on it

  • Any number of mesh prims that act as visual meshes
  • Any number of mesh prims with CollisionAPI attached, set its visibility to hide it

once you have a prim, you can add the specific API in the property menu from the +Add button

See the full physics documentation here: Physics Core — Omniverse Create documentation

Second question:

Thanks for your reply!
So if I have the visual meshes, and the collision meshes, which are just a very rough model approximation of the visual meshes, the robot will appear as if in the visual meshes, but it will collide as if the body is just the rough shapes colliding?
And as for the second question, I’m a bit confused as to what inside the isaac-sim package means in this case. I’m running the Isaac Sim through an AWS instance. If I run this inside the container, doesn’t that mean that every time the container is restarted, I have to manually run this script again?
Once again, thanks for your help!

Right, you can hide the collision meshes so they don’t show up visually and only the visual meshes are visible.

Correct, you would run this inside of the container. You can specify a different entry point for the docker container on startup that would point to your own startup script if you wanted it to do custom things or automatically run a specific simulation.

You can also add the script to the container and create a checkpoint to make it persistent.

I have a robot, and I tried creating a proxy cuboid collision shape. I first create a cube mesh, put it under the robot’s chassis prim. I then clicked add physics and I selected rigid body and collider. I then made sure the wheel joints had the parent body as the cube now instead of the original robot(if I didn’t do this, the robot didn’t move). I then made the cube invisible. However, the problem that I now get is the wheel and the cube move away together, leaving the robot behidn. I have attached the video of this. I’m a bit confused if I’m on the right track. Please help.

The structure of the robot is as follows:
Chassis prim inside which are the 2 wheel joints and the proxy collision cube
Left wheel prim
Right wheel prim
Now initially I defined each of the 3 prims individually as rigid bodies. But now as you can see in the video, only the 2 wheels and the cube are pink. I’m not able to define the whole chassis prim as a rigid body anymore. This happened after I added the cube. What should I do to correct this?
I referred to Physics Core — Omniverse Create documentation but I found it a bit difficult to interpret.
I would like to personally send you the .usd file if that’s okay with you.

You should only need to apply collider to the collision shape as its under a parent with rigid body applied already. Does that make a difference?

So I already had a robot with the chassis prim, left wheel and right wheel defined as rigid bodies.
Then I created a mesh, resized it, dragged it and dropped it under the chassis prim. Then I defined the mesh as a collider. The odd part is that when I did this, the rigid body(chassis) does not seem to be a rigid body anymore. I right click and try to add it as a rigid body again, but it just doesn’t happen.