Ask Your Question

Inbound TCP/IP connection failed: 'function' object has no attribute 'peer_subscribe'

asked 2018-08-01 13:37:22 -0500

pitosalas gravatar image

updated 2018-08-01 14:16:07 -0500

I have two nodes, one publishes a topic ( ) that the other one ( ) subscribes to. What happens is if I run the publsher by itself, all is well. But if I do a rostopic echo on the relevant topic then the publisher starts throwing that exception.

Three notes:

  1. I've been debugging for a while, with control-c and kill commands to try and cleanup. I could be in some kind of bad state. But then my question is: how do I tell and how do I get out of the bad state? What do I reboot, my development computer, my robot, my roscore computer, all of them? And how do I avoid getting into this state.
  2. Minor: is the / before the topic name (when used in the publish or subscribe call) required, optional or sometimes yes and sometimes no?
  3. I am working in python,
edit retag flag offensive close merge delete



It's much more likely that someone can help you debug your code if you show the code.

NEngelhard gravatar image NEngelhard  ( 2018-08-01 13:52:26 -0500 )edit

Done. See links added above.

pitosalas gravatar image pitosalas  ( 2018-08-01 14:16:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-01 14:37:21 -0500

pitosalas gravatar image

Sorry, I found the bug. See line 11 and 12 of the

    self.sub = rospy.Subscriber('/scan', LaserScan, self.scan, queue_size=1) = rospy.Publisher('obstacle', Obstacle, self.scan, queue_size =10)

As they say... "never mind" :(

edit flag offensive delete link more


I made the same mistake putting the wrong arguments into the publisher. In my case I just wrote "10" instead of "queue_size = 10"

sirrarthur gravatar image sirrarthur  ( 2021-06-29 12:42:58 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2018-08-01 13:37:22 -0500

Seen: 1,448 times

Last updated: Aug 01 '18