Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for building on OS X and against pcl-1.7 #8

Merged
merged 5 commits into from
Jul 13, 2013
Merged

Fixes for building on OS X and against pcl-1.7 #8

merged 5 commits into from
Jul 13, 2013

Conversation

wjwwood
Copy link
Member

@wjwwood wjwwood commented Jul 11, 2013

The changes in 6b1437f are specific to hydro.

I'm not sure why this works on Linux? data is not
a static member of VelodynePacket, it should not
be accessed with an instance.
pcl_conversions is explicitly not a run_depend nor
a transitive dependency as it is only used in the
cc files.
@@ -13,7 +13,7 @@ set(${PROJECT_NAME}_CATKIN_DEPS
velodyne_msgs)

find_package(catkin REQUIRED COMPONENTS
${${PROJECT_NAME}_CATKIN_DEPS} roslaunch rostest)
${${PROJECT_NAME}_CATKIN_DEPS} pcl_conversions roslaunch rostest)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add pcl_conversions to ${PROJECT_NAME}_CATKIN_DEPS?

Is it because it's only a build dependency?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is explicitly not a transitive dependency, because it is not used in any header files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jack-oquin added a commit that referenced this pull request Jul 13, 2013
Fixes for building on OS X and against pcl-1.7
@jack-oquin jack-oquin merged commit 50bdc2e into ros-drivers:master Jul 13, 2013
@jack-oquin
Copy link
Member

What do I have to check out to build and test this?

It does not work with my current Hydro development workspace:

CMake Error at /opt/ros/hydro/share/pcl_ros/cmake/pcl_rosConfig.cmake:95 (message):
  Project 'pcl_ros' specifies '/opt/ros/hydro/include/pcl-1.6' as an include
  dir, which is not found.  It does neither exist as an absolute directory
  nor in '/opt/ros/hydro//opt/ros/hydro/include/pcl-1.6'.  Ask the maintainer
  'Julius Kammerl <jkammerl@willowgarage.com>' to fix it.
Call Stack (most recent call first):
  /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:72 (find_package)
  velodyne/velodyne_pointcloud/CMakeLists.txt:15 (find_package)

@wjwwood wjwwood deleted the pcl-1.7_fixup branch July 13, 2013 05:35
@wjwwood
Copy link
Member Author

wjwwood commented Jul 13, 2013

You would have to use the building repo or build pcl and pcl_ros from source in order to test this, shadow fix is catching up in a day or so. I built everything from source to test this, but I already had stuff from source in order to test pcl and pcl_ros so it wasn't too bad for me.

@jack-oquin
Copy link
Member

I'm based on shadow-fixed. Explicitly installing ros-hydro-pcl-ros 1.1.1-0 seemed to help.

I had some more problems, then explicitly installed ros-hydro-pcl 1.7.0-9, which helped a lot.

After that, it built cleanly and unit tests run successfully. I'll release soon.

Thanks for the patch, William!

@jack-oquin
Copy link
Member

BTW, shouldn't pcl_conversions depend on pcl >= 1.7?

@jack-oquin
Copy link
Member

I forgot to mention this:

-- ==> add_subdirectory(velodyne/velodyne_pointcloud)
CMake Warning at velodyne/velodyne_pointcloud/CMakeLists.txt:18 (find_package):
  Could not find module Findpcl.cmake or a configuration file for package
  pcl.

  Adjust CMAKE_MODULE_PATH to find Findpcl.cmake or set pcl_DIR to the
  directory containing a CMake configuration file for pcl.  The file will
  have one of the following names:

    pclConfig.cmake
    pcl-config.cmake

The ros-hydro-pcl in shadow-fixed is not providing any CMake find_package module.

@wjwwood
Copy link
Member Author

wjwwood commented Jul 13, 2013

@jack-oquin Yeah, you're right pcl_conversions should have a versioned dependency on pcl.

ros-perception/pcl_conversions#1

I haven't been able to reproduce the missing PCLConfig.cmake file, that might be new with 1.7.0-9 (pcl-1.7.0rc2)...

