I did this a while back, here is what I did.
First you need to have the pcl_ros
package in your workspace, or you need to install all of the debians which pcl_ros
depends on. Since I am on a mac, I will fetch all of the dependencies and build them from source, so I will start like this:
Note: the /tmp
directory is cleared at reboot, you may want to pick a different directory
cd /tmp
mkdir pcl_ws
cd pcl_ws
wstool init src <a href="http://packages.ros.org/web/rosinstall/generate/raw/groovy/pcl_ros">http://packages.ros.org/web/rosinstall/generate/raw/groovy/pcl_ros</a>
That downloaded pcl_ros
and all of it's dependencies into the src
folder, including pcl-1.6
which is what is released with groovy. Lets remove that version of pcl
so that we can replace it later:
rm -rf src/pcl
If you only want to rebuild pcl
and pcl_ros
from source then run sudo apt-get install ros-groovy-pcl-ros
in order to get all of the dependencies you need and then setup a workspace with pcl_ros
in it:
# Only do this if you did the apt-get and did not run wstool above
cd /tmp
mkdir pcl_ws
cd pcl_ws
mkdir src
cd src
git clone <a href="https://github.com/ros-perception/perception_pcl.git">https://github.com/ros-perception/perception_pcl.git</a>
Either way, at this point you have the /tmp/pcl_ws/src
folder now which contains at least pcl_ros
. In the src
folder you should clone the master of pcl
(1.7):
cd /tmp/pcl_ws/src
git clone <a href="https://github.com/PointCloudLibrary/pcl.git">https://github.com/PointCloudLibrary/pcl.git</a>
Next you need to "ROS"-ify the pcl
package. First you need the package.xml
for pcl
, we can get this from the released version (it hasn't changed from 1.6 to 1.7):
cd pcl
wget <a href="https://raw.github.com/ros-gbp/pcl-release/release/pcl/1.6.0/package.xml">https://raw.github.com/ros-gbp/pcl-release/release/pcl/1.6.0/package.xml</a>
Next you will want to edit the cmake/pcl_find_ros.cmake
file to hard code the USE_ROS
option to ON
, here is a patch:
diff --git a/cmake/pcl_find_ros.cmake b/cmake/pcl_find_ros.cmake
index cf2e1e3..b426066 100644
--- a/cmake/pcl_find_ros.cmake
+++ b/cmake/pcl_find_ros.cmake
@@ -25,7 +25,7 @@ endmacro(get_ros_inc_path)
set(ROS_DISTRO $ENV{ROS_DISTRO})
if(ROS_DISTRO)
- option(USE_ROS "Integrate with ROS rather than using native files" OFF)
+ option(USE_ROS "Integrate with ROS rather than using native files" ON)
message(STATUS "Found ROS; USE_ROS is ${USE_ROS}; ROS-Distro: ${ROS_DISTRO}")
if(USE_ROS)
# Search for ROS
Now you can build your pcl
workspace:
cd /tmp/pcl_ws
source /opt/ros/groovy/setup.bash # Only if you are using debians
catkin_make_isolated --install # prefix with `./src/catkin/bin/` if not using debians
Now assuming you didn't run into any build errors (I didn't get any on my Mac just now), then you should have a folder at /tmp/pcl_ws/install_isolated
which ... (more)
Sorry for not publishing complete links, but my karma isn't sufficient for this (why do I need karma for this action???)
The askbot system has a minimum required karma for posting links to prevent spamming.