35 #include <boost/lexical_cast.hpp>
36 #include <boost/algorithm/string/replace.hpp>
46 #include <boost/shared_ptr.hpp>
47 #include <boost/make_shared.hpp>
57 ir_video_started_(false),
58 color_video_started_(false),
59 depth_video_started_(false),
60 image_registration_activated_(false),
61 use_device_time_(false)
69 if (device_URI.length() > 0)
165 boost::replace_all(ID_str,
"/",
"");
166 boost::replace_all(ID_str,
".",
"");
167 boost::replace_all(ID_str,
"@",
"");
239 int laser_enable = 1;
274 depth_stream->stop();
277 depth_stream->start();
292 float focal_length = 0.0f;
297 focal_length = (float)output_y_resolution / (2 * tan(stream->getVerticalFieldOfView() / 2));
305 float focal_length = 0.0f;
310 focal_length = (float)output_y_resolution / (2 * tan(stream->getVerticalFieldOfView() / 2));
318 float focal_length = 0.0f;
323 focal_length = (float)output_y_resolution / (2 * tan(stream->getVerticalFieldOfView() / 2));
338 bool supported =
false;
340 std::vector<AstraVideoMode>::const_iterator it =
ir_video_modes_.begin();
341 std::vector<AstraVideoMode>::const_iterator it_end =
ir_video_modes_.end();
343 while (it != it_end && !supported)
345 supported = (*it == video_mode);
356 bool supported =
false;
361 while (it != it_end && !supported)
363 supported = (*it == video_mode);
374 bool supported =
false;
379 while (it != it_end && !supported)
381 supported = (*it == video_mode);
410 stream->setMirroringEnabled(
false);
424 stream->setMirroringEnabled(
false);
436 stream->setMirroringEnabled(
false);
825 stream <<
"Device info (" << device.
getUri() <<
")" << std::endl;
826 stream <<
" Vendor: " << device.
getVendor() << std::endl;
827 stream <<
" Name: " << device.
getName() << std::endl;
828 stream <<
" USB Vendor ID: " << device.
getUsbVendorId() << std::endl;
829 stream <<
" USB Product ID: " << device.
getUsbVendorId() << std::endl << std::endl;
833 stream <<
"IR sensor video modes:" << std::endl;
836 std::vector<AstraVideoMode>::const_iterator it = video_modes.begin();
837 std::vector<AstraVideoMode>::const_iterator it_end = video_modes.end();
838 for (; it != it_end; ++it)
839 stream <<
" - " << *it << std::endl;
843 stream <<
"No IR sensor available" << std::endl;
848 stream <<
"Color sensor video modes:" << std::endl;
851 std::vector<AstraVideoMode>::const_iterator it = video_modes.begin();
852 std::vector<AstraVideoMode>::const_iterator it_end = video_modes.end();
853 for (; it != it_end; ++it)
854 stream <<
" - " << *it << std::endl;
858 stream <<
"No Color sensor available" << std::endl;
863 stream <<
"Depth sensor video modes:" << std::endl;
866 std::vector<AstraVideoMode>::const_iterator it = video_modes.begin();
867 std::vector<AstraVideoMode>::const_iterator it_end = video_modes.end();
868 for (; it != it_end; ++it)
869 stream <<
" - " << *it << std::endl;
873 stream <<
"No Depth sensor available" << std::endl;