But when I start all nodes using the launch file, sometimes it can display images properly, but sometimes it cannot, and the openCV window goes grey(Not responding because no call to cv::waitKey() for some time). So it appears sometimes I can get the messages from openni_nodelet, but sometimes I cannot. Each time I just run the launch file and exit it by Ctrl-C, but the results are different.
I don't know whether there exists some rules that I should follow when using nodelet, e.g. subscribers should start after publishers? How can I make it work every time?