Can you grep for PCLConfig.cmake in the pcl-1.7.0-9 deb and see if it is listed? (I don't have a ubuntu machine handy) It may be that it is getting installed into a place which CMake is not looking?

@jack-oquin
Copy link
Member

Yep, it's somewhere else:

$ dpkg -L ros-hydro-pcl | grep cmake
/opt/ros/hydro/share/pcl-1.7/PCLConfigVersion.cmake
/opt/ros/hydro/share/pcl-1.7/PCLConfig.cmake
/opt/ros/hydro/share/doc/pcl-1.7/tutorials/sources/vfh_recognition/FindFLANN.cmake

$ dpkg -s ros-hydro-pcl
Package: ros-hydro-pcl
Status: install ok installed
Priority: extra
Section: misc
Installed-Size: 103448
Maintainer: "William Woodall <william@osrfoundation.org>, Julius Kammerl <jkammerl@willowgarage.com>"
Architecture: amd64
Version: 1.7.0-9precise-20130712-2229-+0000
Depends: libboost-filesystem1.46.1 (>= 1.46.1-1), libboost-system1.46.1 (>= 1.46.1-1), libboost-thread1.46.1 (>= 1.46.1-1), libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libgl1-mesa-glx | libgl1, libgomp1 (>= 4.2.1), libpng12-0 (>= 1.2.13-4), libqhull5 (>= 2003.1), libstdc++6 (>= 4.6), libusb-1.0-0 (>= 2:1.0.9~rc3), libvtk5.8, libboost-all-dev, libeigen3-dev, libflann-dev, libflann1, libqhull-dev, libusb-1.0-0-dev, libvtk5-dev, python-sphinx, ros-hydro-catkin
Description: The Point Cloud Library (or PCL) for point cloud processing - development The PCL framework contains numerous state-of-the art algorithms including filtering, feature estimation, surface reconstruction, registration, model fitting and segmentation.
Homepage: http://www.pointclouds.org

@jack-oquin
Copy link
Member

I just ran a pre-release test, which failed with this error I'd not seen on my development system:

[ 47%] Building CXX object velodyne_pointcloud/src/conversions/CMakeFiles/cloud_node.dir/convert.cc.o
/tmp/test_repositories/src_depends_on/velodyne_pointcloud/src/conversions/convert.cc: In member function 'void velodyne_pointcloud::Convert::processScan(const ConstPtr&)':
/tmp/test_repositories/src_depends_on/velodyne_pointcloud/src/conversions/convert.cc:46:44: error: cannot convert 'const _stamp_type {aka const ros::Time}' to 'uint64_t {aka long unsigned int}' in assignment
make[2]: *** [velodyne_pointcloud/src/conversions/CMakeFiles/cloud_node.dir/convert.cc.o] Error 1

@wjwwood
Copy link
Member Author

wjwwood commented Jul 13, 2013

@jack-oquin It must be the wrong branch or something, my changes fix that here:

https://github.com/ros-drivers/velodyne/pull/8/files#L4L46

@wjwwood
Copy link
Member Author

wjwwood commented Jul 13, 2013

@jack-oquin Can you try this:

$ source /opt/ros/hydro/setup.bash
$ cd /tmp  # The following calls create temporary files in the current directory (thanks CMake...)
$ cmake --find-package -DNAME=PCL -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST
// You can also try
$ cmake --find-package -DNAME=PCL -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=COMPILE
// and
$ cmake --find-package -DNAME=PCL -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=LINK

@wjwwood
Copy link
Member Author

wjwwood commented Jul 13, 2013

The above works on my machine, even with the odd locations. It might also be a change in cmake, what version are you using?

I am using:

% cmake --version
cmake version 2.8.11.1

@jack-oquin
Copy link
Member

cmake 2.8.7

The pre-release build had the same warning.

For the previous message:

joq@vision-4:catkin$ source /opt/ros/hydro/setup.bash 
joq@vision-4:catkin$ dr
ROS_ROOT=/opt/ros/hydro/share/ros
ROS_PACKAGE_PATH=/opt/ros/hydro/share:/opt/ros/hydro/stacks
ROS_MASTER_URI=http://vision-4.local:11311
ROSCONSOLE_CONFIG_FILE=/home/joq/.ros/config/rosconsole.config
CATKIN_TEST_RESULTS_DIR=/home/joq/ros/W/build/test_results
ROS_TEST_RESULTS_DIR=/home/joq/ros/wet/hydro/build/test_results
ROS_EMAIL=jack.oquin@gmail.com
ROS_DISTRO=hydro
ROS_HOME=/home/joq/.ros
CMAKE_PREFIX_PATH=/opt/ros/hydro:/home/joq/ros/wet/hydro/src
ROS_ETC_DIR=/opt/ros/hydro/etc/ros
joq@vision-4:catkin$ cmake --find-package -DNAME=PCL -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST
PCL found.
joq@vision-4:catkin$ cmake --find-package -DNAME=PCL -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=COMPILE
-I/usr/include/vtk-5.8 -I/opt/ros/hydro/include/pcl-1.7 -I/usr/include/eigen3 -I/opt/ros/hydro/include -I/usr/include/qhull  
joq@vision-4:catkin$ cmake --find-package -DNAME=PCL -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=LINK
-rdynamic -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -lpthread -lboost_date_time-mt -lboost_iostreams-mt -lboost_mpi-mt -lboost_serialization-mt -loptimized /opt/ros/hydro/lib/libpcl_common.so -ldebug /opt/ros/hydro/lib/libpcl_common.so -loptimized /opt/ros/hydro/lib/libflann_cpp_s.a -ldebug /opt/ros/hydro/lib/libflann_cpp_s.a -loptimized /opt/ros/hydro/lib/libpcl_kdtree.so -ldebug /opt/ros/hydro/lib/libpcl_kdtree.so -loptimized /opt/ros/hydro/lib/libpcl_octree.so -ldebug /opt/ros/hydro/lib/libpcl_octree.so -loptimized /opt/ros/hydro/lib/libpcl_search.so -ldebug /opt/ros/hydro/lib/libpcl_search.so /usr/lib/libvtkCommon.so.5.8.0 /usr/lib/libvtkRendering.so.5.8.0 /usr/lib/libvtkHybrid.so.5.8.0 /usr/lib/libvtkCharts.so.5.8.0 -loptimized /opt/ros/hydro/lib/libpcl_io.so -ldebug /opt/ros/hydro/lib/libpcl_io.so -loptimized /opt/ros/hydro/lib/libpcl_sample_consensus.so -ldebug /opt/ros/hydro/lib/libpcl_sample_consensus.so -loptimized /opt/ros/hydro/lib/libpcl_filters.so -ldebug /opt/ros/hydro/lib/libpcl_filters.so -loptimized /opt/ros/hydro/lib/libpcl_visualization.so -ldebug /opt/ros/hydro/lib/libpcl_visualization.so -loptimized /opt/ros/hydro/lib/libpcl_outofcore.so -ldebug /opt/ros/hydro/lib/libpcl_outofcore.so -loptimized /opt/ros/hydro/lib/libpcl_features.so -ldebug /opt/ros/hydro/lib/libpcl_features.so -loptimized /opt/ros/hydro/lib/libpcl_segmentation.so -ldebug /opt/ros/hydro/lib/libpcl_segmentation.so -loptimized /opt/ros/hydro/lib/libpcl_people.so -ldebug /opt/ros/hydro/lib/libpcl_people.so -loptimized /opt/ros/hydro/lib/libpcl_registration.so -ldebug /opt/ros/hydro/lib/libpcl_registration.so -loptimized /opt/ros/hydro/lib/libpcl_recognition.so -ldebug /opt/ros/hydro/lib/libpcl_recognition.so -loptimized /opt/ros/hydro/lib/libpcl_keypoints.so -ldebug /opt/ros/hydro/lib/libpcl_keypoints.so -loptimized -lqhull -ldebug -lqhull -loptimized /opt/ros/hydro/lib/libpcl_surface.so -ldebug /opt/ros/hydro/lib/libpcl_surface.so -loptimized /opt/ros/hydro/lib/libpcl_tracking.so -ldebug /opt/ros/hydro/lib/libpcl_tracking.so -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -lpthread -lboost_date_time-mt -lboost_iostreams-mt -lboost_mpi-mt -lboost_serialization-mt -loptimized -lqhull -ldebug -lqhull -loptimized /opt/ros/hydro/lib/libflann_cpp_s.a -ldebug /opt/ros/hydro/lib/libflann_cpp_s.a /usr/lib/libvtkCommon.so.5.8.0 /usr/lib/libvtkRendering.so.5.8.0 /usr/lib/libvtkHybrid.so.5.8.0 /usr/lib/libvtkCharts.so.5.8.0 /opt/ros/hydro/lib/libpcl_common.so /opt/ros/hydro/lib/libpcl_kdtree.so /opt/ros/hydro/lib/libpcl_octree.so /opt/ros/hydro/lib/libpcl_search.so /opt/ros/hydro/lib/libpcl_io.so /opt/ros/hydro/lib/libpcl_sample_consensus.so /opt/ros/hydro/lib/libpcl_filters.so /opt/ros/hydro/lib/libpcl_visualization.so /opt/ros/hydro/lib/libpcl_outofcore.so /opt/ros/hydro/lib/libpcl_features.so /opt/ros/hydro/lib/libpcl_segmentation.so /opt/ros/hydro/lib/libpcl_people.so /opt/ros/hydro/lib/libpcl_registration.so /opt/ros/hydro/lib/libpcl_recognition.so /opt/ros/hydro/lib/libpcl_keypoints.so /opt/ros/hydro/lib/libpcl_surface.so /usr/lib/libvtkViews.so.5.8.0 /usr/lib/libvtkInfovis.so.5.8.0 /usr/lib/libvtkWidgets.so.5.8.0 /usr/lib/libvtkHybrid.so.5.8.0 /usr/lib/libvtkParallel.so.5.8.0 /usr/lib/libvtkVolumeRendering.so.5.8.0 /usr/lib/libvtkRendering.so.5.8.0 /usr/lib/libvtkGraphics.so.5.8.0 /usr/lib/libvtkImaging.so.5.8.0 /usr/lib/libvtkIO.so.5.8.0 /usr/lib/libvtkFiltering.so.5.8.0 /usr/lib/libvtkCommon.so.5.8.0 -lm /usr/lib/libvtksys.so.5.8.0 -ldl -Wl,-rpath,/opt/ros/hydro/lib:/usr/lib/openmpi/lib:/usr/lib/x86_64-linux-gnu -Wl,-rpath-link,/usr/lib/openmpi/lib:/usr/lib/x86_64-linux-gnu 

I don't know what's going on, but that seemed to work.

@jack-oquin
Copy link
Member

Re: the version checked out by the pre-release:

rosinstall file for all repositories: 
 - git: {local-name: velodyne, uri: 'https://github.com/ros-drivers/velodyne.git',
    version: master}

That tree does have your fixes on github.

@jack-oquin
Copy link
Member

I'm running another pre-release, just to see.

@jack-oquin
Copy link
Member

That one failed the same way. I have no idea what's going on. Probably I am just doing something stupid.

I need to get ready for a music gig, no more time to work on this today. Thanks for all the help. I'll probably look at it again with fresher eyes tomorrow morning.

@wjwwood
Copy link
Member Author

wjwwood commented Jul 13, 2013

Ok.

@ghost ghost assigned jack-oquin Jul 16, 2013
jack-oquin added a commit to jack-oquin/rosdistro that referenced this pull request Jul 16, 2013
Fixes PCL 1.7 compatibility problems (ros-drivers/velodyne#8).
@jack-oquin
Copy link
Member

I never did figure out what that pre-release problem was, but it seems to work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants