yuxng / DA-RNN

Semantic Mapping with Data Associated Recurrent Neural Networks
MIT License
170 stars 72 forks source link

Error when make KinectFusion: rigid.h(14): error: qualified name is not allowed #17

Open Ramay7 opened 6 years ago

Ramay7 commented 6 years ago

Hi, guys.

Firstly, thanks for your awsome work. However, when I replayed the repository in my machine, I met some errors while run make in kinect_fusion/build.

Here is my errors:

/home/a/DA-RNN/lib/kinect_fusion/include/df/transform/rigid.h(14): error: qualified name is not allowed /home/a/DA-RNN/lib/kinect_fusion/include/df/transform/rigid.h(14): error: explicit type is missing ("int" assumed) /home/a/DA-RNN/lib/kinect_fusion/include/df/transform/rigid.h(14): error: expected a ";" /home/a/DA-RNN/lib/kinect_fusion/include/df/transform/rigid.h(24): error: identifier "Transform" is undefined /home/a/DA-RNN/lib/kinect_fusion/include/df/transform/rigid.h(28): error: identifier "Transform" is undefined /home/a/DA-RNN/lib/kinect_fusion/include/df/transform/rigid.h(32): error: identifier "Transform" is undefined /home/a/DA-RNN/lib/kinect_fusion/include/df/transform/rigid.h(36): error: identifier "Transform" is undefined /home/a/DA-RNN/lib/kinect_fusion/include/df/transform/rigid.h(52): error: identifier "Transform" is undefined /home/a/DA-RNN/lib/kinect_fusion/include/df/util/dualQuaternion.h(72): error: explicit type is missing ("int" assumed) /home/a/DA-RNN/lib/kinect_fusion/include/df/util/dualQuaternion.h(72): error: qualified name is not allowed /home/a/DA-RNN/lib/kinect_fusion/include/df/util/dualQuaternion.h(72): error: expected a ")" /home/a/DA-RNN/lib/kinect_fusion/include/df/util/dualQuaternion.h(70): warning: constant "OtherOptions" is not used in declaring the parameter types of function template "df::DualQuaternion<Scalar, Options>::DualQuaternion(int)" ..................... /home/a/DA-RNN/lib/kinect_fusion/include/df/transform/nonrigidDeviceModule.h(107): error: a value of type "float (df::NonrigidTransformer<float, df::DualQuaternion>::*)() const" cannot be used to initialize an entity of type "const float" detected during instantiation of "df::NonrigidTransformer<Scalar, TransformT>::DeviceModule::DeviceModule(int) [with Scalar=float, TransformT=df::DualQuaternion]" /home/a/DA-RNN/lib/kinect_fusion/./src/transform/nonrigid.cu(1069): here 79 errors detected in the compilation of "/tmp/tmpxft_0000744b_00000000-7_nonrigid.cpp1.ii".

--error 0x2 --

