Setting up ROS2 with a pmd 3D Camera
Hi!
I was following this tutorial. https://www.youtube.com/watch?v=2d3qmIE8JGQ&t=302s
At 5:33 in the tutorial, you have to execute
'colcon build --cmake-args "-DCMAKEPREFIXPATH=/home/madas/Documents/Jungreuthmayer/libroyale-5.4.0.2112-LINUX-x86-64Bit/lib/cmake"'
I always get the following error-output:
madas@madas-ThinkPad-T460s:~/Documents/Jungreuthmayer/Tutorials/pmdCamera/ros2ws$ colcon build --cmake-args "-DCMAKEPREFIXPATH=/home/madas/Documents/Jungreuthmayer/libroyale-5.4.0.2112-LINUX-x86-64Bit/lib/cmake"
Starting >>> royaleinros2
--- stderr: royaleinros2
CMake Deprecation Warning at /home/madas/Documents/Jungreuthmayer/libroyale-5.4.0.2112-LINUX-x86-64Bit/lib/cmake/royaleCompat.cmake:39 (message):
variable 'royaleLIB_DIR' is deprecated!
Please use target royale::royale to link against libroyale Silence this warning with ROYALEDEPRECATIONWARNING=OFF Call Stack (most recent call first): CMakeLists.txt:9223372036854775807 (variableisdeprecated) CMakeLists.txt:16 (link_directories)
In file included from /home/madas/Documents/Jungreuthmayer/Tutorials/pmdCamera/ros2ws/src/sampleROS2/src/RoyaleInRos.cpp:11:
/home/madas/Documents/Jungreuthmayer/Tutorials/pmdCamera/ros2ws/src/sampleROS2/include/sampleROS2/RoyaleInRos.hpp:15:10: fatal error: pluginlib/classlistmacros.hpp: No such file or directory
15 | #include
gmake: *** [Makefile:146: all] Error 2
Failed <<< royaleinros2 [5.72s, exited with code 2]
Summary: 0 packages finished [6.13s] 1 package failed: royaleinros2 1 package had stderr output: royaleinros2
One problem could be that i my Ros2-Version is "Humble". However, in the tutorial, version "Foxy" is used.
Also, i have noticed that in the libroyale-folder, i don't have a share-folder as shown in the tutorial. This is probably due to an older version in the tutorial. (Note: libroyale is not specific to Ros) In my case, the appropriate cmake-file can be found in libroyale-5.4.0.2112-LINUX-x86-64Bit/lib/royaleConfig.cmake.
In the tutorial, the file has a slightly different name: "royale-config.cmake".
Maybe, the solution is to change some specifications in the CMakeLists.txt-file in the sampleROS2-folder. (e.g. include directories). Maybe, the package.xml has to be adjusted too.
The file that can't be found is a file which is contained in the ros2-installation-folder. For some reason, it can't be found. I am also quite sure, that there are more files which can't be found but this is the first one so build-process stops here.
I would be glad about any help.
BR, Jakob
Asked by Jakobjung10 on 2023-07-13 10:44:05 UTC
Comments