-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Describe the bug
A ROS2 file with out the metadata does not list the topics
To Reproduce
uvx pointcoudset topics 20250512T001144_c3e936639e6c419795707da9629dbb91.mcap
× No solution found when resolving tool dependencies:
╰─▶ Because pointcoudset was not found in the package registry and you require pointcoudset, we can conclude that your
requirements are unsatisfiable.
/Volumes/u/lidar_data/d/d/2/05/12 uvx pointcloudset topics 20250512T001144_c3e936639e6c419795707da9629dbb91.mcap
╭────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────╮
│ /Users/work/.cache/uv/archive-v0/An6_b6_pIhqY-zNQyBA3v/lib/python3.11/site-packages/pointcloudset/io/dataset/commandline.py:97 │
│ in topics │
│ │
│ 94 │ show all PointCloud2 topis in a ROS1 bag file │
│ 95 │ $ pointcloudset topics test.bag │
│ 96 │ """ │
│ ❱ 97 │ with AnyReader([Path(ros_file)]) as reader: │
│ 98 │ │ all_topics = reader.topics │
│ 99 │ pointcloud_topics = { │
│ 100 │ │ k: f"{v.msgtype} with {v.msgcount} messages" │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ ros_file = '20250512T001144_c3e936639e6c419795707da9629dbb91.mcap' │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/work/.cache/uv/archive-v0/An6_b6_pIhqY-zNQyBA3v/lib/python3.11/site-packages/rosbags/highlevel/anyreader.py:178 in │
│ enter │
│ │
│ 175 │ │
│ 176 │ def enter(self) -> Self: │
│ 177 │ │ """Open rosbags when entering contextmanager.""" │
│ ❱ 178 │ │ self.open() │
│ 179 │ │ return self │
│ 180 │ │
│ 181 │ def exit( │
│ │
│ ╭─────────────────────────────── locals ───────────────────────────────╮ │
│ │ self = <rosbags.highlevel.anyreader.AnyReader object at 0x16581b190> │ │
│ ╰──────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/work/.cache/uv/archive-v0/An6_b6_pIhqY-zNQyBA3v/lib/python3.11/site-packages/rosbags/highlevel/anyreader.py:126 in open │
│ │
│ 123 │ │ rollback = [] │
│ 124 │ │ try: │
│ 125 │ │ │ for reader in self.readers: │
│ ❱ 126 │ │ │ │ reader.open() │
│ 127 │ │ │ │ rollback.append(reader) │
│ 128 │ │ except ReaderErrors as err: │
│ 129 │ │ │ for reader in rollback: │
│ │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ reader = <rosbags.rosbag1.reader.Reader object at 0x14ec8c190> │ │
│ │ rollback = [] │ │
│ │ self = <rosbags.highlevel.anyreader.AnyReader object at 0x16581b190> │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/work/.cache/uv/archive-v0/An6_b6_pIhqY-zNQyBA3v/lib/python3.11/site-packages/rosbags/rosbag1/reader.py:383 in open │
│ │
│ 380 │ │ │ raise ReaderError(msg) from err │
│ 381 │ │ │
│ 382 │ │ try: │
│ ❱ 383 │ │ │ magic = self.bio.readline().decode() │
│ 384 │ │ │ if not magic: │
│ 385 │ │ │ │ msg = f'File {str(self.path)!r} seems to be empty.' │
│ 386 │ │ │ │ raise ReaderError(msg) # noqa: TRY301 │
│ │
│ ╭─────────────────────────── locals ───────────────────────────╮ │
│ │ self = <rosbags.rosbag1.reader.Reader object at 0x14ec8c190> │ │
│ ╰──────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Version [e.g. 0.2.1]
Additional context
Add any other context about the problem here.