Ask Your Question

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

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

pitosalas gravatar image

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

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 imageNEngelhard ( 2018-08-01 13:52:26 -0600 )edit

Done. See links added above.

pitosalas gravatar imagepitosalas ( 2018-08-01 14:16:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

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

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

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 -0600

Seen: 658 times

Last updated: Aug 01 '18