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

help installing pcl on ROS Indigo

asked 2016-03-11 06:28:25 -0500

I'm currently trying to install the point cloud library so I can use it's RANSAC features for sphere detection.

There seem to be lots of tutorials about using the PCL with ros but I can't find anything about how to install it. I've been following the answer to this ros answer:

http://answers.ros.org/question/20151...

I've added the dependency to my package.xml file so it now looks like this

<?xml version="1.0"?>
<package>
  <name>sme_awareness</name>
  <version>0.0.1</version>
  <description>Package of Lidar and Camera awareness tools</description>
  <maintainer email="pete.blacker@gmail.com">pete blacker</maintainer>
  <license>TODO</license>
  <url type="website">http://www.PeteBlacker.com</url>
  <author email="pete.blacker@gmail.com">pete blacker</author>

  <build_depend>message_generation</build_depend>

  <run_depend>message_runtime</run_depend>

  <!-- Use test_depend for packages you need only for testing: -->
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend version_gte="1.7.0">pcl</build_depend>
  <build_depend>libpcl-all-dev</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>sensor_msgs</build_depend>
  <build_depend>geometry_msgs</build_depend>
  <build_depend>tf</build_depend>
  <build_depend>tf2</build_depend>
  <build_depend>tf2_ros</build_depend>
  <build_depend>image_transport</build_depend>
  <build_depend>cv_bridge</build_depend>
  <build_depend>dp_ptu47_msgs</build_depend>

  <run_depend version_gte="1.7.0">pcl</run_depend>
  <run_depend>libpcl-all-dev</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>rospy</run_depend>
  <run_depend>std_msgs</run_depend>
  <run_depend>sensor_msgs</run_depend>
  <run_depend>geometry_msgs</run_depend>
  <run_depend>tf</run_depend>
  <run_depend>tf2</run_depend>
  <run_depend>tf2_ros</run_depend>
  <run_depend>image_transport</run_depend>
  <run_depend>cv_bridge</run_depend>
  <run_depend>dp_ptu47_msgs</run_depend>

  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- Other tools can request additional information be placed here -->
  </export>
</package>

However when I execute the command:

rosdep install --from-paths src --ignore-src --rosdistro indigo -y

I get the error:

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
sme_awareness: Cannot locate rosdep definition for [pcl]

Can anyone help me get this up and running? Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-03-12 15:17:14 -0500

ahendrix gravatar image

updated 2016-03-12 15:20:44 -0500

You're depending on both pcl and libpcl-all-dev in your package.xml, and rosdep is telling you that pcl isn't a valid package or rosdep.

If you look through the rosdep database, pcl is not listed. It looks like libpcl-all and libpcl-all-dev are the runtime and build dependencies that will install pcl.

I would recommend that you replace:

<build_depend version_gte="1.7.0">pcl</build_depend>
<build_depend>libpcl-all-dev</build_depend>

With:

<build_depend>libpcl-all-dev</build_depend>

(and similar for your run dependency)

edit flag offensive delete link more

Comments

The code listed on the answer you linked to is a diff: it shows both the old version (- and red) and the new version (+ and green). You ONLY need the new parts.

ahendrix gravatar image ahendrix  ( 2016-03-12 15:20:00 -0500 )edit

Thanks for the reply, this looks good. I'm afraid I've already managed to get this working. pcl had installed find using apt-get the missing link was perception_pcl. When I installed that also using apt-get then it all started working. TBH your solution looks like it would have been easier!

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2016-03-21 15:17:07 -0500 )edit
-1

answered 2016-03-12 12:55:32 -0500

one way is to install it from source,

I assume that you want to use newer version of PCL (which was not installed with ROS). You would need to install PCL from source. Download desired PCL repo from this link. Then, compile it from source while setting USE_ROS param 'true'.

mkdir build
cd build 
cmake .. -DUSE_ROS=1
sudo make install -j

next is to include standalone-pcl directory in CMakeLists.txt file of your package using find_package(PCL 1.7 REQUIRED) include_directories(${PCL_INCLUDE_DIRS} ) and linking executable with target_link_libraries(exec_name ${catkin_LIBRARIES} ${PCL_LIBRARIES})

hope this helps

edit flag offensive delete link more

Comments

1

His question is about why rosdep fails to install PCL; not about how to install PCL from source.

ahendrix gravatar image ahendrix  ( 2016-03-12 15:17:53 -0500 )edit

Sorry my bad, i thought if he could install it from source instead of rosdep ..

Sudeep gravatar image Sudeep  ( 2016-03-13 05:01:56 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-11 06:28:25 -0500

Seen: 2,801 times

Last updated: Mar 12 '16