RTX Lidar in Headless mode: No data is being read

I am trying to scan a scene using the RTX Lidar in Isaac Sim headless mode. However, the data i am getting is empty. I am sure there is nothing wrong with the configuration of the lidar and the positions since i have run this code using an extension and got normal output data. I suspect the issue is an update frame issue.

I just need to understand how to pace the flow of the code to get data from the annotator:

for lidar in lidars:
        print(f"LIDAR: {lidar}")
	    # 1. Attach render product
        render_product = rep.create.render_product(lidar.GetPath(), [1, 1])
        renders.append(render_product)

    for render_product in renders:
        counter += 1
        simulation_app.update()
        # 2. Create Annotator to read the data from with annotator.get_data(). Make sure to set ObjectId output and transformPoints to World coordinates
        annotator = rep.AnnotatorRegistry.get_annotator("RtxSensorCpuIsaacCreateRTXLidarScanBuffer", init_params={
                    "outputObjectId": True, "transformPoints":True}) # Check out https://docs.omniverse.nvidia.com/isaacsim/latest/features/sensors_simulation/isaac_sim_sensors_rtx_based_lidar/annotator_descriptions.html for different outputs and annotators
        annotator.attach(render_product)
        simulation_app.update()
        pc_data = None
	# 3. Accumulate points. Allow for one frame to pass to collect data
        
        simulation_app.update()
        pc_data= annotator.get_data()
        simulation_app.update()
        
        print("PC DATA: ",pc_data)
        object_id: list = pc_data["objectId"]
        
        print("DATA: ", pc_data["data"])