ROS2/Jammy/Humble plugin compilation error: fatal error: gazebo_ros/node.hpp: No such file or directory
I have a plugin project that compiles OK on ROS2/Focal/Foxy in a Docker container.
After upgrading the Docker container to ROS2/Jammy/Humble the compilation fails with "fatal error: gazeboros/node.hpp: No such file or directory". For the full compilation output: see below. However "gazeboros/node.hpp" is on the disk: see the output of "locate gazebo_ros/node.hpp" below.
I suspect that I am missing a cmake-related package or that there is a bug in an installed cmake-related package. I have installed ros-humble-desktop, ros-humble-ros-gz and ros-humble-gazebo-ros-pkgs.
Does anyone have any idea? Do I need to provide more information? If so, what?
TIA
Joost
Compilation and locate output:
user@7bff3c3fced1:/data/workspace$ colcon build --base-path src --packages-select rosgazebodemo
Starting >>> rosgazebodemo
--- stderr: rosgazebodemo
CMake Deprecation Warning at CMakeLists.txt:1 (cmakeminimumrequired):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args
(PkgConfig)
does not match the name of the calling package (gazebo). This can lead to
problems in calling code that expects find_package
result variables
(e.g., _FOUND
) to follow a certain pattern.
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:99 (findpackagehandlestandardargs)
/usr/lib/x8664-linux-gnu/cmake/gazebo/gazebo-config.cmake:72 (include)
CMakeLists.txt:11 (findpackage)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Deprecation Warning at /opt/ros/humble/share/rosidlcmake/cmake/rosidltargetinterfaces.cmake:32 (message): Use rosidlgettypesupporttarget() and targetlinklibraries() instead of rosidltargetinterfaces() Call Stack (most recent call first): CMakeLists.txt:35 (rosidltargetinterfaces)
CMake Deprecation Warning at /opt/ros/humble/share/rosidlcmake/cmake/rosidltargetinterfaces.cmake:32 (message): Use rosidlgettypesupporttarget() and targetlinklibraries() instead of rosidltargetinterfaces() Call Stack (most recent call first): CMakeLists.txt:44 (rosidltargetinterfaces)
In file included from /data/workspace/src/rosgazebodemo/src/cubelowlevel.cpp:3: /data/workspace/src/rosgazebodemo/include/cubelowlevel.hpp:10:10: fatal error: gazeboros/node.hpp: No such file or directory 10 | #include <gazeboros/node.hpp> | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/cubelowlevel.dir/build.make:76: CMakeFiles/cubelowlevel.dir/src/cubelowlevel.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:596: CMakeFiles/cubelowlevel.dir/all] Error 2 gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
Failed <<< rosgazebodemo [7.44s, exited with code 2]
Summary: 0 packages finished [7.61s] 1 package failed: rosgazebodemo 1 package had stderr output: rosgazebodemo
user@7bff3c3fced1:/data/workspace$ locate gazeboros/node.hpp /opt/ros/humble/include/gazeboros/node.hpp
Asked by askesis on 2023-04-15 09:57:31 UTC
Comments