Hello!
I’m trying to troubleshoot a USD file I’m creating (specifically trying to figure out why the contact sensor attached is not reading any values even when the physics debugger is detecting contact) and I have noticed both PhysicsAPI and PhysXAPIs being applied to prims in USD files from the Omniverse Nucleus.
While there is some documentation here on the different API’s, I don’t see anything that specifies when to use a PhysicsAPI vs a PhysXAPI. For example, PhysicsRigidBodyAPI vs PhysxRigidBodyAPI.
Is this documented anywhere or are there any general principles for how to decide what API to apply?
Thanks!
Hi @jess7654 - The PhysicsAPI and PhysXAPI are both used in the Omniverse Nucleus, but they serve different purposes.
The PhysicsAPI is a general API that is used to define physics properties that are common to all physics engines. This includes properties like mass, friction, and restitution.
On the other hand, the PhysXAPI is specific to the PhysX physics engine. It is used to define properties that are specific to PhysX, like the PhysX material or the PhysX collision layer.
In general, you should use the PhysicsAPI for properties that are common to all physics engines, and the PhysXAPI for properties that are specific to PhysX. If you’re not sure which one to use, it’s usually safe to start with the PhysicsAPI, and then switch to the PhysXAPI if you need to access PhysX-specific features.
As for the contact sensor not reading any values, it could be due to a number of reasons. It could be that the contact sensor is not properly attached to the rigid body, or that the rigid body is not interacting with other bodies as expected. It could also be a bug in the physics engine or the contact sensor implementation. It would be helpful to have more information about your setup to diagnose the issue.
Here is the .usda file for the robot I am trying to use the contact sensor with:
Arm_with_Two_Fingers_Manual_SDF_Clean_Manual_Just_Robot_Edit_To_Match_Ant_ToF_Contact_Sensor.usda (51.3 KB)
Please let me know if any other information would be helpful!
Also, is there a way to see the contact sensor values from the Isaac Sim GUI application? Right now I have to write and run from a Python script in order to troubleshoot the contact sensor readings.
Someone from our team will review the file and provide you the solution.
1 Like
Hello,
Has there been any progress on a solution?
Hi,
Just following up on this.
Developers are currently busy with the upcoming release. Meanwhile, did you get a chance to review the doc for contact sensor? Contact Sensor — isaacsim latest documentation