Now I want to give a few tipps on how to debug things in IsaacSim. IsaacSim can be pretty difficult to get into, so here are a few of the things that I learned that were not clear for me:
- OpenUSD Documentation is your friend.
- IsaacSim is built on top of USD, so I preferably work with USD directly.
- USD applies APIs to its objects (Prims) to give them certain behavior. These APIs are for example
PhysicsRigidBodyAPIorPhysicsMeshCollisionAPI. The former allows an object to 'be driven by the simulation' [OpenUsd#UsdPhysicsRigidBodyAPI] and the latter 'control[s] how a Mesh is made into a collider' [OpenUsd#UsdPhysicsMeschCollisionAPI].- These APIs have attributes such as
Rigid Body EnabledorKinematic Enabled. Do not try to set these atributes usingGetAttribute(...)orCreateAttribute(...)functions. This will generate 'user-defined' attributes, which will be ignored by the simulation. Instead, look up the API you want to use in the USD documentation. E.g.PhysicsRigidBodyAPIwill have functions likeGetRigidBodyEnabledAttr()andGetKinematicEnabledAttr()[OpenUsd#UsdPhysicsRigidBodyAPI] to get the Prim holding the attribute. To set a new value, you can call e.g.GetRigidBodyEnabledAttr().Set(...)on the Prim with the new value.- Use the
.usdafile format for exporting and debugging. USDA is a human readable file format, allowing you to debug your programm by e.g. checking if all the assets have been imported and if the correct APIs and Attributes have been applied.- If something seems out of place, save the scene as
.usdausing the IsaacSim GUI. Open the.usdain your text editor and compare it with the.usdayou are trying to import or with the APIs and attributes you are trying to set. Watch out for unexpected prefixes. These can be indicators that something is wrong with your program.