35 #include <boost/date_time/posix_time/posix_time.hpp> 36 #include <boost/thread/thread.hpp> 37 #include <boost/foreach.hpp> 67 std::cout << device_manager;
71 BOOST_FOREACH(
const std::string& uri, *device_uris)
77 device->setIRFrameCallback(boost::bind(&
IRCallback, _1));
78 device->setColorFrameCallback(boost::bind(&
ColorCallback, _1));
79 device->setDepthFrameCallback(boost::bind(&
DepthCallback, _1));
85 device->startColorStream();
86 device->startDepthStream();
88 boost::this_thread::sleep(boost::posix_time::milliseconds(1000));
90 device->stopAllStreams();
94 std::cout<<
"Number of called to IRCallback: "<<
ir_counter_ << std::endl;
95 std::cout<<
"Number of called to ColorCallback: "<<
color_counter_ << std::endl;
96 std::cout<<
"Number of called to DepthCallback: "<<
depth_counter_ << std::endl;
void IRCallback(sensor_msgs::ImagePtr image)
void DepthCallback(sensor_msgs::ImagePtr image)
void ColorCallback(sensor_msgs::ImagePtr image)