From 4450e5c5227b491207b03bb9c8e338d36016094e Mon Sep 17 00:00:00 2001 From: Keenan Albee Date: Tue, 30 Nov 2021 18:23:16 -0800 Subject: [PATCH 1/2] Add: newline before cmake append in configure.sh. configure.sh does not correctly append if ./bashrc does not end in a newline as-is. (#351) --- scripts/configure.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index 5d744afce2..7c648e1ac5 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -309,8 +309,10 @@ if [ $native_build == 1 ] ; then # Add our cmake to paths and bashrc grep -qF 'source /opt/ros/'$ros_version'/setup.bash' ~/.bashrc || echo 'source /opt/ros/'$ros_version'/setup.bash' >> ~/.bashrc cmake_astrobee_path=`catkin locate -s`/cmake - grep -qF ${cmake_astrobee_path} ~/.bashrc \ - || echo 'if [[ ":$CMAKE_PREFIX_PATH:" != *":'${cmake_astrobee_path}':"* ]]; then CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+"$CMAKE_PREFIX_PATH:"}'${cmake_astrobee_path}'"; fi' >> ~/.bashrc + grep -qF ${cmake_astrobee_path} ~/.bashrc || { + echo -e '\n' >> ~/.bashrc \ + echo 'if [[ ":$CMAKE_PREFIX_PATH:" != *":'${cmake_astrobee_path}':"* ]]; then CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+"$CMAKE_PREFIX_PATH:"}'${cmake_astrobee_path}'"; fi' >> ~/.bashrc + } source ~/.bashrc catkin profile add native From 03e9ee48cab9ea7bc3c23d25d7cf27107d2fa602 Mon Sep 17 00:00:00 2001 From: Oleg Alexandrov Date: Wed, 1 Dec 2021 15:36:17 -0800 Subject: [PATCH 2/2] Require OpenCV 3.3.1 (#350) --- cmake/FindOpenCV331.cmake | 2 +- localization/handrail_detect/CMakeLists.txt | 2 +- localization/vive_localization/CMakeLists.txt | 2 +- management/image_sampler/CMakeLists.txt | 2 +- tools/calibration/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/FindOpenCV331.cmake b/cmake/FindOpenCV331.cmake index 143cd9a47d..02b4a6fcbd 100644 --- a/cmake/FindOpenCV331.cmake +++ b/cmake/FindOpenCV331.cmake @@ -16,7 +16,7 @@ # under the License. # Find OpenCV and fix a 3.3.1 bug -find_package(OpenCV 3 REQUIRED) +find_package(OpenCV 3.3.1 REQUIRED) if (USE_CTC) if (${OpenCV_VERSION} MATCHES "3.3.1") foreach(__cvcomponent ${OpenCV_LIB_COMPONENTS}) diff --git a/localization/handrail_detect/CMakeLists.txt b/localization/handrail_detect/CMakeLists.txt index c268d88d81..36f2706e3c 100644 --- a/localization/handrail_detect/CMakeLists.txt +++ b/localization/handrail_detect/CMakeLists.txt @@ -32,7 +32,7 @@ find_package(catkin2 REQUIRED COMPONENTS ) # Find OpenCV3 -find_package(OpenCV 3 REQUIRED) +find_package(OpenCV 3.3.1 REQUIRED) catkin_package( LIBRARIES ${PROJECT_NAME} diff --git a/localization/vive_localization/CMakeLists.txt b/localization/vive_localization/CMakeLists.txt index e8d8bfdf1c..eb85937dd4 100644 --- a/localization/vive_localization/CMakeLists.txt +++ b/localization/vive_localization/CMakeLists.txt @@ -38,7 +38,7 @@ find_package(Eigen3 REQUIRED) # Find OpenCV3 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake") -find_package(OpenCV 3 REQUIRED) +find_package(OpenCV 3.3.1 REQUIRED) # Non-linear optimizer find_package(Ceres REQUIRED) diff --git a/management/image_sampler/CMakeLists.txt b/management/image_sampler/CMakeLists.txt index 546317542b..a2088b55fd 100644 --- a/management/image_sampler/CMakeLists.txt +++ b/management/image_sampler/CMakeLists.txt @@ -32,7 +32,7 @@ find_package(catkin2 REQUIRED COMPONENTS ) # Find OpenCV3 -find_package(OpenCV 3 REQUIRED) +find_package(OpenCV 3.3.1 REQUIRED) catkin_package( LIBRARIES image_sampler diff --git a/tools/calibration/CMakeLists.txt b/tools/calibration/CMakeLists.txt index 5327388230..dd48d3a5e9 100644 --- a/tools/calibration/CMakeLists.txt +++ b/tools/calibration/CMakeLists.txt @@ -31,7 +31,7 @@ find_package(catkin2 REQUIRED COMPONENTS # Find OpenCV3 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake") -find_package(OpenCV 3 REQUIRED) +find_package(OpenCV 3.3.1 REQUIRED) find_package(Eigen3 REQUIRED)