fzi-forschungszentrum-informatik / gpu-voxels

GPU-Voxels is a CUDA based library which allows high resolution volumetric collision detection between animated 3D models and live pointclouds from 3D sensors of all kinds.
Other
303 stars 85 forks source link

Build error ‘pcl_isfinite’ was not declared in this scope #93

Closed NorwegianPi closed 5 years ago

NorwegianPi commented 5 years ago

Hello,

I have just started writing a master thesis on GPU collision detection using ROS. I came over GPU-Voxels and want to explore its possibilities, but i have some issues building the software.

I am running Ubuntu 16.04, CUDA v10.0.130 and ROS Kinetic (ros-kinetic-desktop-full).

Build stops at 63%, and i get the following message:

[ 63%] Building CXX object packages/gpu_voxels/src/gpu_voxels/octree/test/CMakeFiles/octree_provider.dir/Kinect.cpp.o
In file included from /home/ubuntugpu/git/gpu-voxels/packages/gpu_voxels/src/gpu_voxels/octree/test/Kinect.cpp:23:0:
/home/ubuntugpu/git/gpu-voxels/packages/gpu_voxels/src/gpu_voxels/octree/test/Kinect.h: In member function ‘void gpu_voxels::NTree::ONIWrapper::getConvertParameter(uint32_t&, uint32_t&, float&, float&, float&, float&)’:
/home/ubuntugpu/git/gpu-voxels/packages/gpu_voxels/src/gpu_voxels/octree/test/Kinect.h:118:44: error: ‘pcl_isfinite’ was not declared in this scope
if (pcl_isfinite (depth_focal_length_x_))
^
/home/ubuntugpu/git/gpu-voxels/packages/gpu_voxels/src/gpu_voxels/octree/test/Kinect.h:121:44: error: ‘pcl_isfinite’ was not declared in this scope
if (pcl_isfinite (depth_focal_length_y_))
^
/home/ubuntugpu/git/gpu-voxels/packages/gpu_voxels/src/gpu_voxels/octree/test/Kinect.h:124:47: error: ‘pcl_isfinite’ was not declared in this scope
if (pcl_isfinite (depth_principal_point_x_))
^
/home/ubuntugpu/git/gpu-voxels/packages/gpu_voxels/src/gpu_voxels/octree/test/Kinect.h:127:47: error: ‘pcl_isfinite’ was not declared in this scope
if (pcl_isfinite (depth_principal_point_y_))
^
packages/gpu_voxels/src/gpu_voxels/octree/test/CMakeFiles/octree_provider.dir/build.make:86: recipe for target 'packages/gpu_voxels/src/gpu_voxels/octree/test/CMakeFiles/octree_provider.dir/Kinect.cpp.o' failed
make[2]: *** [packages/gpu_voxels/src/gpu_voxels/octree/test/CMakeFiles/octree_provider.dir/Kinect.cpp.o] Error 1
CMakeFiles/Makefile2:4930: recipe for target 'packages/gpu_voxels/src/gpu_voxels/octree/test/CMakeFiles/octree_provider.dir/all' failed
make[1]: *** [packages/gpu_voxels/src/gpu_voxels/octree/test/CMakeFiles/octree_provider.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

It seems like it have some problems with pcl and pcl_isfinite. To the best of my knowledge I have installed all prerequisites. I would appreciate if someone could point me in the right direction to fix this issue.

Also attached cmake output if it is of any help.

Cheers!! Jarle Horneland

cmake ..
-- Detected version of GNU GCC: 54 (504)
-- icmaker dir is /home/ubuntugpu/git/gpu-voxels/icmaker
-- 
-- Library configuration for icmaker 1.0.0 =====================================
-- 
-- Checking for libraries not found in previous checks: 
-- 
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:65 (find_package):
  File /usr/share/cmake-3.5/Modules/FindBoost.cmake includes
  /home/ubuntugpu/git/gpu-voxels/icmaker/CMakeModules/FindThreads.cmake
  (found via CMAKE_MODULE_PATH) which shadows
  /usr/share/cmake-3.5/Modules/FindThreads.cmake.  This may cause errors
  later on .

  Policy CMP0017 is not set: Prefer files from the CMake module directory
  when including from there.  Run "cmake --help-policy CMP0017" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1338 (find_dependency)
  icmaker/CMakeModules/FindBoost.cmake:51 (include)
  icmaker/CorePackages.cmake:37 (FIND_PACKAGE)
  icmaker/IcMaker.cmake:545 (INCLUDE)
  CMakeLists.txt:6 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   graph
--   iostreams
--   system
--   regex
--   signals
--   unit_test_framework
--   thread
--   program_options
--   serialization
--   chrono
--   atomic
-- Ensure you cppunit installed version is at least 1.12.0
-- Could NOT find CppUnit
-- Found GLUT: ... yes
-- Could not find GSL
-- Iconv: Could not find required library iconv.
-- LibArchive: Could not find required header file archive.h.
-- Could NOT find libwebsockets
-- Ncomrx: Could not find required header file NComRxC.h.
-- Newmat: Could not find required header file newmat/newmat.h.
-- Could NOT find all components of Qt4 - missing (one or more components): Phonon
-- Could NOT find SCIP
-- Could NOT find speechd
-- Could NOT find Tcmalloc
-- Could NOT find XSD
-- Spacenav: Could not find required header file spnav.h.
-- === Searching Perception packages ===
-- Found OpenCV: /opt/ros/kinetic (found version "3.3.1") 
-- Found OpenCV: ... yes
-- Eigen found (include: /usr/include/eigen3, version: 3.2.92)
-- FLANN found (include: , lib: flann_cpp)
-- FLANN found (include: , lib: flann_cpp)
-- QHULL found (include: /usr/include, lib: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so)
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- OpenNI2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so)
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- OpenNI2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so)
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- === Searching Parallel packages ===
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/FindCUDA.cmake:758 (find_package):
  File /usr/share/cmake-3.5/Modules/FindCUDA.cmake includes
  /home/ubuntugpu/git/gpu-voxels/icmaker/CMakeModules/FindThreads.cmake
  (found via CMAKE_MODULE_PATH) which shadows
  /usr/share/cmake-3.5/Modules/FindThreads.cmake.  This may cause errors
  later on .

  Policy CMP0017 is not set: Prefer files from the CMake module directory
  when including from there.  Run "cmake --help-policy CMP0017" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
