ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
image_transport::Subscriber image_sub_;
while(1) { image_sub_=it_.subscribe("/ardrone/image_raw", 1,imageCallback); ...... }
and in the end of imageCallback function I add this code, "image_sub_.shutdown()"
The final result seems, the subscriber will shutdown, but never resubscribe.
2 | No.2 Revision |
image_transport::Subscriber image_sub_;
while(1) { image_sub_=it_.subscribe("/ardrone/image_raw", 1,imageCallback); ros::spin(); ...... }
and in the end of imageCallback function I add this code, "image_sub_.shutdown()"
The final result seems, the subscriber will shutdown, but never resubscribe.