Retrieving replicator value

@ahaidu makes sense, I didnt notice that.

The logic is set up and everything should work as expected but now I am dealling with another Issue where the triggered collisions are not always detected.

because of this issue, I think its best to use get_physx_scene_query_interface().overlap_box.

This is my code:

     def is_overlapping(self, prim):
        # get extent of the object from the bounding box
        cache = bounds_utils.create_bbox_cache(time=timeline.get_current_time())
        mesh_paths = AssetsHelper.get_prim_meshes_paths(prim)

        overlapping = False

        for _mesh_path in mesh_paths:
            bounds = bounds_utils.compute_combined_aabb(cache, prim_paths=[_mesh_path])
            usd_bounds = Gf.Range3d((bounds[0], bounds[1], bounds[2]),  # min
                            (bounds[3], bounds[4], bounds[5])) # max
            _extent = usd_bounds.GetSize()   
            extent = carb.Float3(_extent[0], _extent[1], _extent[2])

            mesh_prim = self.stage.GetPrimAtPath(_mesh_path)

            global_position, global_rotation, _ = Utils.get_global_transform_xform(mesh_prim)
            #get origin from the object's global position
            origin = carb.Float3(global_position[0], global_position[1], global_position[2])
            # get rotation from the object's global rotation
            quaternion = Utils.euler_to_quaternion(global_rotation[0], global_rotation[1], global_rotation[2])
            rotation = carb.Float4(quaternion[0], quaternion[1], quaternion[2], quaternion[3])
            # physX query to detect number of hits for a cubic region

            #carb.log_warn(f"Checking for overlap for {prim.GetName()}. Origin: {origin}, Rotation: {rotation}, Extent: {extent}")
            numHits = get_physx_scene_query_interface().overlap_box(extent, origin, rotation, self.report_hit, False)

            if numHits > 0:
               # carb.log_warn(f"Object {prim.GetName()} is overlapping with {numHits} objects")
                overlapping = True

        return overlapping

    def report_hit(self, hit):
        # When a collision is detected, the object color changes to red.
        hitColor = Vt.Vec3fArray([Gf.Vec3f(180.0 / 255.0, 16.0 / 255.0, 0.0)])
        usdGeom = UsdGeom.Mesh.Get(self.stage, hit.rigid_body)
        carb.log_warn(f"Object {hit} is overlapping with objects")
        return True

numHits is always one, and report_hit is always entered for every prim.
any Idea what could be wrong here? Utils is my own class and I know it works as expected since we’ve been using these function to record odometry and IMU of the robot for a few months.