RTX lidar and ROS2 - synchronization and rviz

Hi,
I have a synchronization problem with the published messages with the node ROS2 RTX Lidar Helper. This is my pipeline:

I also need to publish all the transformations for odometry with this pipeline:

When I use Rviz to show the data I have this error:

[rviz2-1] [ERROR] [1701436738.880224363] [rviz2]: Lookup would require extrapolation into the future.  Requested time 88.566621 but the latest data is at time 88.483338, when looking up transform from frame [front_3d_lidar] to frame [base_link]

Looks like the timestamp contained in the LaserScan message is wrong. I would like to insert the same timestamp as in the transforms, but the “ROS2 RTX Lidar Helper” doesn’t have a timestamp input.
How can I solve it?

Furthermore, I would like to publish the Lidar message as soon as the sensor has an update (I’m using the PandarXT_32_10hz in the Nvidia Carterv2_4), so set it at a fixed frequency, in this case 10Hz. Instead, now it’s publishing at simulation time, and having in this way repeated data.
I found this https://forums.developer.nvidia.com/t/publishing-rate-of-rtx-lidar/236061/10 talking about using " IsaacCreateRTXLidarScanBuffer", but I didn’t manage to get it to work.
The feature I want to keep is the real deformation of data points due to movement, as in real life. So points at the beginning of the scan cycle have an “older” transformation than the points at the end of the scan cycle.

Thanks in advance

Good morning,

I had the same problem and I solved it using the RtxLidarROS2PublishPointCloudBuffer writer.

Here there is a code example:

# create the rtx lidar sensor that generates data into "RtxSensorCpu"
_, rtx_lidar_sensor = omni_kit_commands.execute(
   "IsaacSensorCreateRtxLidar",
    path="/sensor",
    parent=None,
    config="Example_Rotary",
    translation = (0, 0, 0.0),
    orientation = Gf.Quatd(1, 0.0, 0.0, 0.0),  # Gf.Quatd is w,i,j,k
)

# RTX sensors are cameras and must be assigned to their own render product
rtx_lidar_hydra_texture = rep.create.render_product(rtx_lidar_sensor.GetPath(), [1, 1], name="Isaac")

simulation_app.update()

# create pointcloud publisher pipeline in the post process graph
rtx_lidar_writer = rep.writers.get("RtxLidar" + "ROS2PublishPointCloudBuffer")
rtx_lidar_writer.initialize(frameId=frame_id, nodeNamespace=node_namespace, topicName=topic_name,)
rtx_lidar_writer.attach([rtx_lidar_hydra_texture])

If you are using this code inside a function please note:
Remember to store the rtx_lidar_hydra_texture in a variable that exists outside the function, otherwise it will be deleted when the function ends and the pointcloud will not be published.