ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Build error in ROS Humble: pcl_msgs/msg/point_indices.hpp not found in pcl_conversions

asked 2023-05-12 20:01:39 -0500

ryohei sasaki gravatar image

updated 2023-05-15 21:43:47 -0500

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.

edit retag flag offensive close merge delete

Comments

Are you adding pcl_msgs as a dependency in your CMake?

Bernat Gaston gravatar image Bernat Gaston  ( 2023-05-15 06:07:10 -0500 )edit

Yes, I am adding pcl_msgs as a dependency in my CMake file.

ryohei sasaki gravatar image ryohei sasaki  ( 2023-05-15 07:20:17 -0500 )edit

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.

Bernat Gaston gravatar image Bernat Gaston  ( 2023-05-15 07:26:49 -0500 )edit

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

ryohei sasaki gravatar image ryohei sasaki  ( 2023-05-15 09:07:26 -0500 )edit

sudo apt install locate sudo updatedb locate point_indices.hpp

Bernat Gaston gravatar image Bernat Gaston  ( 2023-05-15 09:11:07 -0500 )edit

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)?

130s gravatar image 130s  ( 2023-05-15 15:05:42 -0500 )edit

@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

ryohei sasaki gravatar image ryohei sasaki  ( 2023-05-15 18:54:21 -0500 )edit
1

@130s This problem is reproduced even after running CI many times...

ryohei sasaki gravatar image ryohei sasaki  ( 2023-05-15 18:56:18 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-06-09 05:12:37 -0500

130s gravatar image

Glad we're seeing at least one resolution. For future, linking to external sites is unreliable way of sharing a solution (e.g. what if the external site becomes unavailable). I'm trying to list what was effective from the PR li_slam_ros2!21.

That should be it, nice find.

Btw, the following is just what I noticed.

  • I see many lines where you switch from the smart pointers provided by the library (PCL) to the one provided by boost. I feel that is a bit counter-trend of moving away from boost's smart pointer. I don't know. E.g.:

    • OLD #include <pcl/filters/boost.h>
    • NEW #include <boost/shared_ptr.hpp>
  • It is find_package(PCL 1.12 ing. Did you really need a versioned library?
edit flag offensive delete link more

Comments

Thank you very much for your kind input.

You are absolutely right about the multiple lines where the switch to boost's smart pointers is happening. I hadn't noticed that before, and I appreciate you bringing it to my attention. I will make the necessary corrections.

Regarding the need for version specification, I'm not sure if it was truly necessary. The changes were introduced during the transition from foxy to humble, and I haven't examined them as they were contributed by external contributors. I will investigate this further and ensure its validity.

Once again, thank you for your valuable insights and assistance.

ryohei sasaki gravatar image ryohei sasaki  ( 2023-06-09 08:31:39 -0500 )edit
0

answered 2023-06-08 17:41:30 -0500

ryohei sasaki gravatar image
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-05-12 20:01:39 -0500

Seen: 190 times

Last updated: Jun 09