diff --git a/corelib/src/CMakeLists.txt b/corelib/src/CMakeLists.txt index f43d818b..5c46f432 100644 --- a/corelib/src/CMakeLists.txt +++ b/corelib/src/CMakeLists.txt @@ -820,10 +820,6 @@ ADD_CUSTOM_COMMAND( add_definitions(${PCL_DEFINITIONS}) - -# Make sure the compiler can find include files from our library. -INCLUDE_DIRECTORIES(${INCLUDE_DIRS}) - # Add binary that is built from the source file "main.cpp". # The extension is automatically found. ADD_LIBRARY(rtabmap_core ${SRC_FILES} ${RESOURCES_HEADERS}) @@ -833,7 +829,7 @@ generate_export_header(rtabmap_core DEPRECATED_MACRO_NAME RTABMAP_DEPRECATED) target_include_directories(rtabmap_core PUBLIC - "$" + "$" "$") TARGET_LINK_LIBRARIES(rtabmap_core diff --git a/corelib/src/camera/CameraStereoZed.cpp b/corelib/src/camera/CameraStereoZed.cpp index 15416afa..f3dadb95 100644 --- a/corelib/src/camera/CameraStereoZed.cpp +++ b/corelib/src/camera/CameraStereoZed.cpp @@ -219,7 +219,7 @@ private: sl::ERROR_CODE res = zed_->getSensorsData(sensordata, sl::TIME_REFERENCE::CURRENT); if(res == sl::ERROR_CODE::SUCCESS && sensordata.imu.is_available) { - camera_->postInterIMUPublic(zedIMUtoIMU(sensordata, imuLocalTransform_), double(sensordata.imu.timestamp)/10e9); + camera_->postInterIMUPublic(zedIMUtoIMU(sensordata, imuLocalTransform_), double(sensordata.imu.timestamp.getNanoseconds())/10e8); } #endif } @@ -715,7 +715,7 @@ SensorData CameraStereoZed::captureImage(SensorCaptureInfo * info) { sl::SensorsData imudatatmp; res = zed_->getSensorsData(imudatatmp, sl::TIME_REFERENCE::IMAGE); - imuReceived = res == sl::ERROR_CODE::SUCCESS && imudatatmp.imu.is_available && imudatatmp.imu.timestamp.data_ns != 0; + imuReceived = res == sl::ERROR_CODE::SUCCESS && imudatatmp.imu.is_available && imudatatmp.imu.timestamp.getNanoseconds() != 0; } } while(src_ == CameraVideo::kUsbDevice && (res!=sl::ERROR_CODE::SUCCESS || !imuReceived) && timer.elapsed() < 2.0); @@ -749,8 +749,9 @@ SensorData CameraStereoZed::captureImage(SensorCaptureInfo * info) #if ZED_SDK_MAJOR_VERSION < 3 data = SensorData(left, depth, stereoModel_.left(), this->getNextSeqID(), UTimer::now()); #else - data = SensorData(left, depth, stereoModel_.left(), this->getNextSeqID(), double(timestamp)/10e9); + data = SensorData(left, depth, stereoModel_.left(), this->getNextSeqID(), double(timestamp.getNanoseconds())/10e8); #endif + UWARN("data stamp = %f", data.stamp()); } else { @@ -766,7 +767,7 @@ SensorData CameraStereoZed::captureImage(SensorCaptureInfo * info) #if ZED_SDK_MAJOR_VERSION < 3 data = SensorData(left, right, stereoModel_, this->getNextSeqID(), UTimer::now()); #else - data = SensorData(left, right, stereoModel_, this->getNextSeqID(), double(timestamp)/10e9); + data = SensorData(left, right, stereoModel_, this->getNextSeqID(), double(timestamp.getNanoseconds())/10e8); #endif } diff --git a/guilib/src/CalibrationDialog.cpp b/guilib/src/CalibrationDialog.cpp index 07002c03..dd4a0523 100644 --- a/guilib/src/CalibrationDialog.cpp +++ b/guilib/src/CalibrationDialog.cpp @@ -161,8 +161,10 @@ CalibrationDialog::CalibrationDialog(bool stereo, const QString & savingDirector #ifndef HAVE_CHARUCO ui_->comboBox_board_type->setItemData(1, 0, Qt::UserRole - 1); ui_->comboBox_board_type->setItemData(2, 0, Qt::UserRole - 1); -#elif CV_MAJOR_VERSION < 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION < 7) +#elif CV_MAJOR_VERSION < 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION < 6) ui_->comboBox_board_type->setItemData(2, 0, Qt::UserRole - 1); +#elif CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION < 8 + ui_->comboBox_board_type->setItemData(1, 0, Qt::UserRole - 1); #endif } @@ -1289,7 +1291,9 @@ void CalibrationDialog::restart() ui_->doubleSpinBox_squareSize->value(), ui_->doubleSpinBox_markerLength->value(), *markerDictionary_)); +#if CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 8) charucoBoard_->setLegacyPattern(ui_->comboBox_board_type->currentIndex()==1); +#endif arucoDetector_.reset(new cv::aruco::ArucoDetector(*markerDictionary_, *arucoDetectorParams_)); charucoDetector_.reset(new cv::aruco::CharucoDetector(*charucoBoard_, cv::aruco::CharucoParameters(), *arucoDetectorParams_)); #else