Get_intensity_data() only return 255 or 0 in ultrasonic sensor

Isaac Sim Version

4.2.0

Operating System

Ubuntu 24.04

Hi. I am trying to use ultrasonic sensor and I simply create one emiter, one firing group setting that emitter to be both emitting and recevivng, and one firing array with use_brdf = true. See below implementation:

    emitter_pose = ((180, 0, 0), self._sensor_location)
    adjacency = [0] result, emitter_prim = omni.kit.commands.execute(
        "RangeSensorCreateUltrasonicEmitter",
        path=robot_prim_path + "/UltrasonicEmitter",
        per_ray_intensity=1.0,
        yaw_offset = 0.0,
        adjacency_list = adjacency
    )
    result, group = omni.kit.commands.execute(
        "RangeSensorCreateUltrasonicFiringGroup",
        path="/World/UltrasonicFiringGroup",
        emitter_modes=[(0,1)],
        receiver_modes=[(0,1)],
    )
 self._ultrasonic_path = "/World/UltrasonicArray"
    result, self.ultrasonic = omni.kit.commands.execute(
        "RangeSensorCreateUltrasonicArray",
        path=self._ultrasonic_path,
        # Min and max range for the ULTRASONIC.  This defines the starting and stopping locations for the linetrace
        min_range=1,
        max_range=4.5,
        # These attributes affect drawing the ultrasonic in the viewport.  High Level Of Detail (HighLod) = True will draw
        # all rays.  If false it will only draw horizontal rays.  Draw Ultrasonic Points = True will draw the actual
        # ULTRASONIC rays in the viewport.
        draw_points=False,
        draw_lines=True,
        # Horizontal and vertical resolution in degrees.  Rays will be fired on the bin boundries defined by the
        # resolution.  If your FOV is 45 degrees and your resolution is 15 degrees, you will get rays at
        # 0, 15, 30, and 45 degrees.
        horizontal_fov=90.0,  # set wedge vertical extent in degrees
        vertical_fov=15.0,  # set wedge horizontal extent in degrees
        horizontal_resolution=0.9,
        vertical_resolution=0.25,
        num_bins=30, # number of bins that the emiiters output (numBins divides minRange to maxRange distance.)
        use_brdf = True,
        use_uss_materials = False,
        emitter_prims=[emitter_path],
        firing_group_prims=[group.GetPath()],
        
    ) 

However, when I use get_intensity_data() to retrieve the ray intensity of each ray cast. I am getting only 255 upon hitting and 0 for non hitting. I am expecting some value to be between 0 and 255.

Is this a bug? Can you share the source code for implementing this sensor?

I am attempting to develop an ultrasonic sensor that is able to return intensities based on hitting normals:

I tried to use omni.kit.raycast.query

Basically, it’s an RTX ray cast function in python wrapper, if I understand correctly.

But isaac sim 4.2 crashes whenever I call raycast_interface.add_raycast_sequence() after I added rays:

for i in range(self.numRays):
ray = omni.kit.raycast.query.Ray(origin=self.origins[i,:],
direction=self.unit_vec[i,:],
min_t=self.min_range,
max_t=self.max_range,)
raycast_interface.add_raycast_sequence() # This line will crash my isaac sim.

Please, I don’t know if there are other ways to do ray cast/query in isaac sim.

I saw PhyX has ray query function but I am assuming it’s not accelerated by GPU.

All I want are querying the hitting normals, hitting positions, and distance.

Thanks in advance.