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

BUG? topic subscription shutdown() fails to shutdown.

asked 2012-08-06 09:43:45 -0600

ranqi gravatar image

updated 2016-10-24 09:03:35 -0600

ngrennan gravatar image

Hi,

The scenerio is we are trying to do custom kinect calibration and we need both raw IR and RGB image. The kinect/asus hardware do not support stream ir and rgb at the same time, so we need to switch back and forth between two topics, or we will get a "can't stream ir and rgb at the same time, stream rgb only now" warning from ros. The problem is I tried sub.shutdown() the rgb topic subscription but still can't add IR topic subscription and get the same warning. I also tried use ros::topic::waitForMessage<sensor_msgs::image>("/camera/rgb/image_mono", *nodeHandle); which is suppose to subscribe->get a frame of data ->unsubscribe. But I still get the same warning. It seems neither shutdown() nor waitForMessage is able to turn off the subscription to a topic. Is this a bug or I am doing something wrong here? Insights welcomed. Thank you!

Best, Ranqi

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-10-08 08:35:50 -0600

tfoote gravatar image

From the documentation of Subscriber.shutdown() it states that it unsubscribes the callback it does not state that it unsubscribes the topic. You might need to destroy the Subscriber instance.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-08-06 09:43:45 -0600

Seen: 417 times

Last updated: Oct 08 '12