Collect data from lidar sensor while the simulation is running

I am trying to simulate a rotating lidar (Frequench of 10 Hz). My usecase is as follows:

  1. The robot on which the lidar is mounted is moving at some velocity
  2. I am controlling the simulation using Python API. So I am doing :
    world.step(render = False)
  1. Meanwhile while my robot moves I want to capture data from the lidar sensor on the robot. So my physics is running at 100 Hz, while lidar should be running at 10 Hz. So one lidar scan should take place over 10 simulation steps.

How do I achieve these goals? I have already followed the example - 9. Using Sensors: LIDAR — Omniverse Robotics documentation
But using the above example I am not able to simulate the robot while the lidar is collecting the data.
The relevant code from the example is below:

async def get_lidar_param():
    await asyncio.sleep(1.0)
    pointcloud = lidarInterface.get_point_cloud_data("/World"+lidarPath)
    semantics = lidarInterface.get_semantic_data("/World"+lidarPath)

    print("Point Cloud", pointcloud)
    print("Semantic ID", semantics)                                                 # Start the Simulation
asyncio.ensure_future(get_lidar_param())                        # Only ask for data after sweep is complete

The example shows the need to pause the timeline before we can start collecting the data. Can we not collect the data while the simulation is running? Hope the question is clear.