Closed kuonangzhe closed 6 years ago
I fixed the compile issue with the following patch:
diff --git a/lib/kinect_fusion/CMakeLists.txt b/lib/kinect_fusion/CMakeLists.txt
index a866277..3bae311 100644
--- a/lib/kinect_fusion/CMakeLists.txt
+++ b/lib/kinect_fusion/CMakeLists.txt
@@ -8,7 +8,6 @@ endif()
add_definitions(-std=c++11)
add_definitions(-Wall)
add_definitions(-fPIC)
-#add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
# supply compile-time directory to code
set(compileDirectory \"${PROJECT_SOURCE_DIR}\")
@@ -74,9 +73,10 @@ file( GLOB SHADER_SOURCES
#set(CUDA_SEPARABLE_COMPILATION ON)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-std=c++11;--expt-relaxed-constexpr;-O3;-arch=sm_61;--expt-extended-lambda;--verbose;-Xcompiler -fPIC;")
+#set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-std=c++11;--expt-relaxed-constexpr;-O3;-D_MWAITXINTRIN_H_INCLUDED;--expt-extended-lambda;--verbose;-Xcompiler -fPIC;")
#set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-std=c++11;--expt-relaxed-constexpr;-O3;-gencode arch=compute_61,code=sm_61;--expt-extended-lambda;--verbose;")
-message(STATUS "pangolin: ${Pangolin_INCLUDE_DIRS}")
+message(STATUS "pangolin: ${Pangolin_INCLUDE_DIRS} ${Pangolin_LIBRARIES}")
cuda_add_library(
kfusion
@@ -88,6 +88,8 @@ cuda_add_library(
${SHADER_SOURCES}
)
+target_link_libraries(kfusion ${Pangolin_LIBRARIES})
+
cuda_add_executable(
kinectFusion
kinect_fusion.cpp
@@ -96,3 +98,5 @@ cuda_add_executable(
${DF_CUDA_SOURCES}
${SHADER_SOURCES}
)
+
+target_link_libraries(kinectFusion kfusion ${Pangolin_LIBRARIES})
diff --git a/lib/kinect_fusion/src/transform/nonrigid.cu b/lib/kinect_fusion/src/transform/nonrigid.cu
index e15fcfe..5d29a29 100644
--- a/lib/kinect_fusion/src/transform/nonrigid.cu
+++ b/lib/kinect_fusion/src/transform/nonrigid.cu
@@ -94,7 +94,7 @@ __global__ void warpMeshKernel(DeviceTensor<DTensor, Eigen::UnalignedVec3<Scalar
// const NNVec nearestNeighborIndices = nearestNeighborGrid(nearestNeighborVoxel);
- DualQuaternion blendedTransform;
+ DualQuaternion blendedTransform(deformationGraphTransforms(0));
const bool initialized = blendDualQuaternions(blendedTransform, unwarpedVertexGridCoords,
unwarpedVertexWorldCoords, deformationGraphVertices,
@@ -755,9 +755,10 @@ __global__ void initializeNewBaseLevelVertexTransformsKernel(const DeviceTensor1
const Vec3 newVertexInGridCoords = nearestNeighborGrid.worldToGrid(newVertexInWorldCoords);
- DualQuaternion<Scalar,Eigen::DontAlign> blendedTransform;
+ //DualQuaternion<Scalar,Eigen::DontAlign> blendedTransform;
- const bool initialized = blendDualQuaternions(blendedTransform,newVertexInGridCoords,newVertexInWorldCoords,
+ const bool initialized = blendDualQuaternions(baseLevelTransforms(index),
+ newVertexInGridCoords,newVertexInWorldCoords,
baseLevelVertices, baseLevelTransforms, nearestNeighborGrid,
oneOverBlendingSigmaSquared);
@@ -765,9 +766,7 @@ __global__ void initializeNewBaseLevelVertexTransformsKernel(const DeviceTensor1
printf("initialized %d\n",index);
- blendedTransform.normalize();
-
- baseLevelTransforms(index) = blendedTransform;
+ baseLevelTransforms(index).normalize();
}
@haudren Thank you so much, it works!
Since it said that '-lkfusion' is not found when compiling 'lib/syntheize', I compile the 'lib/kinect_fusion' with following command:
Then it comes out with cuda error:
I read several issues in DA-RNN, tried but still not solved. Is there any suggestions? The system is Ubuntu16.04, and Python 3.5. Thanks a lot!