0
$\begingroup$

Rosanswers logo

Hi, I have a problem using PCL 1.9.1 on ubuntu 18.04. The pcl::NormalDistributionTransform works good but a segmentation fault occurs with the pcl::NormalDistributionTransform when I call for the setinputtarget(). Do you have any idea how to handle this error?


Originally posted by lotfishtaine on ROS Answers with karma: 76 on 2019-10-09

Post score: 0


Original comments

Comment by gvdhoorn on 2019-10-09:
How did you install PCL 1.9.1, and more importantly: how are you using it in your node(s)? Melodic still only uses 1.8.1 (see REP 3), so officially there is no support for 1.9.1.

Comment by lotfishtaine on 2019-10-09:
I installed PCL 1.9.1 from package and PCL 1.8.1 it comes when I install ros-melodic. btw compiler gives me some warnings like : warning: libpcl_......... .so.1.9, needed by /usr/local/lib/libpcl_segmentation.so, may conflict with libpcl_....... .so.1.8

Comment by gvdhoorn on 2019-10-09:
Ok. That is most likely why you get those SEGFAULTs.

Because of ABI problems you cannot just link nodes against PCL 1.9.1. You'll most likely have to build all ROS PCL interfacing packages from source. I've written something about that in #q289264.

Note that this is not a ROS problem, but something you always need to keep in mind when reusing binary artefacts (such as libraries): if there is no ABI compatibility guarantee, you cannot (re)link different versions into the same binary.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The solution which worked for me without building all ROS PCL interfacing packages from source is :

  1. locate the PCLConfig.cmake of the appropriate version (in my case version 1.8.1 which is the latest version supported by ros-melodic) by typing in a terminal : locate PCLConfig.cmake
  2. help cmake find this PCLConfig.cmake by adding this line in CMakeLists.txt :
set(PCL_DIR "/path/to/PCLConfig.cmake/")

before this one:

find_package(PCL 1.8 REQUIRED)
  1. delete devel and build folders and rebuild

Originally posted by lotfishtaine with karma: 76 on 2019-10-10

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2019-10-10:
If you're happy we're happy, but please note that you've created a brittle situation where any changes to that file will result in an incorrect configuration of paths and libraries again.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.