Comments (4)
- I believe that the following message occurs in cases where CMake does not find CUDA:
The CUDA SDK is always required to compile the code, even if one does not want / cannot use CUDA. If it is not found, the
CMake Warning: Manually-specified variables were not used by the project: CMAKE_CUDA_FLAGS
camera_calibration
target is not created. This is the reason formake -j camera_calibration
not working (andmake
alone will not build thecamera_calibration
target either). I just committed a change that should hopefully produce a clear error message if CUDA is not found by CMake. completeOrthogonalDecomposition
in Eigen is indeed relatively new, so this is an Eigen version issue. I used Eigen 3.3.7.- The
‘class vis::LMOptimizer<double>’ has no member named ‘SolveWithSchurComplement’
error occurs within thelibvis_test
target. This target is irrelevant for the final application and won't be built if you usemake camera_calibration
. But it is a good point that I apparently forgot to update this code after changes to LMOptimizer. I just committed a change that fixes this issue.
from camera_calibration.
Thanks for the CMake error message about CUDA, that was very clear! I installed CUDA version 10.2 and also switched over to Eigen 3.3.7.
A fresh libvis error popped up. Cmake has some warnings, but appears to succeed:
camera_calibration $ mkdir build
camera_calibration $ cd build/
build $ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CUDA_FLAGS="-arch=sm_61" ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/lib/ccache/cc
-- Check for working C compiler: /usr/lib/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/ccache/c++
-- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - /usr/local/cuda/bin/nvcc
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found Eigen3: /usr/local/include/eigen3 (Required is at least version "3.3.7")
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- serialization
-- filesystem
-- system
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- The ASM compiler identification is GNU
-- Found assembler: /usr/lib/ccache/cc
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Performing Test HAVE_LD_VERSION_SCRIPT
-- Performing Test HAVE_LD_VERSION_SCRIPT - Success
-- Symbol prefix:
-- Found GLEW: /usr/include
CMake Deprecation Warning at applications/camera_calibration/third_party/yaml-cpp-0.6.0/CMakeLists.txt:9 (cmake_policy):
The OLD behavior for policy CMP0012 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at applications/camera_calibration/third_party/yaml-cpp-0.6.0/CMakeLists.txt:13 (cmake_policy):
The OLD behavior for policy CMP0015 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Performing Test FLAG_WEXTRA
-- Performing Test FLAG_WEXTRA - Success
-- SCSDK_ROOT has not been set. If you would like to use the Structure SDK support, please set this to the root path of the Structure SDK manually.
-- The following OPTIONAL packages have been found:
* PythonInterp
* realsense2
-- The following REQUIRED packages have been found:
* OpenGL
* Eigen3 (required version >= 3.3.7)
* Boost
* Threads
* ZLIB
* GLEW
* Qt5Core
* Qt5Gui (required version >= 5.8.0)
* Qt5OpenGL
* Qt5Widgets
* Qt5 (required version >= 5.8)
* Qt5X11Extras
* opengv
-- The following OPTIONAL packages have not been found:
* Structure
-- Configuring done
-- Generating done
-- Build files have been written to: /home/eric/camera_calibration/build
Then make fails here:
[ 48%] Building CXX object CMakeFiles/libvis.dir/libvis/src/libvis/shader_program_opengl.cc.o
[ 48%] Building CXX object CMakeFiles/libvis.dir/libvis/src/libvis/timing.cc.o
[ 48%] Building CXX object CMakeFiles/libvis.dir/libvis_autogen/X5QHYVNTKQ/qrc_resources.cpp.o
[ 50%] Linking CXX shared library liblibvis.so
[ 50%] Built target libvis
Scanning dependencies of target libvis_external_io_autogen
[ 50%] Automatic MOC for target libvis_external_io
[ 50%] Built target libvis_external_io_autogen
Scanning dependencies of target libvis_external_io
[ 50%] Building CXX object CMakeFiles/libvis_external_io.dir/libvis_external_io_autogen/mocs_compilation.cpp.o
[ 51%] Building CXX object CMakeFiles/libvis_external_io.dir/libvis/src/libvis/external_io/colmap_model.cc.o
[ 51%] Building CXX object CMakeFiles/libvis_external_io.dir/libvis/src/libvis/external_io/meshlab_project.cc.o
[ 51%] Building CXX object CMakeFiles/libvis_external_io.dir/libvis/third_party/tinyxml2/tinyxml2.cpp.o
[ 52%] Linking CXX shared library liblibvis_external_io.so
[ 52%] Built target libvis_external_io
Scanning dependencies of target libvis_cuda_autogen
[ 52%] Automatic MOC for target libvis_cuda
[ 52%] Built target libvis_cuda_autogen
Scanning dependencies of target libvis_cuda
[ 52%] Building CXX object CMakeFiles/libvis_cuda.dir/libvis_cuda_autogen/mocs_compilation.cpp.o
[ 54%] Building CUDA object CMakeFiles/libvis_cuda.dir/libvis/src/libvis/cuda/cuda_buffer.cu.o
[ 54%] Building CXX object CMakeFiles/libvis_cuda.dir/libvis/src/libvis/cuda/patch_match_stereo.cc.o
In file included from /home/eric/camera_calibration/./libvis/src/libvis/cuda/pixel_corner_projector.h:36:0,
from /home/eric/camera_calibration/./libvis/src/libvis/cuda/patch_match_stereo.h:36,
from /home/eric/camera_calibration/libvis/src/libvis/cuda/patch_match_stereo.cc:30:
/home/eric/camera_calibration/./libvis/src/libvis/cuda/pixel_corner_projector.cuh: In member function ‘float2 vis::PixelCornerProjector_::Project(float3) const’:
/home/eric/camera_calibration/./libvis/src/libvis/cuda/pixel_corner_projector.cuh:449:46: error: ‘::isnan’ has not been declared
if (left_calibrated_area_before || ::isnan(result.x)) {
^
/home/eric/camera_calibration/./libvis/src/libvis/cuda/pixel_corner_projector.cuh:449:46: note: suggested alternatives:
In file included from /usr/include/c++/5/complex:44:0,
from /usr/local/include/eigen3/Eigen/Core:96,
from /home/eric/camera_calibration/./libvis/src/libvis/eigen.h:49,
from /home/eric/camera_calibration/./libvis/src/libvis/image.h:40,
from /home/eric/camera_calibration/./libvis/src/libvis/cuda/cuda_buffer.h:37,
from /home/eric/camera_calibration/./libvis/src/libvis/cuda/patch_match_stereo.h:34,
from /home/eric/camera_calibration/libvis/src/libvis/cuda/patch_match_stereo.cc:30:
/usr/include/c++/5/cmath:641:5: note: ‘std::isnan’
isnan(_Tp __x)
^
/usr/include/c++/5/cmath:626:3: note: ‘std::isnan’
isnan(float __x)
^
In file included from /usr/local/include/eigen3/Eigen/Core:533:0,
from /home/eric/camera_calibration/./libvis/src/libvis/eigen.h:49,
from /home/eric/camera_calibration/./libvis/src/libvis/image.h:40,
from /home/eric/camera_calibration/./libvis/src/libvis/cuda/cuda_buffer.h:37,
from /home/eric/camera_calibration/./libvis/src/libvis/cuda/patch_match_stereo.h:34,
from /home/eric/camera_calibration/libvis/src/libvis/cuda/patch_match_stereo.cc:30:
/usr/local/include/eigen3/Eigen/src/Core/GlobalFunctions.h:87:139: note: ‘Eigen::isnan’
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isnan,scalar_isnan_op,not-a-number test,\sa Eigen::isinf DOXCOMMA Eigen::isfinite DOXCOMMA ArrayBase::isnan)
^
In file included from /usr/local/include/eigen3/Eigen/Core:371:0,
from /home/eric/camera_calibration/./libvis/src/libvis/eigen.h:49,
from /home/eric/camera_calibration/./libvis/src/libvis/image.h:40,
from /home/eric/camera_calibration/./libvis/src/libvis/cuda/cuda_buffer.h:37,
from /home/eric/camera_calibration/./libvis/src/libvis/cuda/patch_match_stereo.h:34,
from /home/eric/camera_calibration/libvis/src/libvis/cuda/patch_match_stereo.cc:30:
/usr/local/include/eigen3/Eigen/src/Core/MathFunctions.h:955:28: note: ‘Eigen::numext::isnan’
template<typename T> EIGEN_DEVICE_FUNC bool (isnan) (const T &x) { return internal::isnan_impl(x); }
^
In file included from /usr/local/include/eigen3/Eigen/Core:411:0,
from /home/eric/camera_calibration/./libvis/src/libvis/eigen.h:49,
from /home/eric/camera_calibration/./libvis/src/libvis/image.h:40,
from /home/eric/camera_calibration/./libvis/src/libvis/cuda/cuda_buffer.h:37,
from /home/eric/camera_calibration/./libvis/src/libvis/cuda/patch_match_stereo.h:34,
from /home/eric/camera_calibration/libvis/src/libvis/cuda/patch_match_stereo.cc:30:
/usr/local/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h:434:14: note: ‘Eigen::half_impl::isnan’
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isnan)(const half& a) {
^
CMakeFiles/libvis_cuda.dir/build.make:88: recipe for target 'CMakeFiles/libvis_cuda.dir/libvis/src/libvis/cuda/patch_match_stereo.cc.o' failed
make[3]: *** [CMakeFiles/libvis_cuda.dir/libvis/src/libvis/cuda/patch_match_stereo.cc.o] Error 1
CMakeFiles/Makefile2:266: recipe for target 'CMakeFiles/libvis_cuda.dir/all' failed
make[2]: *** [CMakeFiles/libvis_cuda.dir/all] Error 2
CMakeFiles/Makefile2:1005: recipe for target 'applications/camera_calibration/CMakeFiles/camera_calibration.dir/rule' failed
make[1]: *** [applications/camera_calibration/CMakeFiles/camera_calibration.dir/rule] Error 2
Makefile:474: recipe for target 'camera_calibration' failed
make: *** [camera_calibration] Error 2
From googling this may be related to C++11, does it ring any bells?
from camera_calibration.
I don't think it has to do with C++11. This ::isnan() is within __device__
code, i.e., CUDA code which can only run on the GPU. However, it seems like the host (CPU) compiler still tries to compile the code (even though it can never be executed) and does not find a declaration for this function then. I just committed a change that hides this call from the host compiler to prevent the error. Does that work?
It is kind of bad though that this compiled just fine on both of my systems, but then apparently suddenly breaks on other systems ...
Edit: It seems the root cause for this inconsistency among different systems may be described here. Quoting from there:
Unfortunately an implementation is allowed but not required to bring those functions into the global namespace, too, when including (and thus it is one of the many "works on my machine"-incidences of C++ [...]).
from camera_calibration.
@puzzlepaint thanks for all the support! I had one more failure where I had to install libv4l-dev, but now it's all built. Excited to play around with it.
/home/eric/camera_calibration/applications/camera_calibration/src/camera_calibration/image_input/image_input_v4l2.cc:40:21: fatal error: libv4l2.h: No such file or directory
from camera_calibration.
Related Issues (20)
- CMake Error at CMakeLists.txt:118 (set_target_properties) “Can not find target to add properties to: genprebuilt”. What is the reason for this? HOT 2
- How to implement binocular stereo distance measurement HOT 1
- Questions about undistortion of generic models HOT 2
- Question about calibrating a stereo camera HOT 1
- make[1]: *** [CMakeFiles/Makefile2:907: applications/camera_calibration/CMakeFiles/camera_calibration.dir/rule] Error 2 make: *** [Makefile:487: camera_calibration] Error 2 HOT 2
- Availability of datasets used in the paper HOT 1
- how to use the intrinsics0.yaml and how to run stere depth estimation correctly HOT 3
- How to use the camera_tr_rig.yaml file in stereo calibration? HOT 5
- Purpose of `3.f` offset in Pixel-Grid Point Conversions HOT 1
- Pose Estimation HOT 1
- central_opencv raise error with --num_pyramid_levels = 4 HOT 1
- feature extraction and .bin HOT 2
- Issue with linking boost HOT 4
- Convergence issue HOT 2
- Matching-based refinement rendering issues HOT 6
- Feature points not found
- Question: Solution Convariance/Uncertainty
- Issue with building HOT 1
- Don't optimize 3D pattern feature
- Failing Calibration Initialization
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camera_calibration.