Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open3d with cuda9.0 #4

Open
PigletPh opened this issue Nov 3, 2021 · 10 comments
Open

Open3d with cuda9.0 #4

PigletPh opened this issue Nov 3, 2021 · 10 comments

Comments

@PigletPh
Copy link

PigletPh commented Nov 3, 2021

hi,the work is excellent.But when I set up the open3d 0.12.0 environment, I used cuda9.0 and kept reporting errors. The content is as follows. Does the 0.12.0 version support cuda9.0?
CMake Error at /home/zhangcz/third_parts/cmake-3.18.0-Linux-x86_64/share/cmake-3.18/Modules/CMakeDetermineCUDACompiler.cmake:552 (message):
The CMAKE_CUDA_ARCHITECTURES:
75-real
do not all work with this compiler. Try:
30
instead.

@zhoupengwei
Copy link
Owner

@jiu876 Hi, Thank you for your attention. I'm not sure wheather the open3d 12.0 supports cuda 9.0. The cuda10.x and cuda 11.x can work well with it. This project does not depend on the cuda module in it. so if you want, you can try to disable the cuda moduel compilation eg. cmake -DBUILD_CUDA_MODULE=OFF . Sorry about that.

@PigletPh
Copy link
Author

PigletPh commented Nov 5, 2021

@jiu876 Hi, Thank you for your attention. I'm not sure wheather the open3d 12.0 supports cuda 9.0. The cuda10.x and cuda 11.x can work well with it. This project does not depend on the cuda module in it. so if you want, you can try to disable the cuda moduel compilation eg. cmake -DBUILD_CUDA_MODULE=OFF . Sorry about that.

Thanks for your answer,I follow your solution,but a new problem appear:
CMake Error at CMakeLists.txt:171 (message):
3DML depends on TensorFlow or PyTorch Ops. Enable them with
-DBUILD_TENSORFLOW_OPS=ON or -DBUILD_PYTORCH_OPS=ON

@zhoupengwei
Copy link
Owner

@jiu876 This module will cause linking errors due to C++11 API support. You can try to compile it as follows:

git clone --recursive https://github.com/intel-isl/Open3D
cd Open3D && source util/scripts/install-deps-ubuntu.sh
mkdir build && cd build
cmake -DBUILD_EIGEN3=ON -DBUILD_GLEW=ON -DBUILD_GLFW=ON -DBUILD_JSONCPP=ON -DBUILD_PNG=ON -DGLIBCXX_USE_CXX11_ABI=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_UNIT_TESTS=ON ..
make -j4
sudo make install

Good luck!

@PigletPh
Copy link
Author

@zpw6106 Thanks for your answer,I have successfully built the Open3D library ,but when I catkin build,there is a problem about yawl-cpp.
When I did not install the yawl library, but installed ROS-Melodic and Open3D, I can successfully compile using catkin build;However, if I install yawl 0.6.3 and use the command cmake [-G generator] [-DYAML_BUILD_SHARED_LIBS=ON] .., the following error will be reported:

