# ROS PCL tutorial actually works?

So, apparently ROS uses its own version of PCL, pcl_ros, which is different from the original PCL branch.

I was following the first ROS+PCL tutorial, and it seemed ok, but then I got to this part at the end of the tuto, which includes #include <pcl/sample_consensus/model_types.h>. While there is such file in the PCL github repo, I cannot find it in the ROS PCL include folder...

From this I can only assume one of two things: either the tutorial is wrong - it should not include such file but another one instead -, OR you are supposed to use the actual PCL repo code, adding the libraries by editing the CMakeLists.txt and including something like

find_package(PCL 1.7 REQUIRED)
include_directories(\${PCL_INCLUDE_DIRS})
[...]


As described in the original PCL tutorials, which is not mentioned in the tutorial. - either way the tutorial appears to be wrong.

Am I missing something? Can you use both PCL's alongside each other, or what? I'm afraid that would lead to some conflicts because many files have the same name in the same subfolders.

edit retag close merge delete

1

ROS uses the upstream version of PCL, and the pcl_ros package is a set of adapters to make PCL compatible with ROS message types.

( 2018-04-06 01:57:22 -0500 )edit

Hm... I see. But how does it compile if I didn't specify anywhere I wanted to link against the PCL libraries? What I mean is, I have all the PCL's .so files inside /usr/local/lib, but nowhere specified where they are or to use them. There is no find_package() for PCL, but it is being used.

( 2018-04-08 15:48:47 -0500 )edit

pcl_ros provides a transitive dependency on the upstream PCL library.

( 2018-04-09 09:56:28 -0500 )edit