Currenlty unsubscribing from a topic is not possible. Unity side actually has unsubscribe method, but ROS side does not implement that functionality. As a result, calling unsubscribe causes the AttributeError: 'SysCommands' object has no attribute 'remove_subscriber' exception.
This PR adds the missing method remove_subscriber, which unregisters ROS subscriber so new messages are not sent to Unity anymore.
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "ros_tcp_endpoint/client.py", line 225, in run
self.tcp_server.handle_syscommand(destination, data)
File "ros_tcp_endpoint/lib/python3.8/site-packages/ros_tcp_endpoint/server.py", line 114, in handle_syscommand
function = getattr(self.syscommands, topic[2:])
AttributeError: 'SysCommands' object has no attribute 'remove_subscriber'
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Blaž Potokar seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it.
Currenlty unsubscribing from a topic is not possible. Unity side actually has unsubscribe method, but ROS side does not implement that functionality. As a result, calling unsubscribe causes the
AttributeError: 'SysCommands' object has no attribute 'remove_subscriber'
exception.This PR adds the missing method
remove_subscriber
, which unregisters ROS subscriber so new messages are not sent to Unity anymore.This bug is reported in this issue on Unity-Robotics-Hub repository.
Here is described the call stack, that causes the exception, in more detail: