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

Revision history [back]

click to hide/show revision 1
initial version

PCL is a 'system dependency' (ie: something used by ROS packages, but not a ROS package itself).

To use a newer version of a system dependency there is a relatively simple procedure:

  1. identify all packages that you use that depend on the system dependency
  2. clone their source repositories into your workspace
  3. install the newer version of the system dependency (this will most likely install it in /usr/local if building from source, or if you're using your system's pkg manager, in the appropriate system location)
  4. in case you have parallel installations of the same dependency on your system: update the CMakeLists.txt of all affected packages to add version requirements to the find_package(..) lines
  5. build the workspace

At this point all the packages in your workspace should be using the new version of the dependency (provided you did step 4 correctly).

Step 1 is really important: it's allright to use pkg A with dependency X version Q, and pkg B with dependency X version W, as long as A does not link anything from B, nor B from A. Linking two different versions of dependency X into the same binary is generally not very stable, and can lead to SEGFAULTs (in the case of C/C++) and/or other strange, unexpected and hard to diagnose problems.

If the two packages do not directly share any binary artefacts, but are standalone and communicate only through messages, it can work.

Step 4 is equally important: pkgs typically look for PCL with something like find_package(PCL REQUIRED). If you have both 1.7 and 1.8 on your system, CMake may end up finding 1.7 before 1.8, resulting in 1.7 being used.


So summarising: follow the above procedure, and make sure to update any find_package(PCL ..) lines to read find_package(PCL 1.8 ..). If depending on any of the perception_ros packages, you would have to update the line in (at least) pcl_ros.

PCL is a 'system dependency' (ie: something used by ROS packages, but not a ROS package itself).

To use a newer version of a system dependency there is a relatively simple procedure:

  1. identify all packages that you use that depend on the system dependencydependency (read: all ROS packages that you use that (indirectly) depend on the dependency)
  2. clone their source repositories into your workspace
  3. install the newer version of the system dependency (this will most likely install it in /usr/local if building from source, or if you're using your system's pkg manager, in the appropriate system location)
  4. in case you have parallel installations of the same dependency on your system: update the CMakeLists.txt of all affected packages to add version requirements to the find_package(..) lines
  5. build the workspace

At this point all the packages in your workspace should be using the new version of the dependency (provided you did step 4 correctly).

Step 1 is really important: it's allright to use pkg A with dependency X version Q, and pkg B with dependency X version W, as long as A does not link anything from B, nor B from A. Linking two different versions of dependency X into the same binary is generally not very stable, and can lead to SEGFAULTs (in the case of C/C++) and/or other strange, unexpected and hard to diagnose problems.

If the two packages do not directly share any binary artefacts, but are standalone and communicate only through messages, it can work.

Step 4 is equally important: pkgs typically look for PCL with something like find_package(PCL REQUIRED). If you have both 1.7 and 1.8 on your system, CMake may end up finding 1.7 before 1.8, resulting in 1.7 being used.


So summarising: follow the above procedure, and make sure to update any find_package(PCL ..) lines to read find_package(PCL 1.8 ..). If depending on any of the perception_ros packages, you would have to update the line in (at least) pcl_ros.