Ask Your Question
0

Could not process inbound connection - Publish with rqt_gui

asked 2019-08-02 07:19:41 -0500

Weasfas gravatar image

updated 2019-10-12 01:23:27 -0500

130s gravatar image

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!

edit retag flag offensive close merge delete

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.

gvdhoorn gravatar imagegvdhoorn ( 2019-08-02 10:34:50 -0500 )edit

@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.

Weasfas gravatar imageWeasfas ( 2019-08-02 11:18:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-12 01:25:03 -0500

130s gravatar image

Not exactly sure if this is the same issue, but #q231714 discusses the similar error message where potential solution is suggested.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-08-02 07:19:41 -0500

Seen: 51 times

Last updated: Oct 12