Build error in ROS Humble: pcl_msgs/msg/point_indices.hpp not found in pcl_conversions
I am currently using ROS Humble and encountering an error during the build process. Specifically, the file pcl_msgs/msg/point_indices.hpp cannot be found. This error occurs when trying to build the scanmatcher package(my package), which utilizes pcl_conversions.
Here are the details of the error message: This happens in both local and CI environments. https://github.com/rsasaki0109/li_sla...
In file included from /home/runner/ros2_ws/src/li_slam_ros2/scanmatcher/include/scanmatcher/utility.h:60,
from /home/runner/ros2_ws/src/li_slam_ros2/scanmatcher/src/imu_preintegration.cpp:31:
/opt/ros/humble/include/pcl_conversions/pcl_conversions.h:61:10: fatal error: pcl_msgs/msg/point_indices.hpp: No such file or directory
61 | #include <pcl_msgs/msg/point_indices.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/imu_preintegration.dir/build.make:76: CMakeFiles/imu_preintegration.dir/src/imu_preintegration.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:195: CMakeFiles/imu_preintegration.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
Failed <<< scanmatcher [2min 49s, exited with code 2]
What's puzzling is that pcl_conversions is installed via apt, so I'm not sure why this error is occurring. There doesn't seem to be a problem with the CMakeLists.txt, and all the other dependency packages should be installed as well. Any hints or suggestions to solve this problem would be greatly appreciated.
Thank you in advance for your help.
Are you adding pcl_msgs as a dependency in your CMake?
Yes, I am adding pcl_msgs as a dependency in my CMake file.
Ok. Can you search for this file? I usually use locate for finding these files. Just to see if the file is in the system. Sometimes the headers come in the -dbg package of the library which comes separately in apt.
I am also verifying the existence of 'pcl_msgs/msg/point_indices.hpp' using the 'locate' command. By the way, I didn't find a solution even when asking ChatGPT-4
sudo apt install locate sudo updatedb locate point_indices.hpp
Took a deeper look and yet I haven't found a culprit (assuming https://github.com/rsasaki0109/li_sla... is what this question is based on). I'd re-run the same CI job and see (sorry for a dumb suggestion)?
@Bernat Gaston The result of the "locate point_indices.hpp" command is shown below. It happened both locally and in CI.
/opt/ros/humble/include/pcl_msgs/pcl_msgs/msg/point_indices.hpp
@130s This problem is reproduced even after running CI many times...