CMake Error at kinectFusion_generated_nonrigid.cu.o.cmake:266 (message): Error generating file /home/a/DA-RNN/lib/kinect_fusion/build/CMakeFiles/kinectFusion.dir/src/transform/./kinectFusion_generated_nonrigid.cu.o CMakeFiles/kinectFusion.dir/build.make:1142: recipe for target 'CMakeFiles/kinectFusion.dir/src/transform/kinectFusion_generated_nonrigid.cu.o' failed make[2]: [CMakeFiles/kinectFusion.dir/src/transform/kinectFusion_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

I have strictly followed the steps mentioned in the issue 10: Steps for ubuntu 14.04 . And I can make sure that the versions of dependencies are:

Tensorflow 1.2.0 CUDA 8.0 Ubuntu 16.04 LTS Sophus SHA1 ID: 341346e306d657ac8acaf052939ffd85dacd8f82 Eigen 3.2.92 Nanoflann 1.2.2 Pangolin 0.5

as @yuxng mentioned in the issue 2:Need more details for versions.

Can anyone @yuxng @kevinkit @JackHenry1992 help me please? Thanks for your generous help!

yuxng commented 6 years ago

Hi, Can you try to git pull the lastest version of Sophus? I have updated the code for it.

Ramay7 commented 6 years ago

Hi, @yuxng

I tried to change my Sophus with the following steps in Sophus/:

git checkout master cd build cmake .. make

But, with the make command, I got the errors like:

/usr/local/include/Eigen/src/Core/Matrix.h:304:35: error: no matching function for call to ‘Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>::_init2(const double&, const double&)’ Base::template _init2<T0,T1>(x, y); /usr/local/include/Eigen/src/Core/PlainObjectBase.h:706:30: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, double>’ /usr/local/include/Eigen/src/Core/PlainObjectBase.h:725:30: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, double>’ /usr/local/include/Eigen/src/Core/MathFunctions.h:365:34: error: invalid static_cast from type ‘const ceres::Jet<double, 3>’ to type ‘int’ ......... test/core/CMakeFiles/test_rxso2.dir/build.make:62: recipe for target 'test/core/CMakeFiles/test_rxso2.dir/test_rxso2.cpp.o' failed make[2]: [test/core/CMakeFiles/test_rxso2.dir/test_rxso2.cpp.o] Error 1 CMakeFiles/Makefile2:195: recipe for target 'test/core/CMakeFiles/test_rxso2.dir/all' failed make[1]: [test/core/CMakeFiles/test_rxso2.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2

The version of Eigen I use is from the link: https://drive.google.com/open?id=0B4WdmTHU8V7VTDFIdU5IWGxkMGM, which is mentioned in the issue 10:Steps for ubuntu 14.04.

I guess the problem is caused by the wrong version of Eigen, so what is your version of Eigen? Or can you give me some other guidances?

Thanks a lot!

yuxng commented 6 years ago

I also updated the code for eigen. You can just download the latest version of eigen and try it.

Ramay7 commented 6 years ago

Sophus is updated to the latest successfully now. However, the original problem I pasted in this issue is stilled not fixed while I run make to compile kinect_fusion.

Are there some other differences between your current dependencies with Steps for ubuntu 14.04 . Pangolin is updated? nanoflann is updated?

Thanks!

yuxng commented 6 years ago

Have you done a git pull in the DA-RNN repo to update the code?

Ramay7 commented 6 years ago

Thanks for your generous help. All the problems are solved by the command git pull origin in $ROOT/DA-RNN and $ROOT/Sophus.

However, another problem comes while I run sudo ./experiments/scripts/rgbd_scene_multi_rgbd.sh 0 in $ROOT/DA-RNN.

a@123:~/DA-RNN$ sudo ./experiments/scripts/rgbd_scene_single_rgbd.sh 0

  • set -e
  • export PYTHONUNBUFFERED=True
  • PYTHONUNBUFFERED=True
  • export CUDA_VISIBLE_DEVICES=0
  • CUDA_VISIBLE_DEVICES=0
  • export LD_PRELOAD=/usr/lib/libtcmalloc.so.4
  • LDPRELOAD=/usr/lib/libtcmalloc.so.4 ++ date +%Y-%m-%d%H-%M-%S ERROR: ld.so: object '/usr/lib/libtcmalloc.so.4' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
  • LOG=experiments/logs/rgbd_scene_single_rgbd.txt.2018-03-29_13-22-17
  • exec ++ tee -a experiments/logs/rgbd_scene_single_rgbd.txt.2018-03-29_13-22-17 ERROR: ld.so: object '/usr/lib/libtcmalloc.so.4' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
  • echo Logging output to experiments/logs/rgbd_scene_single_rgbd.txt.2018-03-29_13-22-17 Logging output to experiments/logs/rgbd_scene_single_rgbd.txt.2018-03-29_13-22-17
  • ./tools/train_net.py --gpu 0 --network vgg16_convs --weights data/imagenet_models/vgg16_convs.npy --imdb rgbd_scene_train --cfg experiments/cfgs/rgbd_scene_single_rgbd.yml --iters 40000 Traceback (most recent call last): File "./tools/train_net.py", line 13, in from fcn.train import get_training_roidb, train_net File "/home/a/DA-RNN/tools/../lib/fcn/train.py", line 16, in import tensorflow as tf ImportError: No module named tensorflow

But, this is ok:

a@123:~/DA-RNN$ python Python 2.7.14 |Anaconda custom (64-bit)| (default, Dec 7 2017, 17:05:42) [GCC 7.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import tensorflow as tf /home/a/anaconda2/lib/python2.7/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters matrix1 = tf.constant([[3., 3.]]) matrix2 = tf.constant([[2.],[2.]]) product = tf.matmul(matrix1, matrix2)
sess = tf.Session()
2018-03-29 13:18:09.095832: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA 2018-03-29 13:18:09.341946: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2018-03-29 13:18:09.342235: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.455 pciBusID: 0000:01:00.0 totalMemory: 3.94GiB freeMemory: 3.44GiB 2018-03-29 13:18:09.342257: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1) result = sess.run(product) print(result) [[12.]]

The version of your python is 2.7 or 3.x? (But I think this does not matter .... ) Can you give me some suggestions? Thank you!