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

ubuntu_22 : ROS2_humble :/usr/include/pcl_conversions/pcl_conversions.h:fatal error: pcl/conversions.h: No such file or directory

asked 2022-12-23 01:14:34 -0600

gnykumar@gmail.com gravatar image

updated 2022-12-26 16:24:26 -0600

ljaniec gravatar image

Recently I started working in ROS2, while using some of pcl function I face below error.

For #include <pcl_conversions/pcl_conversions.h> I am getting the fatal error

/usr/include/pcl_conversions/pcl_conversions.h:44:10: fatal error: pcl/conversions.h: No such file or directory
   44 | #include <pcl/conversions.h>

Platform : Ubuntu 22.04

ros-humble-pcl-conversions 2.4.0-4jammy.20221207.034537 amd64 Provides conversions from PCL data types and ROS message types

libpcl-dev 1.12.1+dfsg-3build1amd64 Point Cloud Library - development files

edit retag flag offensive close merge delete

Comments

1

libpcl-dev is a system library. Do you have a find_package(PCL REQUIRED ...) statement in your CMakeLists.txt?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-12-25 08:47:48 -0600 )edit

4 Answers

Sort by » oldest newest most voted
1

answered 2022-12-26 00:54:05 -0600

gnykumar@gmail.com gravatar image

one of the missing part from my try, but I added that also in CMakeList find_package(PCL COMPONENT REQUIRED), AND missed this part : include_directories( include ${PCL_INCLUDE_DIRS} ) and before ament_package() add this - ament_export_include_directories(include) Now it is working.

edit flag offensive delete link more

Comments

Your ros app having a dependency on pcl_conversions in CMakeLists.txt should have been enough for your build to succeed. However, this is the correct workaround if that doesn't work for some reason.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-12-26 09:36:28 -0600 )edit
0

answered 2023-04-20 21:35:35 -0600

updated 2023-04-26 08:12:13 -0600

  1. My solution: CMake find_package(pcl_conversions REQUIRED) target_include_directories(${PROJECT_NAME} PUBLIC ${pcl_conversions_INCLUDE_DIRS} )
  2. analysis:Unable to find pcl_conversions The dependency of conversions,It belongs to ROS。 shell $ ll /opt/ros/humble/include/ |grep pcl drwxr-xr-x 2 root root 4096 4moon 3 12:37 grid_map_pcl/ drwxr-xr-x 2 root root 4096 4moon 3 11:58 pcl_conversions/ drwxr-xr-x 3 root root 4096 4moon 3 11:58 pcl_msgs/ drwxr-xr-x 8 root root 4096 4moon 3 12:36 pcl_ros/

Second answer:

Same problem: this time it depends on CV_ Bridge and image_ transport。 It seems that dependencies belonging to ROS will always be like this. I added these two lines in package.xml to solve the problem <depend>cv_bridge</depend> <depend>image_transport</depend> Dependencies related to ROS not only need to be added in the CMakeLists.txt file, but also in the package.xml file

edit flag offensive delete link more
0

answered 2023-04-19 19:32:21 -0600

Looks like apt installs to a weird place. I solved this by adding

include_directories(/opt/ros/humble/include)

in my make file.

edit flag offensive delete link more
0

answered 2022-12-24 16:46:37 -0600

ljaniec gravatar image

Did you try to sudo apt-get install ros-humble-pcl-conversions? It is not in the base packages, I think.

edit flag offensive delete link more

Comments

1

Yeah, Did but missed to add all required contents in CMakelist

gnykumar@gmail.com gravatar image gnykumar@gmail.com  ( 2022-12-26 00:55:36 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-12-23 01:14:34 -0600

Seen: 3,791 times

Last updated: Apr 26 '23