How to setup and use distance sensor?

I have read the documentation but can’t figure out how to use a simple distance sensor in python.

My USD robot contains an IMU and a GenericSensor. The IMU is easily controlled using the omni.isaac.sensor.IMUSensor class however I can’t find a similiar way to use the generic distance sensor.

Is there a similar way to use distance sensors?

After trying to make it work somehow, the solution I found for a simple distance sensor is to create an empty XForm where the sensor should be and using “ray_cast()” to cast a ray and get the distance to the object that intersected it.

Mind that ray_cast() calculates the distance from the origin on the X axis only.

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