Skip to content

Commit d91d8e1

Browse files
telnorattiCalvin Winkowski
andauthored
Handle bag files with empty topics (#666)
When reading an mcap file, make message count default to 0 if it's not in the mcap summary (when there are no messages). Co-authored-by: Calvin Winkowski <cwinkowski@vtti.vt.edu>
1 parent 9f96406 commit d91d8e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/src/ouster/sdk/bag/bag_packet_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def bag2_monkey(self, paths, default_typestore=None):
105105
for id, c in f.channels.items():
106106
con = Connection(id = id, topic=c.topic, msgtype=c.schema,
107107
msgdef=schemas[c.schema][1],
108-
msgcount = counts[id],
108+
msgcount = counts.get(id, 0),
109109
ext = ConnectionExtRosbag2(serialization_format='cdr',
110110
offered_qos_profiles=qos.get(c.schema, '')),
111111
owner = self, digest = None)

0 commit comments

Comments
 (0)