Open mousdahl-unity opened 1 year ago
Same problem here. Add the following definition to class SysCommands in server.py:
def remove_subscriber(self, topic):
if topic == "":
self.tcp_server.send_unity_error(
"Can't unsubscribe to a blank topic name! SysCommand.remove_subscriber({}, {})".format(
topic
)
)
return
node = self.tcp_server.subscribers_table.get(topic)
if node is not None:
self.tcp_server.unregister_node(node)
self.tcp_server.loginfo("UnregisterSubscriber({}) OK".format(topic))
else:
self.tcp_server.send_unity_error(
"Can't unsubscribe node if not previously subscribed! SysCommand.remove_subscriber({})".format(
topic
)
)
Describe the bug The ROS TCP endpoint throws an exception and hitches significantly when unsubscribing from topics.
To Reproduce Steps to reproduce the behavior:
Console logs / stack traces
Expected behavior The topic should be unsubscribed with no crashing.
Environment: