Setting up ROS2 with a pmd 3D Camera

asked 2023-07-13 10:44:05 -0500

Jakobjung10 gravatar image

Hi!

I was following this tutorial. https://www.youtube.com/watch?v=2d3qm...

At 5:33 in the tutorial, you have to execute

'colcon build --cmake-args "-DCMAKE_PREFIX_PATH=/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/ros2_ws$ colcon build --cmake-args "-DCMAKE_PREFIX_PATH=/home/madas/Documents/Jungreuthmayer/libroyale-5.4.0.2112-LINUX-x86-64Bit/lib/cmake" Starting >>> royale_in_ros2 --- stderr: royale_in_ros2
CMake Deprecation Warning at /home/madas/Documents/Jungreuthmayer/libroyale-5.4.0.2112-LINUX-x86-64Bit/lib/cmake/royaleCompat.cmake:39 (message): variable 'royale_LIB_DIR' is deprecated!

Please use target royale::royale to link against libroyale Silence this warning with ROYALE_DEPRECATION_WARNING=OFF Call Stack (most recent call first): CMakeLists.txt:9223372036854775807 (variable_is_deprecated) CMakeLists.txt:16 (link_directories)

In file included from /home/madas/Documents/Jungreuthmayer/Tutorials/pmdCamera/ros2_ws/src/sampleROS2/src/RoyaleInRos.cpp:11: /home/madas/Documents/Jungreuthmayer/Tutorials/pmdCamera/ros2_ws/src/sampleROS2/include/sampleROS2/RoyaleInRos.hpp:15:10: fatal error: pluginlib/class_list_macros.hpp: No such file or directory 15 | #include <pluginlib class_list_macros.hpp=""> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. gmake[2]: * [CMakeFiles/royale_nodelet.dir/build.make:90: CMakeFiles/royale_nodelet.dir/src/RoyaleInRos.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:144: CMakeFiles/royale_nodelet.dir/all] Error 2 gmake[1]: ** Waiting for unfinished jobs....

gmake: * [Makefile:146: all] Error 2

Failed <<< royale_in_ros2 [5.72s, exited with code 2]

Summary: 0 packages finished [6.13s] 1 package failed: royale_in_ros2 1 package had stderr output: royale_in_ros2


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

edit retag flag offensive close merge delete