Ask Your Question
0

Segmentation fault (core dumped) with PCL 1.9

asked 2019-10-09 05:27:34 -0500

lotfishtaine gravatar image

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?

edit retag flag offensive close merge delete

Comments

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.

gvdhoorn gravatar imagegvdhoorn ( 2019-10-09 05:30:50 -0500 )edit

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

lotfishtaine gravatar imagelotfishtaine ( 2019-10-09 05:45:24 -0500 )edit

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.

gvdhoorn gravatar imagegvdhoorn ( 2019-10-09 05:48:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-10 08:00:27 -0500

lotfishtaine gravatar image

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
edit flag offensive delete link more

Comments

2

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.

gvdhoorn gravatar imagegvdhoorn ( 2019-10-10 08:15:26 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-10-09 05:27:34 -0500

Seen: 37 times

Last updated: Oct 10