From 70da8d26c0be555f5b9a9526ac30fe4caec3f67d Mon Sep 17 00:00:00 2001 From: matlabbe Date: Thu, 23 Jun 2016 15:40:11 -0400 Subject: [PATCH] Fixed build with ZED SDK 1.0.0 (#85) --- corelib/src/CameraStereo.cpp | 31 +++++----- guilib/src/ui/preferencesDialog.ui | 92 ++++++++++++++++++++++++++---- 2 files changed, 98 insertions(+), 25 deletions(-) diff --git a/corelib/src/CameraStereo.cpp b/corelib/src/CameraStereo.cpp index 8389079c..5496e899 100644 --- a/corelib/src/CameraStereo.cpp +++ b/corelib/src/CameraStereo.cpp @@ -766,9 +766,9 @@ CameraStereoZed::CameraStereoZed( confidenceThr_(confidenceThr) { #ifdef RTABMAP_ZED - UASSERT(resolution_ >= sl::zed::HD2K && resolution_ <=sl::zed::VGA); - UASSERT(quality_ >= sl::zed::NONE && quality_ <=sl::zed::QUALITY); - UASSERT(sensingMode_ >= sl::zed::FULL && sensingMode_ <=sl::zed::RAW); + UASSERT(resolution_ >= sl::zed::HD2K && resolution_ = sl::zed::NONE && quality_ = sl::zed::FILL && sensingMode_ = 0 && confidenceThr_ <=100); #endif } @@ -791,9 +791,9 @@ CameraStereoZed::CameraStereoZed( confidenceThr_(confidenceThr) { #ifdef RTABMAP_ZED - UASSERT(resolution_ >= sl::zed::HD2K && resolution_ <=sl::zed::VGA); - UASSERT(quality_ >= sl::zed::NONE && quality_ <=sl::zed::QUALITY); - UASSERT(sensingMode_ >= sl::zed::FULL && sensingMode_ <=sl::zed::RAW); + UASSERT(resolution_ >= sl::zed::HD2K && resolution_ = sl::zed::NONE && quality_ = sl::zed::FILL && sensingMode_ = 0 && confidenceThr_ <=100); #endif } @@ -835,11 +835,17 @@ bool CameraStereoZed::init(const std::string & calibrationFolder, const std::str } } - //init WITH self-calibration (- last parameter to false -) - sl::zed::ERRCODE err = zed_->init( - (sl::zed::MODE)quality_, - -1, // search for any GPU - true, false, false); + //init WITH self-calibration + sl::zed::InitParams parameters( + (sl::zed::MODE)quality_, //MODE + sl::zed::METER, //UNIT + sl::zed::IMAGE, //COORDINATE_SYSTEM + false, // verbose + -1, //device + -1., //minDist + false, //disableSelfCalib + false); //vflip + sl::zed::ERRCODE err = zed_->init(parameters); // Quit if an error occurred if (err != sl::zed::SUCCESS) @@ -860,7 +866,7 @@ bool CameraStereoZed::init(const std::string & calibrationFolder, const std::str stereoParams->LeftCam.fy, stereoParams->LeftCam.cx, stereoParams->LeftCam.cy, - stereoParams->baseline/1000.0f, + stereoParams->baseline, this->getLocalTransform(), cv::Size(res.width, res.height)); @@ -913,7 +919,6 @@ SensorData CameraStereoZed::captureImage() // get depth image cv::Mat depth; slMat2cvMat(zed_->retrieveMeasure(sl::zed::MEASURE::DEPTH)).copyTo(depth); - depth /= 1000.0; // to meters data = SensorData(left, depth, stereoModel_.left(), this->getNextSeqID(), UTimer::now()); } diff --git a/guilib/src/ui/preferencesDialog.ui b/guilib/src/ui/preferencesDialog.ui index 283baa0c..ab88247e 100644 --- a/guilib/src/ui/preferencesDialog.ui +++ b/guilib/src/ui/preferencesDialog.ui @@ -63,16 +63,25 @@ 0 - -477 - 686 - 2023 + -265 + 685 + 1826 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -3034,12 +3043,12 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki - FULL + FILL - RAW + STANDARD @@ -3111,6 +3120,11 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki PERFORMANCE + + + MEDIUM + + QUALITY @@ -3628,7 +3642,16 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki Directory of images (optional settings) - + + 0 + + + 0 + + + 0 + + 0 @@ -8785,7 +8808,16 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag - + + 0 + + + 0 + + + 0 + + 0 @@ -8925,7 +8957,16 @@ Lower the ratio -> higher the precision. 0 means disabled, matching the neare - + + 0 + + + 0 + + + 0 + + 0 @@ -9083,7 +9124,16 @@ Lower the ratio -> higher the precision. 0 means disabled, matching the neare 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -9163,7 +9213,16 @@ Lower the ratio -> higher the precision. 0 means disabled, matching the neare 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -9275,7 +9334,16 @@ Lower the ratio -> higher the precision. 0 means disabled, matching the neare 0 - + + 0 + + + 0 + + + 0 + + 0