Robotics StackExchange | Archived questions

ros2 foxy pcl/conversions.h not found

I'm using ROS2 foxy (desktop install) and i am trying to include pclconversions. I get an error message from pclconversions.h saying:

/opt/ros/foxy/include/pcl_conversions/pcl_conversions.h:46:10: fatal error: pcl/conversions.h: No such file or directory
   46 | #include <pcl/conversions.h>
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

I have included pcl_ros and PCL as required packages in my CMakeList, and I have checked for missing dependencies with rosdep using

rosdep install -i --from-path src --rosdistro foxy -y

and it says all required rosdeps are installed successfully. I am new to ros and I can't find information on what pcl package I need to install. Would greatly appreciate help!

Asked by lfrg95 on 2023-02-19 09:23:01 UTC

Comments

Answers

You need to also link it against pcl_conversions.

find_package(pcl_conversions REQUIRED)
ament_target_dependencies(node 
   ...
   "pcl_conversions"
)

should do the trick

Asked by GeorgNo on 2023-02-20 07:30:06 UTC

Comments