Skip to content

Commit

Permalink
Edited the settings for the release for ROS Noetic
Browse files Browse the repository at this point in the history
Edited the codes
(Ref: PRBonn#69)
  • Loading branch information
kimkt0408 committed Nov 9, 2023
1 parent 2a824e7 commit 1d9d1e7
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 29 deletions.
30 changes: 16 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ 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)

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")

Expand All @@ -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)

Expand Down Expand Up @@ -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}
Expand Down
3 changes: 2 additions & 1 deletion src/clusterers/image_based_clusterer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
#include <chrono>
#include <ctime>
#include <map>
#include <opencv/cv.h>
// #include <opencv/cv.h>
#include <opencv2/imgproc.hpp> // For ROS Noetic
#include <string>
#include <unordered_map>
#include <vector>
Expand Down
3 changes: 2 additions & 1 deletion src/ground_removal/depth_ground_remover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

#include "./depth_ground_remover.h"

#include <opencv2/highgui/highgui.hpp>
// #include <opencv2/highgui/highgui.hpp>
#include<opencv2/highgui/highgui_c.h> // For ROS Noetic

#include <algorithm>

Expand Down
7 changes: 5 additions & 2 deletions src/image_labelers/abstract_image_labeler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@

#include "./abstract_image_labeler.h"

#include <opencv/cv.h>
#include <opencv/highgui.h>
// #include <opencv/cv.h>
// #include <opencv/highgui.h>

#include <opencv2/imgproc.hpp>
#include <opencv2/highgui/highgui_c.h>

#include <memory>
#include <queue>
Expand Down
8 changes: 6 additions & 2 deletions src/image_labelers/dijkstra_image_labeler.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
#ifndef SRC_IMAGE_LABELERS_DIJKSTRA_IMAGE_LABELER_H_
#define SRC_IMAGE_LABELERS_DIJKSTRA_IMAGE_LABELER_H_

#include <opencv/cv.h>
#include <opencv/highgui.h>
// #include <opencv/cv.h>
// #include <opencv/highgui.h>

#include <opencv2/imgproc.hpp>
#include <opencv2/highgui/highgui_c.h>


#include <string>
#include <queue>
Expand Down
7 changes: 5 additions & 2 deletions src/projections/cloud_projection.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
#ifndef SRC_PROJECTIONS_CLOUD_PROJECTION_H_
#define SRC_PROJECTIONS_CLOUD_PROJECTION_H_

#include <opencv/cv.h>
#include <opencv/highgui.h>
// #include <opencv/cv.h>
// #include <opencv/highgui.h>

#include <opencv2/imgproc.hpp> // For ROS Noetic
#include <opencv2/highgui/highgui_c.h>

#include <Eigen/Core>

Expand Down
3 changes: 2 additions & 1 deletion src/projections/ring_projection.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#ifndef SRC_PROJECTIONS_RING_PROJECTION_H_
#define SRC_PROJECTIONS_RING_PROJECTION_H_

#include <opencv/cv.h>
// #include <opencv/cv.h>
#include <opencv2/imgproc.hpp> // For ROS Noetic

#include <vector>

Expand Down
3 changes: 2 additions & 1 deletion src/projections/spherical_projection.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#ifndef SRC_PROJECTIONS_SPHERICAL_PROJECTION_H_
#define SRC_PROJECTIONS_SPHERICAL_PROJECTION_H_

#include <opencv/cv.h>
// #include <opencv/cv.h>
#include <opencv2/imgproc.hpp> // ROS Noetic

#include <vector>

Expand Down
1 change: 1 addition & 0 deletions src/qt/drawables/object_painter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <unordered_map>
#include <vector>

// #include <opencv/cv.h>
#include <opencv2/imgproc.hpp>

namespace depth_clustering {
Expand Down
3 changes: 2 additions & 1 deletion src/utils/cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ typename pcl::PointCloud<pcl::PointXYZL>::Ptr Cloud::ToPcl() const {
pcl_point.label = point.ring();
pcl_cloud.push_back(pcl_point);
}
return make_shared<PclCloud>(pcl_cloud);
// return make_shared<PclCloud>(pcl_cloud);
return boost::make_shared<PclCloud>(pcl_cloud); // For ROS Noetic
}

template <>
Expand Down
10 changes: 7 additions & 3 deletions src/utils/velodyne_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>

#include <opencv/cv.h>
#include <opencv/highgui.h>
// #include <opencv/cv.h>
// #include <opencv/highgui.h>

#include <opencv2/imgproc.hpp>
#include <opencv2/highgui/highgui_c.h>

#include <cassert>
#include <fstream>
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion test/test_image_clusterer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
// DEALINGS IN THE SOFTWARE.

#include <gtest/gtest.h>
#include <opencv/cv.h>
// #include <opencv/cv.h>
#include <opencv2/imgproc.hpp> // For ROS Noetic

#include <string>
#include <vector>
Expand Down

0 comments on commit 1d9d1e7

Please sign in to comment.