Closed Cmomo1113 closed 5 months ago
config.sh parameter settings
export USE_CUDA=0 # use CUDA in PLVS sparse SLAM
export CUDA_VERSION="cuda-11.6" # must be an installed CUDA path in "/usr/local";
if [ ! -d /usr/local/$CUDA_VERSION ]; then CUDA_VERSION="cuda" # use last installed CUDA path in standard path as a fallback fi
export PATH=/usr/local/$CUDA_VERSION/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/$CUDA_VERSION/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} export CUDADIR=/usr/local/$CUDA_VERSION
Hi,
thanks for your feedback.
Could you please share the full config.sh file or your modifications?
I am not sure if you are using export USE_LOCAL_OPENCV=1
or not. In your case, since you are getting those errors, I suggest letting the build script install a local opencv (if you didn't do that).
Let me know.
source bash_utils.sh
CONFIG_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) CONFIG_DIR=$(readlink -f $CONFIG_DIR) # this reads the actual path if a symbolic directory is used cd $CONFIG_DIR # this brings us in the actual folder of this config script (not the symbolic one)
export CPP_STANDARD_VERSION=17 # we need c++17 since nvcc does not support c++20 yet (probably we can try mixing c++ standards and just let nvcc use c++17 ... not sure this is the best choice)
export USE_LOCAL_OPENCV=1 # use a local installation of OpenCV
export OPENCV_VERSION=4
export USE_CUDA=0 # use CUDA in PLVS sparse SLAM
export CUDA_VERSION="cuda-11.6" # must be an installed CUDA path in "/usr/local";
if [ ! -d /usr/local/$CUDA_VERSION ]; then CUDA_VERSION="cuda" # use last installed CUDA path in standard path as a fallback fi
export PATH=/usr/local/$CUDA_VERSION/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/$CUDA_VERSION/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} export CUDADIR=/usr/local/$CUDA_VERSION
export DATASETS_FOLDER="~/Work/datasets/rgbd_datasets/tum/"
export INSTALL_CATKIN_TOOLS=1 # now this is compulsory
export USE_ELAS_ROS=0
export USE_ZED_CAMERA=0 # ( you need to install the last zed camera SDK) export USE_REALSENSE_D435=0 export USE_OAK=0
export HAVE_SSE3=$(gcc -march=native -dM -E - </dev/null | grep SSE3 || :) export HAVE_SSE4=$(gcc -march=native -dM -E - </dev/null | grep SSE4 || :) export HAVE_AVX=$(gcc -march=native -dM -E - </dev/null | grep AVX || : )
export CUDA_FOUND=0 if [ -f /usr/local/$CUDA_VERSION/bin/nvcc ] || [ -f /usr/bin/nvcc ]; then CUDA_FOUND=1 echo "CUDA found: $CUDA_VERSION" fi
if [ $CUDA_FOUND -eq 0 ]; then USE_CUDA=0 echo 'CUDA env var reset, check your CUDA installation' fi
if [[ -n "$OpenCV_DIR" ]]; then if [ ! -d $OpenCV_DIR ]; then echo OpenCV_DIR does not exist: $OpenCV_DIR exit 1 fi fi
if [ $USE_LOCAL_OPENCV -eq 1 ] && [[ ! -n "$OpenCV_DIR" ]]; then . install_local_opencv.sh # source it in order to run it and get the env var OPENCV_VERSION echo OpenCV version: $OPENCV_VERSION if [[ $OPENCV_VERSION == 4* ]]; then OpenCV_DIR="$CONFIG_DIR/Thirdparty/opencv/install/lib/cmake/opencv4" else OpenCV_DIR="$CONFIG_DIR/Thirdparty/opencv/install/share/OpenCV" fi echo setting OpenCV_DIR: $OpenCV_DIR
fi
export ZED_INSTALL_FOUND=0 if [ -d /usr/local/zed ]; then ZED_INSTALL_FOUND=1 echo "ZED found" fi
if [ $ZED_INSTALL_FOUND -eq 0 ]; then USE_ZED_CAMERA=0 echo 'ZED env var reset, check your ZED installation' fi
I have installed a local opencv,so I don‘t know where the problem is
Other questions:
sudo update-alternatives --query cuda
and share what you get? Same thing for nvidia-smi
?Another kind request. Can you share the full log of the command you are running and what command you are running? It would be great to have that information in a separate log file.
Before running anything else, please run clean.sh
in the root folder of PLVS.
I used a new computer without CUDA to install this system and the installation was successful. If it comes with CUDA, which version of CUDA needs to be installed? Is there anything I need to pay attention to if I install this system first and then install CUDA?
Did you have a chance to run the suggested commands above?
Any CUDA version that is compatible with a local opencv install (see the script install_local_opencv.sh
, for instance with opencv 4.8.0) will work (e.g. CUDA 11.6). On my systems, I have installed different CUDA versions without problems.
Many other friends successfully install PLVS+CUDA on different laptops and desktop machines. You can even test it with [rosdocker]() (with noetic_cuda
or ubuntu20_cuda
images) as I suggested in the README.
CMake Error at /home/cyl/opt/cmake-3.23.2/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find CUDA: Found unsuitable version "12.0", but required is exact version "11.0" (found /usr/local/cuda) Call Stack (most recent call first): /home/cyl/opt/cmake-3.23.2/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE) /home/cyl/opt/cmake-3.23.2/share/cmake-3.23/Modules/FindCUDA.cmake:1264 (find_package_handle_standard_args) /home/cyl/plvs-master/Thirdparty/opencv/install/lib/cmake/opencv4/OpenCVConfig.cmake:86 (find_package) /home/cyl/plvs-master/Thirdparty/opencv/install/lib/cmake/opencv4/OpenCVConfig.cmake:108 (find_host_package) CMakeLists.txt:40 (find_package) I have tried switching cuda versions and still get the same error. cuda version:11.0