PoseCNN icon indicating copy to clipboard operation
PoseCNN copied to clipboard

How to build this?

Open Kaju-Bubanja opened this issue 6 years ago • 14 comments

More details and how to build this project can be found here

Kaju-Bubanja avatar Aug 10 '18 08:08 Kaju-Bubanja

'Add nanoflann to the include dirs in cmake and sohpus to the include and link dirs'

may you tell me how to do this? when I run cmake in /kinect_fusion/include, it always says No package 'nanoflann' found I download the nanoflann and put it in the /lib I have no idea how to deal with it.

Santranx avatar Aug 14 '18 06:08 Santranx

Installing cmake projects in general goes as follows. 1. mkdir build 2. cd build 3. cmake .. 4. make Then you should have the binaries/library files in a dir and an include dir include both in your cmake at the right place. one can also use make install to put the files automatically in the right spot, but you'd have to do more research into that command(i think it takes a path to where to put the files), but it does the same I described above

Kaju-Bubanja avatar Aug 15 '18 11:08 Kaju-Bubanja

@Kaju-Bubanja In your guide, you mentioned Eigen 3.3.9, however, only 3.3.5 is currently available.

aniruddhavpatil avatar Sep 30 '18 08:09 aniruddhavpatil

Oh that's a tipo it should be 3.2.92

Kaju-Bubanja avatar Oct 01 '18 11:10 Kaju-Bubanja

Hi @Kaju-Bubanja . With the Eigen version 3.2.9, CUDA8/CUDA10, TensorFlow 1.8, I am getting errors mentioned in https://github.com/yuxng/PoseCNN/issues/44

Did you face similar issues and if yes how did you fix it ?

aditya2592 avatar Oct 17 '18 22:10 aditya2592

Try Cuda 9 it worked for me with cuda 9

Kaju-Bubanja avatar Dec 03 '18 17:12 Kaju-Bubanja

@Santranx I also faced that problem for nanoflann. I did this mkdir build -> cmake .. -> make -> make install I guess the last step moved the necessary files to their correct places. After this, when I ran cmake .. for kinect_fusion it didn't show any problems anymore. I hope it helps. I am a newbie so if I made any mistake I would really appreciate if someone corrects me.

Abdul-Mukit avatar Dec 17 '18 22:12 Abdul-Mukit

@Abdul-Mukit Thats correct, for nanoflann eigen pangolin etc. you have to do: mkdir build cd build cmake .. make sudo make install

or something similar, should be in the specific github repo.

Luedeke avatar Dec 18 '18 17:12 Luedeke

Thank you, @Luedeke . This really helped. I am stuck at this line now: Adapt boost_python and boost_numpy in Cmake line 98/99 to your library name when using boost and python 3.5 it is boost_python27 and boost_numpy27 or symlink these to boots_python and boost_numpy.

Could you please give me some details on how to do this.

Update: Got it. In CMakeLists. txt in link_libraries() changed boost_python and boost_numpy to boost_python27 and boost_numpy27 respectively.

Abdul-Mukit avatar Dec 20 '18 22:12 Abdul-Mukit

@Abdul-Mukit Thanks, I didn't get that. But it wasn't necessary for me either.

Could you explain how they "installed" Boost? Does Boost have to be in a certain directory?

Could you tell me if your make.sh, kinect, synthesize builds how you installed opencv? With: pip install opencv-python or sudo apt-get install libopencv-dev or from source? I tried pip first, but make.sh and kinect_fusion didn't find opencv until I installed libopencv-dev with sudo apt-get install apt-get.

Luedeke avatar Dec 21 '18 09:12 Luedeke

@Luedeke . For boost, I downloaded the source files for 1.67 version from this link. Then installed it. If you are talking about the source code, then no, you don't need to put the source code at any specific directory. When you call "./b2 install" it takes care of putting required files in correct directories, I guess.

About opencv, I installed it from source. I downloaded the 3.4.4 version. About kinect_fusion and synthesize, yes, I was able to build them.

I didn't run the make.sh yet, but yesterday, I found this fork where the instructions are in more detailed and also many corrections are already done in the codes. So, I am basically starting over. After reading all the instructions, I am a bit concerned about the GCC 4.8 requirement for ABI compatibility. I also don't know how to implement this instruction for tackling the ABI Compatibility issues: "To give you the above error already at compile time instead of runtime add following to the compile command: -Wl,-z,defs".

For now, I going with gcc5.4 and hoping for the best. I hope this helps. It would be very helpful if you could suggest how can I implement the instruction I mentioned above.

Abdul-Mukit avatar Dec 22 '18 00:12 Abdul-Mukit

It was mentioned that: Either all packages used need to be built with gcc 4.8.5 or if some use gcc 5 or above all above packages need following line added to the compilation: -D_GLIBCXX_USE_CXX11_ABI=0 in https://github.com/Kaju-Bubanja/PoseCNN

My question is: do we need to add this to: Eigen, Sophus, nanoflann, nlopt everything? I know that we have to add it to Pangolin according to https://github.com/yuxng/DA-RNN/issues/7. But I am confused as to add this to every CMakeLists.

Abdul-Mukit avatar Dec 22 '18 05:12 Abdul-Mukit

@Abdul-Mukit thank you. About: "To give you the above error already at compile time instead of runtime add following to the compile command: -Wl,-z,defs". I didnt need that it is working for me without that and I have no idea how i should do this.

I didn't have to build Eigen, Sophus, nanoflann, nlopt etc. with add_definiton(-D_GLIBCXX_USE_CXX11_ABI=0) only Pangolin and I built all of them with GCC 4.8.5. So Im not sure about this Error, you have to try it sorry.

Luedeke avatar Dec 22 '18 14:12 Luedeke

I tried to make the kinect_fusion, but I met this error:

error

/data/poseCNN2/lib/kinect_fusion/./src/transform/nonrigid.cu(97): error: identifier "Eigen::Quaternion<float, (int)2> ::Quaternion" is undefined in device code

12 errors detected in the compilation of "/tmp/tmpxft_00003817_00000000-6_nonrigid.cpp1.ii".
# --error 0x1 --
CMake Error at kfusion_generated_nonrigid.cu.o.cmake:266 (message):
  Error generating file
  /data//poseCNN2/lib/kinect_fusion/build/CMakeFiles/kfusion.dir/src/transform/./kfusion_generated_nonrigid.cu.o


CMakeFiles/kinectFusion.dir/build.make:8563: recipe for target 'CMakeFiles/kfusion.dir/src/transform/kfusion_generated_nonrigid.cu.o' failed
make[2]: *** [CMakeFiles/kfusion.dir/src/transform/kfusion_generated_nonrigid.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/kinectFusion.dir/all' failed
make[1]: *** [CMakeFiles/kinectFusion.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

How can I fix this error? thanks for help!


Update

I am trying eigen 3.3.90, I used Eigen 3.2.92 before . the problem is solved !!!

iris0329 avatar Dec 28 '18 01:12 iris0329