Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yakut Mon fails to gracefully handle empty bitmask and sparse_list #118

Open
moiflo033 opened this issue Feb 9, 2025 · 0 comments
Open

Comments

@moiflo033
Copy link

When a node publishes a empty bitmask or sparse list for the on the uavcan.node.port.List publishers and subscrivbers topic, Yakut fails to handle it correctly.

  uavcan_node_port_SubjectIDList_1_0_select_mask_(&port_list.publishers);

  uavcan_node_port_SubjectIDList_1_0_select_sparse_list_(&port_list.subscribers);

  size_t size = uavcan_node_port_List_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_;
  uint8_t buf[size];

  uavcan_node_port_List_1_0_serialize_(port_list, buf, &size);

OS: Ubuntu 24.04
Yakut Version: git release 3a22dd4
Installation method: pip3

Error:

pycyphal.util._broadcast: Unhandled exception in <bound method Avatar._on_trace of Avatar(node_id=42)>: 
Traceback (most recent call last):
  File "/home/opencyphal/.venv/lib/python3.12/site-packages/pycyphal/util/_broadcast.py", line 46, in delegate
    r: typing.Union[R, Exception] = fn(*args, **kwargs)
                                    ^^^^^^^^^^^^^^^^^^^
  File "/home/opencyphal/.venv/lib/python3.12/site-packages/yakut/cmd/monitor/_model.py", line 165, in _on_trace
    handler(float(ts.monotonic), obj)
  File "/home/opencyphal/.venv/lib/python3.12/site-packages/yakut/cmd/monitor/_model.py", line 102, in _on_port_list
    self._ports.pub = expand_subjects(obj.publishers)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/opencyphal/.venv/lib/python3.12/site-packages/yakut/cmd/monitor/_model.py", line 198, in expand_subjects
    assert False
           ^^^^^
AssertionError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant