Re: Compiling in ROS-Indigo with PCL-1.7.2: Undefined reference to...
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Compiling-in-ROS-Indigo-with-PCL-1-7-2-Undefined-reference-to-tp386p400.html
Yes, ROS installs PCL 1.7.1-3 (libpcl-1.7-all): the packages
ros-indigo-perception-pcl,
ros-indigo-pcl-ros and
ros-indigo-pcl-conversions installed by ROS depend on it. I just noticed that you don't have to remove libpcl-1.7-all already installed by ROS, you should only remove the pcl ROS packages and build them again in your workspace (they will link on the first pcl found, which is the one in /usr/local/lib instead of the one in /usr/lib).
In summary to use 1.7.2:
Build/Install PCL 1.7.2 (in /usr/local by default):
$ git clone https://github.com/PointCloudLibrary/pcl.git pcl-1.7.2
$ cd pcl-1.7.2
$ git checkout tags/pcl-1.7.2
$ mkdir build
$ cmake ..
$ make
$ sudo make install
Remove indigo pcl packages:
$ sudo apt-get remove ros-indigo-perception-pcl ros-indigo-pointcloud-to-laserscan ros-indigo-pcl-ros ros-indigo-pcl-conversions
Build indigo pcl packages:
$ roscd
$ cd ../src
$ git clone -b indigo-devel https://github.com/ros-perception/pcl_conversions.git
$ git clone -b indigo-devel https://github.com/ros-perception/perception_pcl.git
$ cd ..
$ catkin_make
Now you can follow the
RTAB-Map's installation instructions. Everything should be linked on your PCL 1.7.2 built from source.
cheers