Timestamp - RtxSensorCpuIsaacCreateRTXLidarScanBuffer

Hello,
I’m trying to get timestamps of lidar points from RtxSensorCpuIsaacCreateRTXLidarScanBuffer and use custom writer to populate PointCloud2 with timestamp and intensity, along with x,y,z for each point. As a basis I took a standard example standalone_examples/api/isaacsim.ros2.bridge/rtx_lidar.py
and added my own writer:
writer = rep.writers.get(“RtxLidar” + “ROS2PublishPointCloudCustom”)

where

class RtxLidarROS2PublishPointCloudCustom(Writer):
    def init(self, topic_name: str, frame_id: str):
        super().init()self.name = “RtxLidarROS2PublishPointCloudCustom”
        self.topic_name = topic_name
        self.frame_id = frame_id
        self.annotators.append(AnnotatorRegistry.get_annotator(
            "RtxSensorCpuIsaacCreateRTXLidarScanBuffer",
            init_params={
                "outputTimestamp": True,
                "keepOnlyPositiveDistance": True,
            }
        ))
        self.annotators.append(AnnotatorRegistry.get_annotator("IsaacReadTimes"))

    def write(self, data):
        try:
            info = data.get("RtxSensorCpuIsaacCreateRTXLidarScanBuffer").get("info")
            timestamp = info.get("timestamp")
            frameNumber = data.get("IsaacReadTimes").get("frameNumber")
            simTime = data.get("IsaacReadTimes").get("simulationTime")

            with open('otimestamp.txt', 'a') as f:
                with np.printoptions(threshold=np.inf):
                    print(frameNumber, simTime, '\n', timestamp, '\n', file=f)
...

rep.WriterRegistry.register(RtxLidarROS2PublishPointCloudCustom)

In the documentation it’s stated that a timestamp is in nanoseconds counting from the simulation start. However, the bare output of RtxSensorCpuIsaacCreateRTXLidarScanBuffer “timestamp” field displays rather odd values. Here is the snippet of the output file I stream this info to, in the following form (see the code snippet above):

frameNumber simulationTime
[point_1_timestamp, point_2_timestamp, … point_n_timestamp]

51 0.03333333507180214
[16488270206394833508 16488270206394833508 16488270206394833508
16488270206394833508 16488270206394833508 16488270206394833508
16488270206394833508 16488270206394833508 16488285238780373008
16488285238780373008 16488285238780373008 16488285238780373008
16488285238780373008 16488285238780373008 16488285238780373008
16488285238780373008 16488300271165912508 16488300271165912508

52 0.05000000260770321
[16488270206394833508 16488270206394833508 16488270206394833508
16488270206394833508 16488270206394833508 16488270206394833508
16488270206394833508 16488270206394833508 16488285238780373008
16488285238780373008 16488285238780373008 16488285238780373008
16488285238780373008 16488285238780373008 16488285238780373008
16488285238780373008 16488300271165912508 16488300271165912508
16488300271165912508 16488300271165912508 16488300271165912508

Please, could you clarify on this?

Welcome to the community @j.silhouette !

Are you using Isaac Sim 4.5.0? Are you able to replicate this issue with the latest stable version Isaac Sim 5.0.0?

Thanks for your reply! Yes, I’m using IsaacSim 4.5.0, and the same thing I’ve observed while testing the newest 5.0.0 version.

Hi @j.silhouette I am able to replicate this issue with Isaac Sim 5.0.0. Let me reach out to the internal team. Thanks!

Thanks, please keep us updated.

Hi @zhengwang! Do you have any updates on this issue?

Hi @j.silhouette our engineers have root caused it and the fix will come out in Isaac Sim 5.1. Please stay tuned and thanks for your patience!

@zhengwang Awesome, thanks! Maybe there is any temporary workaround to fix it while waiting for the official 5.1 Isaac Sim version?

Do you know when is the new release coming out?

@j.silhouette Isaac Sim 5.1 is expected to come out around October this year.

Hi @zhengwang ! Do you have any updates concerning the script?

Hi @j.silhouette. Isaac Sim 5.1 OSS is scheduled to release next week. The timestamp issue should be fixed. You can check it out. Thanks for your patience.

@zhengwang Awesome news, thanks!