On Tue, Feb 19, 2013 at 10:39 PM, Mac Mason <span dir="ltr"><<a href="mailto:mac@cs.duke.edu" target="_blank">mac@cs.duke.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

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

<div><br></div><div>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.</div>

<div><br></div><div>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.</div>

<div><br></div><div>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(...).</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
    --M<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, Feb 20, 2013 at 1:06 AM, Mac Mason <<a href="mailto:mac@cs.duke.edu">mac@cs.duke.edu</a>> wrote:<br>
> Hello folks,<br>
><br>
> I've managed to confuse myself re: getting pcl working in groovy. The<br>
> tutorials seem to indicate that I want to add pcl and pcl_ros to by<br>
> build_depends, and then #include "pcl/point_cloud.h" and<br>
> "pcl_ros/point_cloud.h".<br>
><br>
> However, when I do that, it can't find those headers. The reason it<br>
> can't is because it's only looking in /opt/ros/groovy/include, and:<br>
><br>
> ls /opt/ros/groovy/include/pcl<br>
> ModelCoefficients.h  PointIndices.h  PolygonMesh.h  Vertices.h<br>
><br>
> There does appear to be a pcl-1.6, but then pcl_ros doesn't work,<br>
> because it's also looking for pcl/point_cloud.h.<br>
><br>
> What have I done wrong here?<br>
><br>
> Thanks!<br>
><br>
>     --M<br>
><br>
> --<br>
> Julian "Mac" Mason      <a href="mailto:mac@cs.duke.edu">mac@cs.duke.edu</a>      <a href="http://www.cs.duke.edu/~mac" target="_blank">www.cs.duke.edu/~mac</a><br>
<br>
<br>
<br>
--<br>
Julian "Mac" Mason      <a href="mailto:mac@cs.duke.edu">mac@cs.duke.edu</a>      <a href="http://www.cs.duke.edu/~mac" target="_blank">www.cs.duke.edu/~mac</a><br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>William Woodall<div>Willow Garage - Software Engineer</div><div><a href="mailto:wwoodall@willowgarage.com" target="_blank">wwoodall@willowgarage.com</a></div>