/usr/bin/ld: /usr/local/lib/libyaml-cpp.a(scanscalar.cpp.o): relocation R_X86_64_PC32 against symbol _ZNK4YAML5RegEx14MatchUncheckedINS_16StreamCharSourceEEEiRKT_' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: 最后的链结失败: 错误的值 collect2: error: ld returned 1 exit status make[2]: *** [/home/zhangcz/local_code/tloam_ws/devel/lib/libkitti_reader_nodelet.so] Error 1 make[1]: *** [CMakeFiles/kitti_reader_nodelet.dir/all] Error 2 make[1]: *** 正在等待未完成的任务.... /usr/bin/ld: /usr/local/lib/libyaml-cpp.a(scanscalar.cpp.o): relocation R_X86_64_PC32 against symbol ZNK4YAML5RegEx14MatchUncheckedINS_16StreamCharSourceEEEiRKT' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 最后的链结失败: 错误的值
collect2: error: ld returned 1 exit status
make[2]: *** [/home/zhangcz/local_code/tloam_ws/devel/lib/libsegmentation_nodelet.so] Error 1
make[1]: *** [CMakeFiles/segmentation_nodelet.dir/all] Error 2
/usr/bin/ld: /usr/local/lib/libyaml-cpp.a(convert.cpp.o): relocation R_X86_64_PC32 against symbol `_ZN4YAML11InvalidNodeC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 最后的链结失败: 错误的值
collect2: error: ld returned 1 exit status

@zhoupengwei
Copy link
Owner

@jiu876 It looks like your yaml-cpp isn't compiling correctly. From your output, it looks like your yaml-cpp has been compiled into a static library, which will cause linking errors. You can try to recompile as follows:

sudo rm -rf /usr/local/include/yaml-cpp /usr/local/lib/libyaml-cpp* /usr/local/lib/cmake/yaml-cpp
cd yaml-cpp-yaml-cpp-0.6.3/
mkdir build && cd build 
cmake -DYAML_BUILD_SHARED_LIBS=ON ../
make -j4 && sudo make install

You can check the output of the terminal to notice the correct dynamic link library. This is shown below:

Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libyaml-cpp.so.0.6.3
-- Installing: /usr/local/lib/libyaml-cpp.so.0.6
-- Installing: /usr/local/lib/libyaml-cpp.so

@PigletPh
Copy link
Author

@zpw6106 Thanks for your answer,when I run the command roslaunch tloam tloam_kitti.launch,there is a error about the kitti path
111
:
My kitti path is
屏幕截图 2021-11-14 14:38:29
:
And I changed the data_path in kitti_reader.yawl:data_path: /home/zhangcz/odometry,how to solve it,thanks!

@PigletPh
Copy link
Author

@zpw6106 I solved the problem,the kitti path changed:~/odometry/dataset/sequences/00/,but when I run the code,at frame 3246, the code will stop running, what's the matter
屏幕截图 2021-11-16 16:12:39
?

@PigletPh
Copy link
Author

@zpw6106 I changed the code in regisration.cpp:scan_edge_size >= 5 && scan_sphere_size >= 5 && scan_planar_size >= 5 && scan_ground_size >= 5,and the KITTI00 dataset can run entirely.Here are other questions to ask you:
1.How to run the code in VLP16 not dataset because I have a Velodyne16 lidar?
2.How to keep track and map?
Looking forward to your answer.

@zhoupengwei
Copy link
Owner

@jiu876 First of all, thank you for attention my work, If you want to use the tloam on VLP-16. You need to pay attention to the following step:

    1. You should turn off the kitti read data node, and add a new node to publish the point cloud data.
    1. The point cloud acquired from VLP-16 has point cloud distortion, you should use other sensors like IMU etc. or lidar odometer (which will only help mapping) to remove the distortion. The latest ros driver can read the acquisition time for each point, which will be used directly to accomplish this task.
    1. The parameters of the DCVC segmentation algorithm need to be adjusted to accommodate the horizontal and vertical resolution of the VLP-16.
    1. Currently I mainly want to utilize the DCVC module to remove dynamic obstacles from the point cloud, which requires the addition of an obstacle tracking module after DCVC. Unfortunately this part of the work is not done yet. If there is a very urgent need for this functionality, you can try to utilize LiDAR-MOS But I have not tested it in practice and the performance cannot be guaranteed.
    1. The VLP-16 point cloud density will be more sparse and the lidar-only odometry is not particularly robust in practice. So you can try to fuse other sensor solutions. Here I recommend LIO-SAM, where you can directly replace the laser odometry solution with tloam. You will get satisfactory results. I have done such tests which can achieve satisfactory results.
    1. For mapping, it usually requires a back-end optimization module to get globally consistent maps, which you can do using ceres, g2o or gtsam. In which you can add additional constraints according to your own experimental scenarios and thus get better results.

Hope this can help you !

@PigletPh
Copy link
Author

@zpw6106 Thanks for your answers, it is very helpful to me, and I will try to solve these problems. For the newly added real-time node, is there any code for reference, I am not familiar with nodelet yet, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants