From 1e5dad17b0c0ec758d76615371f6880952a4ee18 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Sat, 20 Jul 2019 21:12:19 +0300 Subject: [PATCH] Realsense only works in release mode due to their bug --- components/rgbd-sources/src/realsense_source.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/rgbd-sources/src/realsense_source.cpp b/components/rgbd-sources/src/realsense_source.cpp index 64b0d3282..08967ae78 100644 --- a/components/rgbd-sources/src/realsense_source.cpp +++ b/components/rgbd-sources/src/realsense_source.cpp @@ -33,7 +33,7 @@ RealsenseSource::RealsenseSource(ftl::rgbd::Source *host) params_.maxDepth = 11.0; params_.minDepth = 0.1; - //LOG(INFO) << "Realsense Intrinsics: " << params_.fx << "," << params_.fy << " - " << params_.cx << "," << params_.cy << " - " << params_.width; + LOG(INFO) << "Realsense Intrinsics: " << params_.fx << "," << params_.fy << " - " << params_.cx << "," << params_.cy << " - " << params_.width; } RealsenseSource::~RealsenseSource() { @@ -41,9 +41,12 @@ RealsenseSource::~RealsenseSource() { } bool RealsenseSource::grab(int n, int b) { - rs2::frameset frames = pipe_.wait_for_frames(); - //rs2::align align(RS2_STREAM_DEPTH); - //frames = align_to_depth_.process(frames); //align_to_depth_.process(frames); + rs2::frameset frames; + if (!pipe_.poll_for_frames(&frames)) return false; //wait_for_frames(); + + //std::this_thread::sleep_for(std::chrono::milliseconds(10000)); + + frames = align_to_depth_.process(frames); rs2::depth_frame depth = frames.get_depth_frame(); float w = depth.get_width(); -- GitLab