ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Rosbridge Server gives warning when I try to unadvertise or unsubscribe

asked 2019-07-31 03:58:58 -0500

mmp52 gravatar image

updated 2019-07-31 04:04:11 -0500

Hi there, I have a ROS Kinetic running Raspberry Pi 3 B (I have installed ros as a ROSberry installation, from the source as suggested), which runs Rosbridge Udp Server over it. I am getting in contact with it via a Windows-10 Laptop which has a c++ program running to send JSON's to the Raspberry Pi. When I send advertisement or subscription requests system runs perfectly, I am able to publish/receive messages and create topics easily. After I am done with the messaging, I want to unadvertise a topic (and unsubscribe) so that topic will be killed by ROS Master since there will be no subscribers or publishers left. I am sending the following JSON's to unsubscribe and unadvertise:

  • { "op": "unsubscribe", "id": "C-R", "topic": "top2" } //for unsubscribing
  • { "op": "unadvertise", "id": "yp2", "topic": "top2" } //for unadvertising

then I get the following warning, which says (I believe) I am asking ROS to unadvertise or unsubscribe, but I specifically added ID parts to the JSON's just to make sure that ROS understand the request is coming me and I am asking ROS to make me unadvertise and unsubscribe. Why am I having the warning and how can I fix this?

[WARN] [1564562740.474205]: Could not process inbound connection: [/rosbridge_udp] is not a publisher of [/top2]. Topics are [['/client_count', 'std_msgs/Int32'], ['/rosout', 'rosgraph_msgs/Log']]{'message_definition': 'string data\n', 'callerid': '/rosbridge_udp', 'tcp_nodelay': '0', 'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', 'topic': '/top2', 'type': 'std_msgs/String'} [WARN] [1564562741.499281]: Could not process inbound connection: [/rosbridge_udp] is not a publisher of [/top2]. Topics are [['/client_count', 'std_msgs/Int32'], ['/rosout', 'rosgraph_msgs/Log']]{'message_definition': 'string data\n', 'callerid': '/rosbridge_udp', 'tcp_nodelay': '0', 'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', 'topic': '/top2', 'type': 'std_msgs/String'} [WARN] [1564562743.519575]: Could not process inbound connection: [/rosbridge_udp] is not a publisher of [/top2]. Topics are [['/client_count', 'std_msgs/Int32'], ['/rosout', 'rosgraph_msgs/Log']]{'message_definition': 'string data\n', 'callerid': '/rosbridge_udp', 'tcp_nodelay': '0', 'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', 'topic': '/top2', 'type': 'std_msgs/String'}

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-09-19 06:45:37 -0500

AndreasVH gravatar image

See here: https://github.com/RobotWebTools/rosb...

It seems like it is actually a bug in rospy (which rosbridge_suite is written in). Apparently unpublishing has been broken since 2013 (https://github.com/ros/ros_comm/issue...). So the issue does not arise when your client unpublishes/unsubscribes from the rosbridge server, but when the rosbridge_server itself unpublishes the ros topic.

A workaournd is to set the unregister_timeout argument to a huge value. Like 1 year, so rosbridge_server never unpublishes any topics. If you are publishing/subscribing and unpublishing/unsubscribing from a lot of different topics, this might become a problem over time.

This situation is quite dissapointing in my opinion.

edit flag offensive delete link more

Comments

1

This situation is quite dissapointing in my opinion.

This may not count as an excuse, but rosbridge_suite, as with just about everything in ROS, is an OSS project. It will depend on volunteers and maintainers to get things fixed.

Unless someone spends some effort to fix this in rospy and submits that fix, nothing will change.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-19 08:43:18 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-07-31 03:58:58 -0500

Seen: 690 times

Last updated: Jul 31 '19