Could not process inbound connection - Publish with rqt_gui
Hi,
I was working with a python node that acts as a intermediary node for communication between two other nodes. The problem is that, while the communication between nodes is correct (the messages are being published correctly and the nodes communicate just fine), when I try to publish in the intermediary node topic with rqt_gui the following warning is written in the console:
Could not process inbound connection: [/rqt_gui_py_node_3098] is not a publisher of [/chatter]. Topics are [['/rosout', 'rosgraph_msgs/Log']]{'message_definition': 'string data\n', 'callerid': '/test_node_2922_1564747575437', 'tcp_nodelay': '0', 'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', 'topic': '/chatter', 'type': 'std_msgs/String'}
This does not happen when publishing on the topic with the proper console command: E.g.: rostopic pub -r 10 /chatter std_msgs/String "data: 'Hello world'"
And I am wondering what is this warning and the reason of it.
I will post here the chunk of code for the intermediary node:
#!/usr/bin/env python
import rospy
from std_msgs.msg import String
def spin():
rospy.init_node('test_node', anonymous=True)
rospy.Subscriber('chatter', String, callback)
pub = rospy.Publisher('talker', String, queue_size=10)
rate = rospy.Rate(10)
while not rospy.is_shutdown():
pub.publish(msg)
rate.sleep()
rospy.spin()
msg = None
def callback(data):
msg = data.data
if __name__ == '__main__':
try:
spin()
except rospy.ROSInterruptException:
pass
Thanks in advance!
Asked by Weasfas on 2019-08-02 07:19:41 UTC
Answers
Not exactly sure if this is the same issue, but #q231714 discusses the similar error message where potential solution is suggested.
Asked by 130s on 2019-10-12 01:25:03 UTC
Comments
The message is similar but I am not using rosbridge just a rospy publisher that only throws that message when used with rqt_gui topic publisher plugin.
Asked by Weasfas on 2019-11-08 08:42:49 UTC
Comments
I'm not sure this is the cause of anything, but you appear to be publishing and subscribing to the same topic. That typically doesn't result in meaningful behaviour.
Asked by gvdhoorn on 2019-08-02 10:34:50 UTC
@gvdhoorn Yes I know but that is only a dummy node to test the behaviour I describe here. I have updated the code to have different topics, the result is the same in both scenarios.
Asked by Weasfas on 2019-08-02 11:18:34 UTC
I am currently facing the same problem with a rospy node. Did you find a solution @Weasfas?
Asked by fjp on 2020-11-07 17:13:33 UTC
@fjp, Well as far as I can tell, the problem dissapeared when I updated my machine to ROS Melodic, although I still do not know exactly what was the cause.
Asked by Weasfas on 2020-11-08 05:14:02 UTC