-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
pcl libraries and vtk cannot be compiled together with cmakelists #6212
Comments
@weiOverlord Does that mean you have multiple VTK installations on your computer? VTK 8.2 and VTK 9.1? Unless there is a strong reason why you need both, I would recommend keeping only one of them and removing the other. Getting all programs to use the correct one is usually a major headache. Since you compiled PCL from source anyway (I assume), doing so again in case you decide to remove VTK 9.1 should not be a problem.
I can't tell you anything about that unless you provide further information, for example the error message, or better: a stack trace from gdb or valgrind. |
vtk9.1 came with me after installing ros-humble desktop. I did not install the source code. It was automatically generated in usr/lib/x86_64-linux-gnu/cmake/vtk9.1 after installing ros2。 |
It was probably installed via apt. Have you considered removing it (
Do you mean listening for keyboard/mouse events with registerKeyboardCallback/registerMouseCallback? You can find an example for that here: https://pcl.readthedocs.io/projects/tutorials/en/master/pcl_visualizer.html |
I tried to delete vtk9.1 before, and then deleted the play, resulting in other dependencies appear abnormal, some component packages will automatically rely on vtk9.1, I here vtk9.1 is not installed by apt, but after installing ros2-humble desktop automatically in the system directory. Then I want to change to vtk8.2 library for compilation, the results of the compilation error, I show the top. If no vtk path is specified above, no error is reported when compiling. Tomorrow I will try gdb to query this abnormal crash problem. Thank you very much for your answer. Thank you |
I tried gdb capture and found the following questions: Thread 1 "obs_monitor_cpp" received signal SIGSEGV, Segmentation fault. Can I ask cmakelists to specify to look for vtk8.2 compilation now? I think there seems to be some conflict between vkt9.1 and pcl1.14. |
"deleted the play"? What do you mean?
But I assume ros2-humble was installed via apt? Then vtk9.1 was probably installed automatically by apt because it is the dependency of some ros2 package.
But why do you want to change to vtk8.2?
You compiled PCL from source yourself, is that correct? Which PCL version exactly, PCL 1.14.0 or PCL 1.14.1, or the current PCL master branch? When PCL was compiled, it used VTK 9.1. Therefore, in
These warnings are caused by VTK code. You can ignore them, they do not cause any problem. These warnings disappear in a newer VTK version. See: https://discourse.vtk.org/t/vtk-9-0-rc1/2916
Where is the stack trace (backtrace)? Please post it.
That is unlikely because these two versions have been tested repeatedly together, without problems. In fact, I just tested the code you posted at the top with VTK 9.1 and PCL 1.14 (the current master branch, to be precise). It worked without any problem. |
I uninstalled the pcl1.14.0 version of the library and re-source the pcl1.12.0 version. Then recompile the project, such as the following file: I really can't find out where the conflict, but also hope more advice |
What? Why? Did you read my last comment? I am pretty sure that there is no conflict between PCL 1.14 and VTK 9.1. And I am trying to help you find a solution to your problem, but if you do not answer my questions and do something completely different from what I have recommended, then I really cannot help you. |
For the previous answer, I'm sorry, I will change back to pcl1.14 version tomorrow. What I wanted to express before is that the version that comes with the download through ros-humble desktop does not have the complete information of the entire library after the compilation of vtk9.1 source code, so I will not use vtk9.1 in the later project. Because some of the.so files I wanted to download through ros-humble desktop did not have vtk9.1, so I would like to use the vtk-8.2 version, and the built-in vtk9.1 version cannot be deleted. Once deleted, other related library links will appear abnormal. Sorry again. Glad to hear from you. |
It is difficult to understand what you mean in your last comment:
VTK 9.1 does not have complete information? What is missing? C++ functions? C++ classes? Files? If yes, which ones?
I am confused. Did you compile VTK 9.1 from source? Meaning, did you download the VTK 9.1 source code, then build it with cmake and make?
Do you mean there are .so files of VTK 9.1 missing? If yes, which ones?
Which other libraries? Please run the following commands and post the console output here:
|
I had this error in the next installation of pcl1.14, the system had compiled pcl1.14.0. However, when the sudo make install command is executed, the following error occurs: CMake Error at /usr/share/cmake-3.22/Modules/FindMPI.cmake:1264 (try_compile): |
Describe the error
PCL_Version :1.14
VTK_version:8.2
ubuntu:22.04
CMakelists:
set(VTK_DIR "/usr/local/inclue/vtk-8.2")
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(PCL REQUIRED)
find_package(VTK REQUIRED NO_MODULE)
find_package(Boost REQUIRED)
find_package(Eigen REQUIRED)
find_package(pcl_conversions REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(tf2_sensor_msgs REQUIRED)
find_package(pcl_ros REQUIRED)
find_package(visualization_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
Error:
CMake Error at /usr/local/lib/cmake/vtk-8.2/vtkModuleAPI.cmake:140 (message):
Requested modules not available:
Call Stack (most recent call first):
/usr/local/lib/cmake/vtk-8.2/VTKConfig.cmake:143 (vtk_module_config)
/usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:270 (find_package)
/usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:319 (find_VTK)
/usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:540 (find_external_library)
CMakeLists.txt:15 (find_package)
If the vtk version is not specified in the first set, the compilation is OK, but the VTK version is identified as 9.1, and an exception will occur when executing the following code.
If this statement (viewer->wasStopped ()) is executed, the program immediately reports an error,Is this some kind of conflict?
The text was updated successfully, but these errors were encountered: