[ros-users] Using PCL 1.6 (or any version) in Groovy

William Woodall wwoodall at willowgarage.com
Wed Feb 20 07:08:36 UTC 2013


On Tue, Feb 19, 2013 at 10:39 PM, Mac Mason <mac at cs.duke.edu> wrote:

> Solved! (Credit to Austin Hendrix & Dave Coleman).
>
> My mistake was to specify my dependencies in package.xml, but not in
> CMakeLists.txt. Easy fix.
>
> Feel free to ignore this next bit if you have work to do...
>
> \begin{rant}
> Why _on earth_ does it work that way? Requiring me to specify _exactly
> the same thing_ in two _totally different places_ in two _completely
> different syntaxes_ is the very definition of a Bad Idea. It forces
> manual, error-prone, hard-to-debug, duplication.
> \end{rant}
>
> So, I'm curious: why was it done this way? I'm not on
> build-system-sig, and I'm about as far from a CMake expert as one can
> be, so I haven't a clue about what's going on behind the scenes, and
> I'm willing to believe that there's some solid technical reason. But
> this feels really broken.
>

The package.xml contains meta information about your package, including
package dependencies, so it specifies the dependencies that need to be
installed at run time, build time, and test time.

The CMakeLists.txt is responsible for describing your build process, so in
there you can find_package(...) anything like Boost or roscpp or pcl which
will define things like Boost_INCLUDE_DIRS or roscpp_LIBRARIES. At this
point you don't have to use any of those variables, or you can link one of
your libraries to roscpp_LIBRARIES and not link it to another test
executable. You could just as easily have depended on something like
pcl_ros for an executable it has, or you might depend on a package for a
python library it contains, but not for anything you need to declare in
your CMakeLists.txt.

Basically, we _cannot_ presume to know why you run/build/test depend on
something, when you add pcl in two places you are declaring two different
things, one is for I need pcl at build time and the other is that I use
pcl's include path and libraries to build my code.  This is a result of
making catkin as compliant to standard build system conventions as possible.

This is the reasoning, give or take a reason, for having such an explicit
method for depending on pcl. Now having laid out that ideology we are
working on making this process easier and less error prone, but we need to
do it in a way that is _correct_ and _conventional_, i.e. not wrapping
things like add_executable(...) in macros like rosbuild_add_executable(...).


>
>     --M
>
> On Wed, Feb 20, 2013 at 1:06 AM, Mac Mason <mac at cs.duke.edu> wrote:
> > Hello folks,
> >
> > I've managed to confuse myself re: getting pcl working in groovy. The
> > tutorials seem to indicate that I want to add pcl and pcl_ros to by
> > build_depends, and then #include "pcl/point_cloud.h" and
> > "pcl_ros/point_cloud.h".
> >
> > However, when I do that, it can't find those headers. The reason it
> > can't is because it's only looking in /opt/ros/groovy/include, and:
> >
> > ls /opt/ros/groovy/include/pcl
> > ModelCoefficients.h  PointIndices.h  PolygonMesh.h  Vertices.h
> >
> > There does appear to be a pcl-1.6, but then pcl_ros doesn't work,
> > because it's also looking for pcl/point_cloud.h.
> >
> > What have I done wrong here?
> >
> > Thanks!
> >
> >     --M
> >
> > --
> > Julian "Mac" Mason      mac at cs.duke.edu      www.cs.duke.edu/~mac
>
>
>
> --
> Julian "Mac" Mason      mac at cs.duke.edu      www.cs.duke.edu/~mac
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



-- 
William Woodall
Willow Garage - Software Engineer
wwoodall at willowgarage.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20130219/feb885a9/attachment-0004.html>


More information about the ros-users mailing list