ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Subscriber losing connection to topic on same computer

asked 2012-06-14 05:12:41 -0500

Pi Robot gravatar image

updated 2012-06-14 05:14:17 -0500


I have a weird problem I haven't seen before. I'm using the latest Electric debs on Ubuntu 11.10.

I have a Python node that publishes a RegionOfInterest message on topic /roi while tracking a colored object using the OpenCV CamShift filter.

When I run 'rostopic echo /roi' in another terminal, I can see the messages streaming by and updating as I move the object in front of the camera. However, after apparently random intervals, the messages stop updating--i.e. they are stuck on some last value no matter how I move the tracked object in front of the camera.

Putting a 'rospy.loginfo(roi)' command in the Camshift script just before the publish command proves that the messages are still being published correctly. In other words, the rospy.loginfo(roi) output continues to update correctly on the screen even when the 'rostopic echo /roi' messages appear stopped in the other terminal. If I Ctrl-C the 'rostopic echo /roi' command and start it up again, the messages start updating correctly again.

Not even sure how to debug this one...


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-06-14 08:06:44 -0500

Pi Robot gravatar image

OK, my bad. Turns out my ROI was getting assigned negative values for x_offset and/or y_offset when tracking the object near the image boundaries. Setting such values to 0 solved my problem.


edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-06-14 05:12:41 -0500

Seen: 353 times

Last updated: Jun 14 '12