Skip to content

ROS2 - Can't unsubscribe #166

@mousdahl-unity

Description

@mousdahl-unity

Describe the bug
The ROS TCP endpoint throws an exception and hitches significantly when unsubscribing from topics.

To Reproduce
Steps to reproduce the behavior:

  1. Subscribe to a topic
  2. Unsubscribe
  3. Look at the TCP endpoint connector log
  4. See error

Console logs / stack traces

Exception in thread Thread-4:
Traceback (most recent call last):
  File "c:\python38\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\source\sol-proj-universal-robopose\ROS2\install\ros_tcp_endpoint\Lib\site-packages\ros_tcp_endpoint\client.py", line 213, in run
    self.tcp_server.handle_syscommand(destination, data)
  File "C:\source\sol-proj-universal-robopose\ROS2\install\ros_tcp_endpoint\Lib\site-packages\ros_tcp_endpoint\server.py", line 121, in handle_syscommand
    function = getattr(self.syscommands, topic[2:])
AttributeError: 'SysCommands' object has no attribute 'remove_subscriber'

Expected behavior
The topic should be unsubscribed with no crashing.

Environment:

  • Unity Version: Unity 2020.3.21f1
  • Unity machine OS + version: Windows 11
  • ROS machine OS + version: Windows 11, ROS Foxy
  • ROS–Unity communication: Windows Environment
  • Branch or version: dev_ros2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions