Using MassAPI, Drive API and Articulation API through the Isaac Sim UI

Hi,
I’m importing a STEP file of my robot through the STEP importer feature in Isaac Sim and saving it as a USD. I want to add revolute joints at both wheels in order to make it move. However, when I compare the converted USD file to the other robot USDs I notice a difference(for example the presence of the Drive API, Articulation API). These are present in the joints of the pre-loaded example robots of Isaac Sim but are not present in the STEP imported robot that I have. How can I add these tabs through the Isaac Sim UI? I can only find documentation where Python code is being written to set these parameters. I want to add the whole APIs to my joints rather than set them by code. I’m unable to find NVIDIA documentation for this. Please point me to the documentation, or tell me how I’m supposed to go ahead with this. Thank you!

Hi @vivekvarma98

In this post there is a link (and a starting time indication) to a video in the documentation that will help you :)

Hi,
I followed the video which you linked, but I’m still unable to get my mobile robot’s wheels to move. I followed all the instructions:

  1. I defined my robot as a rigid body by defining all the prims as rigid bodies.
  2. I created an Articulation Robt in the main prim
  3. I created 2 revolute joints(one for each wheel), and I linked them to their body0 and body1 parts accurately.
  4. I defined the Joint Angular Drives.
    When I now press the play button, my robot bursts into a thousand pieces, and I have no idea why. I’m attaching the video file, could you please help me with the error? This is very frustrating.

Hi @vivekvarma98

If you define all prims as rigid bodies you will need to add fixed joints between the static ones… But as far as I know this is not the best approach…

Can you share here your .USD scene here?

1 Like

It’s a bit confidential, can I personally send it to you?

@vivekvarma98
You are on the right track, good progress so far!

What you need to do is instead of setting RigidBodyAPI for every single mesh/prim, is group Prims that move together together on a parent prim (e.g. /World/Main_body), and set RigidBodyAPI to that instead.

You can either add collision to all mesh prims as you have, or alternatively, define a basic shape as proxy render, and set collision to that. This will simplify your collision solver, and greatly improve performance,.

Please let me know if this helps.

Hi, thanks for the help! That is exactly what we did in the end! It works now! But I do have one question. How do you ensure that the chassis body and the tower on top of it remain together? I mean how do you ensure that the whole robot moves as a whole and the top part does not fall over or something? What setting do you use for this?

That’s precisely what grouping all mesh prim together on a parent prim does. When you add RigidBodyAPI to a prim, the engine understands that everything inside it should be treated as a single unit. (you could even have two pieces hovering instead of touching, and they will move as a unit, however that would not be very realistic ;)

For the physics engine, a rigid body and a collision body are two separate things. A rigid body applies the laws of physics to a body, making it subject to forces such as gravity, impulse, contact, etc).

A collision body tells the engine the shape of whatever you want to collide with.

You can have a static collision body (a prim that has Collision API but is not part of a Rigid body), or a Rigid body with zero to any number of collision bodies (every child prim of a rigid body that contains a collision API).

Hope this helps!

Hi, yes that helped a lot. So if I understand correctly, if I define 2 prims(not inside each other) as rigid bodies, they will be treated as SEPARATE rigid bodies. To group them together as one right body, they need to be under a common prim.
I didn’t quite understand what you meant by
"A collision body tells the engine the shape of whatever you want to collide with.

You can have a static collision body (a prim that has Collision API but is not part of a Rigid body), or a Rigid body with zero to any number of collision bodies (every child prim of a rigid body that contains a collision API)."

Say I have a room in which I want the robot to collide with the objects inside. This room comes as a mesh. If I define the room’s prim as a collider, the robot recognizes the mesh objects and collides with them, right? I think that is the static collision body that you’re talking about? What do you mean by a rigid body with zero to any number of collision bodies?

Correct, that’s how you’d make the room a static collision :)

You could have a rigid body (a body that is subject to forces in the environment) without any collision, but quite honestly they are not too exciting, as they will essentially be just ghosts moving around and slipping by. on the other hand, you can have multiple shapes inside a rigid body to determine its final collision shape (for example, add two blocks together to make a “T” shape)

and yes, what you stated is correct, if you define two prims that don’t share a common path, both with rigid body API, they will be treated as two separate bodies. if You put them under a same parent, and apply rigid body api to the parent, they should be treated as a single body and will never drift apart. One thing to be aware, though, is that when you set up a parent with the Rigid Body API, you can’t have the children with the API also, as that would cause an error in the parser, so remember to remove the Rigid Body API from the children when grouping them together on a parent with RB API.

Aah I think I understood that fully! Thank you so much for your help @toni.sm and @rgasoto!

@rgasoto 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.

You can check the sample assets, we have the proxy collision on many of them. One in particular you may want to see is the UR10 robot. it contains cylinders for collisions, in some links more than one.

All you need to do is create the Basic meshes through the Menu “Create → (Mesh or Shapes) → (mesh type)”, apply the Collision API to it, and then move it inside a prim with the Rigid body API applied to it so it can be used as the collision proxy.