Sample_lidar_replay continously reports invalid packet shortly after startin replay of recording

DRIVE OS Version: 7.0.3

Issue Description: When replaying a recorded lidar .bin from a recording made with the record tool the sample_lidar_replay initially displays a point-cloud for a short period of time and then seems to get stuck continuously reporting an error “invalid packet”

The command line:

/usr/local/driveworks/bin/sample_lidar_replay --protocol=lidar.virtual --params=file=lidar_vls128.bin --autoExit=1 2>&1 | tee sample_lidar_replay.log

This eventually (quickly) produces the following output:

[DW][ERROR][getBasePathFor] Warning: SamplesDataPath::getBasePathFor(): 'DATA_ROOT' not found in search paths [/srv/nfs/share/rec/lidar-cam/2026-07-09/data | /usr/local/driveworks/bin.runfiles/av/data | /usr/local/driveworks/bin/sample_lidar_replay.runfiles/av/data | /usr/local/driveworks/bin/data | /usr/local/driveworks/data | /usr/local/data | /usr/data]
[DW][INFO] ProgramArguments: Missing argument 'dwTracePath' requested
[DW][INFO] Starting my sample application...
[09-07-2026 17:17:56] Adding variable DW_Base:DW_Version
[09-07-2026 17:17:56] Added variable DW_Base:DW_Version
[09-07-2026 17:17:56] Platform: number of GPU devices detected 1
[09-07-2026 17:17:56] Platform: currently selected GPU device 0, Resource Data Dir: trt_10_08_10_05, Arch: ga10b
[09-07-2026 17:17:56] Platform: currently selected GPU device integrated ID 0
[09-07-2026 17:17:56] Context::mountResourceCandidateDataPath resource FAILED to mount from './resources': VirtualFileSystem: Failed to mount './resources/resources.pak'
[09-07-2026 17:17:56] Context::mountResourceCandidateDataPath resource FAILED to mount from '/srv/nfs/share/rec/lidar-cam/2026-07-09/data': VirtualFileSystem: Failed to mount '/srv/nfs/share/rec/lidar-cam/2026-07-09/data/resources.pak'
[09-07-2026 17:17:56] Context::findDataRootInPathWalk: Could not find ./data/DATA_ROOT in upto 7 parent directories from /usr/local/driveworks/bin/../lib/libdw_base.so.7.0
[09-07-2026 17:17:56] Context::findDataRootInPathWalk: Could not find ./data/DATA_ROOT in upto 7 parent directories from /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_base.so.7.0
[09-07-2026 17:17:56] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks/bin/../lib/libdw_base.so.7.0
[09-07-2026 17:17:56] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_base.so.7.0
[09-07-2026 17:17:56] SDK: No resources(.pak) mounted, some modules will not function properly
[09-07-2026 17:17:56] [09-07-2026 17:17:56] Initialize DriveWorks SDK v7.0.3
[09-07-2026 17:17:56] [09-07-2026 17:17:56] Release build with GNU 13.2.0 from  against Drive PDK v7.0.3.0
[09-07-2026 17:17:56] SensorFactory::createSensor() -> time.nvpps, nvpps-device=/dev/nvpps0
[09-07-2026 17:17:56] Found driver: time.nvpps
[09-07-2026 17:17:56] TimeSensorNVPPS: initialized with no UTC time reference.
[09-07-2026 17:17:56] output-timestamp parameter is deprecated and will be removed in next release[09-07-2026 17:17:56] SensorFactory: Override default timeSensor with the user passed one
[09-07-2026 17:17:56] EndpointNVPPS: started on /dev/nvpps0
[09-07-2026 17:17:56] SensorFactory::loadPluginLibraryHelper:Succeed to load dynamic lib - /usr/local/driveworks/bin/../lib/libsensor_plugin_public_radar.so
[09-07-2026 17:17:56] SensorFactory::createSensor() -> lidar.virtual, file=lidar_vls128.bin
[09-07-2026 17:17:56] Found driver: lidar.virtual
[09-07-2026 17:17:56] output-timestamp parameter is deprecated and will be removed in next release[09-07-2026 17:17:56] output-timestamp parameter is deprecated and will be removed in next release[09-07-2026 17:17:56] output-timestamp parameter is deprecated and will be removed in next release[09-07-2026 17:17:56] Seek file lidar_vls128.bin.seek: seek table with 9502 entries covering 304039 events ranging from 1783617180843212 to 1783617198667503 usecs
[09-07-2026 17:17:56] LegacyLidarDemuxer: hres is empty, default value 0 will be used
[09-07-2026 17:17:56] LegacyLidarDemuxer: hfov-start is empty, default value 0 will be used
[09-07-2026 17:17:56] LegacyLidarDemuxer: hfov-end is empty, default value 360 will be used
[09-07-2026 17:17:56] LegacyLidarDemuxer: return-mode is not found in lidar recording header, will use the packet stream to set lidar properties properly
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] Return mode separation not enabled, using DW_LIDAR_RETURN_TYPE_ANY
[09-07-2026 17:17:56] output-timestamp parameter is deprecated and will be removed in next release[09-07-2026 17:17:56] Initialize DriveWorks VisualizationSDK v7.0.3
[09-07-2026 17:17:56] Initialize DriveWorksGL SDK v7.0.3
[09-07-2026 17:17:56] egl::Display: found 1 EGL devices
[09-07-2026 17:17:56] egl::Display: use drm device: /dev/dri/card1
[DW][INFO] Init Successfully.
[09-07-2026 17:17:57] EndpointNVPPS: no PPS event received; missing PPS/GPS signal?
[09-07-2026 17:17:57] EndpointNVPPS: switching to timer mode until PPS signal is available.
[09-07-2026 17:18:14] DecoderVelodyneVLS128::drain, invalid packet
[09-07-2026 17:18:14] DecoderVelodyneVLS128::drain, invalid packet
[09-07-2026 17:18:14] DecoderVelodyneVLS128::drain, invalid packet
[09-07-2026 17:18:14] DecoderVelodyneVLS128::drain, invalid packet
[09-07-2026 17:18:14] DecoderVelodyneVLS128::drain, invalid packet
[09-07-2026 17:18:14] DecoderVelodyneVLS128::drain, invalid packet
....

