ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
5

How do you upgrade pcl to the current release?

asked 2011-10-23 10:04:03 -0500

Kyle Strabala gravatar image

updated 2011-10-24 11:31:15 -0500

kwc gravatar image

How can I update/upgrade the pcl library used by ROS? I downloaded the latest source code for PCL from pointclouds.org, added some functionality, and now I want to use this new code in my ROS nodes. However, I cannot determine how to overwrite the ROS pcl package.

Things I've tried:

1) Replacing the files/libraries I changed in the pcl package. Doesn't work because other stuff was updated in addition to the stuff I changed.

2) Removing the dependency on the ROS pcl package and use CMakeLists.txt to link to the system pcl library. Doesn't work because pcl and ROS try to declare some of the same classes.

Someone must know how to do this because pcl is so popular in ROS. It would be nice to have some documentation on it.

Thanks, Kyle.

edit retag flag offensive close merge delete

7 Answers

Sort by » oldest newest most voted
6

answered 2011-10-24 06:03:19 -0500

tfoote gravatar image

You have encountered the basic problem of integration. Like every other library used in ROS we have picked a version of PCL to integrate around. Usually this is not the newest version of any library, and even if it started as the newest version, as soon as there's a new feature release it will no longer be the newest version. Most users of ROS and PCL together use the integrated version for we work hard to keep the API stable and not break their code.

If you would like to change what version you are using, as you stated you have three options, either replace it with the other version, patch the feature back against the old version or install the new version side by side with the old one.

If you want specific features from newer versions you need to choose whether the feature you want is worth upgrading your installation to a non standard version and possibly breaking other code in your repository. Another option is to backport the specific features you want to change into a patch for your existing library. And lastly you can try to install the library side by side as you suggested, however this too is hard due to namespace collisions. If you want to do this you cannot link against both versions of the library. (Removing the pcl dependency is not enough, you cannot depend on any package which depends on PCL either.)

As @joq mentioned we're working on making it so that PCL and ROS integrate in a more standard way in future versions, however that will not solve the fundamental problem.

edit flag offensive delete link more
2

answered 2011-10-23 14:48:40 -0500

joq gravatar image

As you discovered, the standalone PCL library is not compatible with ROS. We all hope this will be fixed in an upcoming release.

A newer version will probably appear in the ROS unstable release eventually, but it does not appear to be there yet.

edit flag offensive delete link more

Comments

Thanks joq. I installed perception_pcl_unstable version which has the latest pcl_1.4 in it. :)
karthik gravatar image karthik  ( 2012-01-01 17:59:13 -0500 )edit
2

answered 2011-12-24 02:13:57 -0500

Rasoul gravatar image

updated 2012-01-17 23:17:56 -0500

These are steps to install the latest PCL on top of ROS electric.

  • first, install rosinstall,

sudo apt-get install python-setuptools
sudo easy_install -U rosinstall

  • second, create an overlay,

rosinstall ~/ros /opt/ros/electric
echo "source ~/ros/setup.bash" >> ~/.bashrc

  • Now create a .rosinstall file for perception_pcl_unstable,

roslocate info perception_pcl > perception_pcl_unstable.rosinstall

inside the file perception_pcl_unstable.rosinstall should be something like this,

- svn:
       local-name: perception_pcl
       uri: http://svn.pointclouds.org/ros/trunk/perception_pcl_unstable

rosinstall ~/ros perception_pcl_unstable.rosinstall

  • resource ~/ros/setup.bash,

source ~/ros/setup.bash

  • change directory and rosmake the package,

cd ~/ros/perception_pcl
rosmake

edit flag offensive delete link more

Comments

Unfortunately, I couldn't find any other way to use the latest release of PCL in ROS. However, If you know any other way which is safer to do it, please let me know.
Rasoul gravatar image Rasoul  ( 2011-12-24 02:52:01 -0500 )edit
1
I would recommend using `rosinstall` to build a `perception_pcl_unstable` overlay on top of ROS Electric. That is the usual solution for problems like this. Maybe there is some reason it does not work in this case. I don't know, because I have not tried it.
joq gravatar image joq  ( 2011-12-24 04:52:08 -0500 )edit
Would you please post a tutorial on how to do that?
Rasoul gravatar image Rasoul  ( 2012-01-11 23:03:56 -0500 )edit
joq gravatar image joq  ( 2012-01-12 01:39:21 -0500 )edit

If, like me, you were wondering why perception_pcl_unstable/pcl (or perception_pcl_electric_unstable) does not contain much in the way of the pcl package, it is because the build process automatically downloads the version specified in pcl/Makefile into the build directory.

DamienJadeDuff gravatar image DamienJadeDuff  ( 2012-08-04 02:42:47 -0500 )edit
1

answered 2011-10-26 17:56:04 -0500

Kyle Strabala gravatar image

I was able to install and use a modified version of pcl 1.1.1 (I think this is the ROS electric version). I using electric on lucid.

Checkout pcl 1.1.1

svn co http://svn.pointclouds.org/pcl/tags/pcl-1.1.1 ~/pcl_1_1_1_svn

Use ccmake to change USE_ROS to "ON" and the install directory to your ROS pcl package folder. I created a copy of the perception_pcl package and pointed cmake to the ROS pcl package in it.

cd ~/pcl_1_1_1_svn
ccmake .

Make your changes to the code and then compile and install.

make
make install

I got some compile errors complaining about missing dependencies for test_common.cpp. Adding the following to <pcl_root>/common/test/CMakeLists.txt fixed it.

link_ros_libs (test_common)

Finally, recompile the ROS pcl package and all the packages that depend on it.

edit flag offensive delete link more
0

answered 2012-03-08 04:44:32 -0500

karthik gravatar image

perception_pcl_electric_unstable is available for the people who want to use latest pcl version and also the version in the trunk at http://svn.pointclouds.org/ros/trunk/perception_pcl_electric_unstable/

edit flag offensive delete link more
0

answered 2018-11-02 05:59:10 -0500

afrixs gravatar image

Thisi is what worked for me:

  1. download, cmake, make and make install PCL from github
  2. download perception_pcl from github and put it into catkin_ws/src
  3. edit CMakeLists.txt of both pcl_ros and pcl_conversions packages (inside perception_pcl folder) and add version of your PCL package into find_package command

find_package(PCL 1.8 REQUIRED COMPONENTS core ...)

This makes ROS look for your customized pcl_ros package instead of the one installed via package manager, which consequently looks for PCL built from source instead of the old version installed via package manager.

edit flag offensive delete link more
0

answered 2012-04-17 00:31:02 -0500

clemens gravatar image

Which is the compatible version of the perception_pcl_addons stack that I have to use with the overlayed perception_pcl_electric_unstable stack?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2011-10-23 10:04:03 -0500

Seen: 6,652 times

Last updated: Nov 02 '18