-
Notifications
You must be signed in to change notification settings - Fork 652
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
Eigen3 and PCL are not being exported properly by velodyne_pointcloud #550
Comments
Hi, I am also experiencing this in Ubuntu 22.04 😢 |
Hi Hector! While this issue is open here is how you can work around this.
# Manually pull in velodyne_pointcloud libraries "velodyne_rawdata" and "velodyne_cloud_types"
# - Change the headers in `find_path(...)` if other headers are needed
# - Change the libraries in `find_library(...)` if other libraries are needed
find_path(
LIBVELODYNE_POINTCLOUD_INCLUDE_DIR NAMES
calibration.hpp
convert.hpp
datacontainerbase.hpp
organized_cloudXYZIRT.hpp
pointcloudXYZIRT.hpp
rawdata.hpp
transform.hpp
PATH_SUFFIXES velodyne_pointcloud)
find_library(LIBVELODYNE_POINTCLOUD_LIBRARY NAMES velodyne_rawdata velodyne_cloud_types)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libvelodyne_pointcloud DEFAULT_MSG LIBVELODYNE_POINTCLOUD_LIBRARY LIBVELODYNE_POINTCLOUD_INCLUDE_DIR)
mark_as_advanced(LIBVELODYNE_POINTCLOUD_LIBRARY LIBVELODYNE_POINTCLOUD_INCLUDE_DIR)
add_library(libvelodyne_pointcloud::libvelodyne_pointcloud INTERFACE IMPORTED GLOBAL)
target_link_libraries(libvelodyne_pointcloud::libvelodyne_pointcloud INTERFACE ${LIBVELODYNE_POINTCLOUD_LIBRARY})
target_include_directories(libvelodyne_pointcloud::libvelodyne_pointcloud INTERFACE ${LIBVELODYNE_POINTCLOUD_INCLUDE_DIR}) Then later when creating your library do something like this add_library(my_velodyne_library src/my_velodyne_library.cpp)
ament_target_dependencies(my_velodyne_library ${my_dependencies}) # do not include velodyne_pointcloud here
target_include_directories(my_velodyne_library
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
)
target_link_libraries(my_velodyne_library libvelodyne_pointcloud::libvelodyne_pointcloud) # now link to velodyne_pointcloud |
Thanks for sharing this! As I'm running this driver inside a Docker container using the Debian version of the
I don't think this is the ideal approach, but it should keep me going until this issue is resolved 😅 |
Please complete the following information:
Describe the bug
Eigen and PCL are not being exported properly by velodyne_pointcloud
To Reproduce
Steps to reproduce the behavior:
find_package(velodyne_pointcloud REQUIRED)
colcon build --packages-up-to velodyne
Eigen3
PCL
Expected behavior
Eigen3 and PCL should be exported properly by ament so that any package that has a build dependency on "velodyne_pointcloud" can build properly
Additional context
I believe that in general the name of the package used in the
find_package(...)
command should match the name (and case) used in theament_export_dependencies
command.I hope this issue request is helpful and thank you for the hard work you all put into this software.
The text was updated successfully, but these errors were encountered: