From d8c054db8187a13bdd2cbd935b8ee045cf03f7aa Mon Sep 17 00:00:00 2001 From: Mr-Neutr0n <64578610+Mr-Neutr0n@users.noreply.github.com> Date: Thu, 12 Feb 2026 00:14:07 +0530 Subject: [PATCH] Fix broken assertions in RadarPointCloud PCD header parsing - Fix height assertion error message: said "height != 0" but the check is "height == 1", so the message now correctly says "height != 1". - Fix COUNT assertion: the expression `c != c` is always False for strings, making the assertion a no-op. Replace with an explicit check that all COUNT values equal 1, since multi-element fields are not supported by the binary parser below. --- python-sdk/nuscenes/utils/data_classes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-sdk/nuscenes/utils/data_classes.py b/python-sdk/nuscenes/utils/data_classes.py index ea049ff66..fcc757b83 100644 --- a/python-sdk/nuscenes/utils/data_classes.py +++ b/python-sdk/nuscenes/utils/data_classes.py @@ -403,8 +403,8 @@ def from_file(cls, data = meta[10].split(' ')[1] feature_count = len(types) assert width > 0 - assert len([c for c in counts if c != c]) == 0, 'Error: COUNT not supported!' - assert height == 1, 'Error: height != 0 not supported!' + assert all(int(c) == 1 for c in counts), 'Error: COUNT != 1 not supported!' + assert height == 1, 'Error: height != 1 not supported!' assert data == 'binary' # Lookup table for how to decode the binaries.