RobotWebTools / rosbridge_suite

Server Implementations of the rosbridge v2 Protocol

Home Page:https://robotwebtools.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`roslibpy topic list` crashes if no topics are available

SubaruArai opened this issue · comments

Description
roslibpy topic list crashes if no topics are available.
Fixed in pr #869.

  • Library Version: 0.11.16-2focal.20230620.193802
  • ROS Version: noetic
  • Platform / OS: Ubuntu 20.04LTS

Steps To Reproduce

  1. Run any of the rosbridge_server launch files with a topics_glob that contains no topics. E.g. [/dummy/*]
  2. In another terminal, run roslibpy topic list

Expected Behavior
An empty list returns

Actual Behavior
The server (rosapi) logs the following error:

Error processing request: not enough values to unpack (expected 2, got 0)
['Traceback (most recent call last):\n', '  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 633, in _handle_request\n    response = convert_return_to_response(self.handler(request), self.response_class)\n', '  File "/opt/ros/noetic/lib/rosapi/rosapi_node", line 72, in get_topics\n    topics, types = proxy.get_topics_and_types(rosapi.glob_helper.topics_glob)\n', 'ValueError: not enough values to unpack (expected 2, got 0)\n']