First time here? Check out the FAQ!


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 Oct 23 '11

Kyle Strabala gravatar image

updated Oct 24 '11

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.

Preview: (hide)

7 Answers

Sort by » oldest newest most voted
6

answered Oct 24 '11

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.

Preview: (hide)
2

answered Oct 23 '11

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.

Preview: (hide)

Comments

Thanks joq. I installed perception_pcl_unstable version which has the latest pcl_1.4 in it. :)
karthik gravatar image karthik  ( Jan 1 '12 )edit
2

answered Dec 24 '11

Rasoul gravatar image

updated Jan 18 '12

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

Preview: (hide)

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  ( Dec 24 '11 )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  ( Dec 24 '11 )edit
Would you please post a tutorial on how to do that?
Rasoul gravatar image Rasoul  ( Jan 12 '12 )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  ( Aug 4 '12 )edit
1

answered Oct 26 '11

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.

Preview: (hide)
0

answered Mar 8 '12

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/

Preview: (hide)
0

answered Nov 2 '18

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.

Preview: (hide)
0

answered Apr 17 '12

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?

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Oct 23 '11

Seen: 6,698 times

Last updated: Nov 02 '18