diff --git a/CMakeLists.txt b/CMakeLists.txt index d0bba57..31dd080 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,8 @@ include(DistVersion.cmake) system_info(DISTRO) message(STATUS "DISTRO: ${DISTRO}") -set(CMAKE_CXX_STANDARD 11) +# set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) # For ROS Noetic set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) @@ -33,7 +34,8 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -set(CMAKE_CXX_FLAGS "-Wall -Wextra -fPIC") +# set(CMAKE_CXX_FLAGS "-Wall -Wextra -fPIC") +set(CMAKE_CXX_FLAGS "-Wall -Wextra -fPIC -pthread") # For ROS Noetic set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") set(CMAKE_CXX_FLAGS_RELEASE "-O3") @@ -50,19 +52,19 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) include(CTest) -IF(IS_DIRECTORY "/usr/src/gtest/") - MESSAGE(STATUS "Found google test sources in /usr/src/gtest/") +# IF(IS_DIRECTORY "/usr/src/gtest/") +# MESSAGE(STATUS "Found google test sources in /usr/src/gtest/") - ADD_SUBDIRECTORY(/usr/src/gtest/ gtest) +# ADD_SUBDIRECTORY(/usr/src/gtest/ gtest) - # mimick the behaviour of find_package(GTest) - SET(GTEST_FOUND TRUE) - SET(GTEST_BOTH_LIBRARIES gtest gtest_main) - SET(GTEST_LIBRARIES gtest) - SET(GTEST_MAIN_LIBRARIES gtest_main) -ELSE() - find_package(GTest) -ENDIF() +# # mimick the behaviour of find_package(GTest) +# SET(GTEST_FOUND TRUE) +# SET(GTEST_BOTH_LIBRARIES gtest gtest_main) +# SET(GTEST_LIBRARIES gtest) +# SET(GTEST_MAIN_LIBRARIES gtest_main) +# ELSE() +# find_package(GTest) +# ENDIF() set(Boost_USE_STATIC_LIBS OFF) @@ -90,7 +92,7 @@ if(${DISTRO} MATCHES "14.04") Qt4::QtXml Qt4::QtOpenGL Qt4::QtGui) -elseif(${DISTRO} MATCHES "16.04" OR ${DISTRO} MATCHES "18.04") +elseif(${DISTRO} MATCHES "16.04" OR ${DISTRO} MATCHES "18.04" OR ${DISTRO} MATCHES "20.04") find_package(Qt5 REQUIRED COMPONENTS Core Xml OpenGL Gui Widgets) include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} diff --git a/src/clusterers/image_based_clusterer.h b/src/clusterers/image_based_clusterer.h index 626372c..cd90f4f 100644 --- a/src/clusterers/image_based_clusterer.h +++ b/src/clusterers/image_based_clusterer.h @@ -24,7 +24,8 @@ #include #include #include -#include +// #include +#include // For ROS Noetic #include #include #include diff --git a/src/ground_removal/depth_ground_remover.cpp b/src/ground_removal/depth_ground_remover.cpp index 2621f74..4d59ddd 100644 --- a/src/ground_removal/depth_ground_remover.cpp +++ b/src/ground_removal/depth_ground_remover.cpp @@ -20,7 +20,8 @@ #include "./depth_ground_remover.h" -#include +// #include +#include // For ROS Noetic #include diff --git a/src/image_labelers/abstract_image_labeler.cpp b/src/image_labelers/abstract_image_labeler.cpp index 76b53c9..3afbee3 100644 --- a/src/image_labelers/abstract_image_labeler.cpp +++ b/src/image_labelers/abstract_image_labeler.cpp @@ -20,8 +20,11 @@ #include "./abstract_image_labeler.h" -#include -#include +// #include +// #include + +#include +#include #include #include diff --git a/src/image_labelers/dijkstra_image_labeler.h b/src/image_labelers/dijkstra_image_labeler.h index f2705eb..e5321c3 100644 --- a/src/image_labelers/dijkstra_image_labeler.h +++ b/src/image_labelers/dijkstra_image_labeler.h @@ -21,8 +21,12 @@ #ifndef SRC_IMAGE_LABELERS_DIJKSTRA_IMAGE_LABELER_H_ #define SRC_IMAGE_LABELERS_DIJKSTRA_IMAGE_LABELER_H_ -#include -#include +// #include +// #include + +#include +#include + #include #include diff --git a/src/projections/cloud_projection.h b/src/projections/cloud_projection.h index bb1b49c..30c3657 100644 --- a/src/projections/cloud_projection.h +++ b/src/projections/cloud_projection.h @@ -21,8 +21,11 @@ #ifndef SRC_PROJECTIONS_CLOUD_PROJECTION_H_ #define SRC_PROJECTIONS_CLOUD_PROJECTION_H_ -#include -#include +// #include +// #include + +#include // For ROS Noetic +#include #include diff --git a/src/projections/ring_projection.h b/src/projections/ring_projection.h index 0bd9931..baed491 100644 --- a/src/projections/ring_projection.h +++ b/src/projections/ring_projection.h @@ -21,7 +21,8 @@ #ifndef SRC_PROJECTIONS_RING_PROJECTION_H_ #define SRC_PROJECTIONS_RING_PROJECTION_H_ -#include +// #include +#include // For ROS Noetic #include diff --git a/src/projections/spherical_projection.h b/src/projections/spherical_projection.h index f6ffb3b..3c7ad29 100644 --- a/src/projections/spherical_projection.h +++ b/src/projections/spherical_projection.h @@ -21,7 +21,8 @@ #ifndef SRC_PROJECTIONS_SPHERICAL_PROJECTION_H_ #define SRC_PROJECTIONS_SPHERICAL_PROJECTION_H_ -#include +// #include +#include // ROS Noetic #include diff --git a/src/qt/drawables/object_painter.h b/src/qt/drawables/object_painter.h index 1b3d8c8..387599f 100644 --- a/src/qt/drawables/object_painter.h +++ b/src/qt/drawables/object_painter.h @@ -34,6 +34,7 @@ #include #include +// #include #include namespace depth_clustering { diff --git a/src/utils/cloud.cpp b/src/utils/cloud.cpp index 641bd8d..53bf507 100644 --- a/src/utils/cloud.cpp +++ b/src/utils/cloud.cpp @@ -114,7 +114,8 @@ typename pcl::PointCloud::Ptr Cloud::ToPcl() const { pcl_point.label = point.ring(); pcl_cloud.push_back(pcl_point); } - return make_shared(pcl_cloud); + // return make_shared(pcl_cloud); + return boost::make_shared(pcl_cloud); // For ROS Noetic } template <> diff --git a/src/utils/velodyne_utils.cpp b/src/utils/velodyne_utils.cpp index 116e0c9..342764d 100644 --- a/src/utils/velodyne_utils.cpp +++ b/src/utils/velodyne_utils.cpp @@ -23,8 +23,11 @@ #include #include -#include -#include +// #include +// #include + +#include +#include #include #include @@ -113,7 +116,8 @@ cv::Mat FixKITTIDepth(const cv::Mat& original) { } cv::Mat MatFromDepthPng(const string& path) { - cv::Mat depth_image = cv::imread(path, CV_LOAD_IMAGE_ANYDEPTH); + // cv::Mat depth_image = cv::imread(path, CV_LOAD_IMAGE_ANYDEPTH); + cv::Mat depth_image = cv::imread(path, cv::IMREAD_ANYDEPTH); // For ROS Noetic depth_image.convertTo(depth_image, CV_32F); depth_image /= 500.; return FixKITTIDepth(depth_image); diff --git a/test/test_image_clusterer.cpp b/test/test_image_clusterer.cpp index aa8246c..29165f4 100644 --- a/test/test_image_clusterer.cpp +++ b/test/test_image_clusterer.cpp @@ -19,7 +19,8 @@ // DEALINGS IN THE SOFTWARE. #include -#include +// #include +#include // For ROS Noetic #include #include