The rig file used to generate the recording is:

{
  "rig": {
    "sensors": [
      {
        "name": "lidar:vls128",
        "protocol": "lidar.socket",
        "parameter": "device=VELO_VLS128,ip=192.168.14.218,port=2368,scan-frequency=20,time-smoothing=true",
        "nominalSensor2Rig_FLU": {
          "roll-pitch-yaw": [
            0,
            0,
            0
          ],
          "t": [
            0,
            0,
            0
          ]
        }
      }
    ],
    "vehicle": {
      "valid": false
    }
  },
  "version": 2
}

How can I determine if the .bin file is somehow corrupt or if this is a known issue with the lidar decoder?

Dear @david.cattley ,
Did you notice any missing packets while recording?

where would such a thing be reported and what would that report look like?

Do you see any packet missing notification/info in recorder log or using ethtool on the interface?

I analyzed the content of the recorded .BIN file using a tool I created to dissect the file back into a sequence of UDP payloads from the sensor.

What I found was that after short period of time, the data in the file was just 0x00 and there were no headers delineating the structure of the file.

After about 10% of the file containing normal expected VELO_VLS128 UDP data frames, the next ~90% of the file was just filled with 0x00 (zeros) until a small nonsensicle bit of gibberish at the end of the file.

This was true of a number of independent files I created where the duration of the recording was longer than just a couple of minutes.

I created a utility to monitor the output of the sensor for dropped or corrupt frames. None were detected even when running for long periods of time (> 30min).

The recorder was being directed to save the recording files into a share mounted from an NFS server.

I switched to a locally attached USB drive instead.

Immediately the corruption went away and recordings now made sense again and passed validity checks. The recordings could be replayed with sample_lidar_replay without any issue.

This is a very curious situation in so far as it seems that mounting a share via NFS and writing to it should not result in data corruption like this. But now I can rule out using NFS as a way to capture large data sets offboard.

Curiously, the 6 camera streams recording alongside the lidar stream did not have any issue being recorded onto the NFS share.

In the course of this testing I also noted another curiousity. If I have more than one lidar sensor sending packets to the Drive AGX on the same network interface, the capture data is “corrupted” by having both lidar streams written to the same file. It appears that the lidar sensor plugin does not use the ip=xxx.xxx.xxx.xxx parameter to “connect” to the sensor so that only packets from the sensor at that IP address are received into that stream.

Does that mean that every lidar sensor needs to have its own (virtual?) network so that the plugin won’t get confused?

Does NFS share enough write BW when using cameras + lidar together? please check with only lidar sensor first to see if issue is noticed and add camera sensors incrementatlly.

Does that mean, when lidar sensor is connected to different interface, yo don’t see any issue on NFS? Could you share the sensor connnection details like which ports they are connected in your recording use case?

Does this case has lidar sensors on same interface?

We have released DOS 7.2.5. Could you try with it?

I am working through the 7.0 → 7.2 upgrade. I will refresh this when I complete that and retest.

What I have determined (and this then is a different issue) is that the legacy lidar plugin does not “connect” the UDP socket and thus limit reception to only a single source host. The side-effect then is that if another lidar is on the network and operating (but not necessarily known to DW) the lidar plugin will receive packets from any (and all) sources which results in corrupt data.

It is unfortunate that the lidar plugin does not “connect” and thus prevent this. This also means that when more than one lidar is present that each must send to a unique UDP port. I noted that DriveWorks will fail to initialize the sensors if two legacy lidars are configured for the same UDP port. Oh well.

Yes it does.

The corruption symptom recording direct to NFS is no longer reproduced in 7.2.5

Are you referring to the port value used in device=VELO_VLS128,ip=192.168.14.218,port=2368,scan-frequency=20,time-smoothing=true", ?
Can you verify the changing the port in from lidar configuration page and use the same in DW rig parameter? Does that help?

Yes, moving the other lidar unit to an alternate data & position packet port avoids both lidars sending to the same address:port and DW works just fine in that case.

My point in observing this behavior is that this should not be necessary. When DW opens the UDP socket to receive data packages it has full knowledge of the sensor source IP address and could (and should?) connect() the socket to limit the received packets to only those sent from that IP address. There should be no conflict opening and connecting another socket bound to the same interface and connected to a different sensor IP address. But because DW is evidently not doing this, it refuses (experiences a socket error likely) and errors out due to the socket being opened and able to receive from INADDR_ANY.

On a side note: Does the lidar reader / plugin support joining and receiving as a member of a multicast group?

Yes. DW expects both IP and port to be different for same type of sensors.

Could you please elaborate on the use case? The plugin functions are listed at Custom Lidars (Comprehensive) — NVIDIA DriveOS 7.2.5 Linux SDK Early Access Developer Guide

Generally the usecase is that more than one SoC of a multi-SoC (or multi-ECU) system would be interested in the same sensor data stream for “whatever reason”. I’m sure you can image reasons.

yes. multicast is supported.
For now, please use different IP and port when multiple lidars in network. I will share your feedback to concerned team.