From dd06f7bbf1b74346b619b44dbcdcdb25b9f6eef1 Mon Sep 17 00:00:00 2001 From: LaurentWang Date: Sun, 25 Apr 2021 18:28:39 +0800 Subject: [PATCH] [fix] fixed vision lidar fusion preview opencv link error on AGX Xavier. --- .../src/Perception/vision_lidar_fusion/CMakeLists.txt | 9 ++++++++- .../launch/vision_lidar_fusion.launch | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/algorithms/src/Perception/vision_lidar_fusion/CMakeLists.txt b/algorithms/src/Perception/vision_lidar_fusion/CMakeLists.txt index 063f1e4f..68c4b747 100644 --- a/algorithms/src/Perception/vision_lidar_fusion/CMakeLists.txt +++ b/algorithms/src/Perception/vision_lidar_fusion/CMakeLists.txt @@ -2,13 +2,20 @@ cmake_minimum_required(VERSION 2.8.3) project(vision_lidar_fusion) ## Compile as C++11, supported in ROS Kinetic and newer +#add_compile_options(-std=c++11 -O0) add_compile_options(-std=c++11 -O3) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages +#set(CMAKE_BUILD_TYPE DEBUG) set(CMAKE_BUILD_TYPE RELEASE) -find_package(OpenCV 3.4.5 REQUIRED) +if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64") + find_package(OpenCV 3.4.5 REQUIRED) +else() + set (OpenCV_DIR /home/gi/nvme/opencv-3.4.5/build) +endif() + find_package(PCL 1.8 REQUIRED) #find_package(PCL REQUIRED) find_package(Glog REQUIRED) diff --git a/algorithms/src/Perception/vision_lidar_fusion/launch/vision_lidar_fusion.launch b/algorithms/src/Perception/vision_lidar_fusion/launch/vision_lidar_fusion.launch index 12bb3044..1cbe5e70 100644 --- a/algorithms/src/Perception/vision_lidar_fusion/launch/vision_lidar_fusion.launch +++ b/algorithms/src/Perception/vision_lidar_fusion/launch/vision_lidar_fusion.launch @@ -5,7 +5,7 @@ - +