Call Stack (most recent call first):
  icmaker/CorePackages.cmake:113 (FIND_PACKAGE)
  icmaker/IcMaker.cmake:545 (INCLUDE)
  CMakeLists.txt:6 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find OpenCL (missing:  OpenCL_LIBRARIES) 
-- NPP root directory: CUDA_NPP_LIBRARY_ROOT_DIR-NOTFOUND
-- Could NOT find NPP
-- === Searching Maps packages ===
-- Marble: Could not find required header file marble/MarbleMap.h.
-- === Searching Hardware packages ===
-- DC1394V2: Could not find required header file dc1394/control.h.
-- Could NOT find ftd2xx
-- GPSD: Could not find required header file gps.h.
-- Could not find libfreenect 
-- please give some paths to CMake or make sure libfreenect is installed in your system
-- MesaSR: Could not find required header file libMesaSR.h.
-- PeakCan: Could not find required header file libpcan.h.
-- PmdSDK2: Could not find required header file pmdsdk2.h.
-- === Searching Visualization packages ===
-- Could NOT find Coin3D (missing:  COIN3D_LIBRARIES COIN3D_INCLUDE_DIRS) 
-- Could NOT find osg (missing:  OSG_LIBRARY OSG_INCLUDE_DIR) 
-- === Searching Communication packages ===
-- Could NOT find KogmoRtdb
-- Could NOT find OpenSpliceDDS
-- Could NOT find SimDcxx
-- === Searching Other packages ===
-- Could NOT find CoreFoundation (missing:  CoreFoundation_LIBRARIES CoreFoundation_INCLUDE_DIRS) 
-- LibDAI: Could not find required header file dai/factorgraph.h.
-- NetSNMP: Could not find required header file net-snmp/net-snmp-config.h.
-- SVM: Could not find required header file svm.h.
-- Xdo: Could not find required header file xdo.h.
-- DXFLib: Could not find required header file dl_dxf.h.
-- Could NOT find SWIG (missing:  SWIG_EXECUTABLE SWIG_DIR) 
CMake Warning at icmaker/CorePackages.cmake:190 (FIND_PACKAGE):
  By not providing "FindGTSAM.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "GTSAM", but
  CMake did not find one.

  Could not find a package configuration file provided by "GTSAM" with any of
  the following names:

    GTSAMConfig.cmake
    gtsam-config.cmake

  Add the installation prefix of "GTSAM" to CMAKE_PREFIX_PATH or set
  "GTSAM_DIR" to a directory containing one of the above files.  If "GTSAM"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  icmaker/IcMaker.cmake:545 (INCLUDE)
  CMakeLists.txt:6 (INCLUDE)

