40 #include <pcl/pcl_exports.h>
42 #include <pxcsession.h>
43 #include <pxccapture.h>
44 #include <pxccapturemanager.h>
46 #include <boost/utility.hpp>
53 class RealSenseGrabber;
68 using Ptr = std::shared_ptr<RealSenseDeviceManager>;
76 std::lock_guard<std::mutex> lock (mutex_);
86 return (device_list_.size ());
89 std::shared_ptr<RealSenseDevice>
92 std::shared_ptr<RealSenseDevice>
93 captureDevice (std::size_t index);
95 std::shared_ptr<RealSenseDevice>
96 captureDevice (
const std::string& sn);
107 std::weak_ptr<RealSenseDevice> device_ptr;
108 inline bool isCaptured () {
return (!device_ptr.expired ()); }
112 std::shared_ptr<RealSenseDevice>
113 capture (DeviceInfo& device_info);
115 RealSenseDeviceManager ();
120 populateDeviceList ();
122 std::shared_ptr<PXCSession> session_;
123 std::shared_ptr<PXCCaptureManager> capture_manager_;
125 std::vector<DeviceInfo> device_list_;
127 static std::mutex mutex_;
136 using Ptr = std::shared_ptr<RealSenseDevice>;
138 inline const std::string&
141 inline PXCCapture::Device&
148 std::string
id = device->getSerialNumber ();
157 std::string device_id_;
158 std::shared_ptr<PXCCapture> capture_;
159 std::shared_ptr<PXCCapture::Device> device_;