Problem for contact sensor

Hi, I am trying to implement a contact sensor into my robot.

https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/omni.isaac.sensor/docs/index.html

The problem is, the get_sensor_readings only functions when we set the defaultPrim in our stage.

And, for some reason, when I set the defaultPrim, the error will pop pot due to the urdf file problem.

May I know if we can listen to the contact sensor without setting the defaultPrim? Thank you in advance!

Hi @berternats - The get_sensor_readings function is designed to work with the default prim in the stage. This is because the function needs to know which prim (or object) in the scene it should get the sensor readings from.

If you’re having trouble with setting the default prim due to a URDF file problem, it might be worth trying to resolve that issue first. The URDF file defines the structure and properties of the robot, and if there’s an error in the file, it could cause problems with the simulation.

However, if you want to listen to the contact sensor without setting the default prim, you might need to modify the get_sensor_readings function or create a new function that can get the sensor readings from a specified prim. This would involve accessing the sensor data directly from the physics engine, which might require a deeper understanding of the Omniverse physics API.

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