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!
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.
@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.
I am currently facing the same problem with a rospy node. Did you find a solution @Weasfas?
@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.