-- === Searching Deprecated packages ===
-- Eigen2: Could not find required header file Eigen/Core.
-- 
-- Documentation: 
--   Build PDF ... no
--   Doxygen HTMLs ... yes
-- 
-- Compile configuration for icmaker 1.0.0 =====================================
-- 
--     Built as dynamic libs?:        ON
--     Compiler:                      
--     C++ flags (Release):             -Wall -Wno-long-long -msse -msse2 -ffunction-sections   -O3 -DNDEBUG  -fomit-frame-pointer 
--     C++ flags (Debug):               -Wall -Wno-long-long -msse -msse2 -ffunction-sections   -g  -O0 -DDEBUG -D_DEBUG -D_IC_DEBUG_
--     C++ flags (RelWithDebInfo):      -Wall -Wno-long-long -msse -msse2 -ffunction-sections   -O2 -g -DNDEBUG  -fomit-frame-pointer 
--     Linker flags (Release):          
--     Linker flags (Debug):            
--     Linker flags (RelWithDebInfo):   
-- 
--     Build type:                    RelWithDebInfo
-- 
--     Install path:                  /home/ubuntugpu/git/gpu-voxels/export
-- 
-- ---- Scanning packages -------------------------------------------------------------
-- 
-- Info:    icl_core -- building library without support for [OpenSpliceDDS].
-- Info:    icl_core_config -- building library without support for [OpenSpliceDDS].
-- Info:    icl_core_logging -- building library without support for [Eigen2].
-- Warning: icl_core_testsuite -- not building library, missing [CppUnit].
-- GLM_INCLUDE_DIR = /usr/include
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so  
-- Using CATKIN_DEVEL_PREFIX: /home/ubuntugpu/git/gpu-voxels/build/devel
-- Using CMAKE_PREFIX_PATH: /home/ubuntugpu/ws_moveit/devel;/opt/ros/kinetic
-- This workspace overlays: /home/ubuntugpu/ws_moveit/devel;/opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ubuntugpu/git/gpu-voxels/build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.14
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- --------------------------------------------------------------------------
-- ------------------------ GPU Voxels configuration ------------------------
--   
-- [OK]      Building GPU-Voxels. Found CUDA.
-- [OK]      Building GPU-Voxels with visualization. GLEW, GLM, OpenGL and GLUT were found.
-- [OK]      Building GPU-Voxels with ROS connections. ROS was found.
-- [OK]      Building GPU-Voxels with URDF support. urdfdom, orocos and kdl_parser and ROS-kdl were found.
-- [OK]      Building GPU-Voxels with Kinect support. OpenNI was found.
-- [OK]      Building GPU-Voxels with Octomap support. Octomap found.
-- [OK]      Building GPU-Voxels with PCL interfaces. PCL found.
--   
-- -------------------- END of GPU Voxels configuration ---------------------
-- --------------------------------------------------------------------------
CMake Warning at packages/gpu_voxels/CMakeLists.txt:163 (MESSAGE):
  Building with THRUST_DEBUG option!

ICMAKER_CUDA_CPPDEFINES: -lineinfo --maxrregcount=63  -gencode=arch=compute_35,code=[compute_35] -DTHRUST_DEBUG -Xcompiler=-Wall
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntugpu/git/gpu-voxels/build
cjue commented 5 years ago

Hi Jarle,

is it possible that you are using a custom PCL version, that is newer than the default from kinetic/16.04?

We use 16.04, kinetic and 10.0 in most of our workstations, without the pcl_isfinite error.

NorwegianPi commented 5 years ago

Thanks, Did a clean instal of ROS and PCL and build seems to work now. Cheers!

arjunskumar commented 1 year ago

adding below line to the code solved my issue

#define pcl_isfinite(x)  std::isfinite(x)

enviornment: Ubuntu20.04/ROS-noetic