36 #include <boost/date_time/posix_time/posix_time.hpp> 37 #include <boost/thread/thread.hpp> 38 #include <boost/foreach.hpp> 68 std::cout << device_manager;
72 BOOST_FOREACH(
const std::string& uri, *device_uris)
78 device->setIRFrameCallback(boost::bind(&
IRCallback, _1));
79 device->setColorFrameCallback(boost::bind(&
ColorCallback, _1));
80 device->setDepthFrameCallback(boost::bind(&
DepthCallback, _1));
86 device->startColorStream();
87 device->startDepthStream();
89 boost::this_thread::sleep(boost::posix_time::milliseconds(1000));
91 device->stopAllStreams();
95 std::cout<<
"Number of called to IRCallback: "<<
ir_counter_ << std::endl;
96 std::cout<<
"Number of called to ColorCallback: "<<
color_counter_ << std::endl;
97 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)