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

Workaround for debian stretch build #140

Merged
merged 3 commits into from
Apr 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ find_package(catkin REQUIRED
tf
visualization_msgs
)
find_package(PCL 1.7 REQUIRED)

add_service_files(
FILES ResizeParticle.srv
Expand All @@ -40,8 +39,29 @@ catkin_package(
tf
visualization_msgs
)
find_package(Boost REQUIRED COMPONENTS chrono REQUIRED)

find_package(Eigen3 REQUIRED)
find_package(PCL 1.7 REQUIRED
COMPONENTS
core
filters
kdtree
)
# Boost must be find_packaged after pcl on Ubuntu Trusty
find_package(Boost REQUIRED COMPONENTS chrono)

# Workaround for debian stretch build (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894656)
list(REMOVE_ITEM PCL_LIBRARIES
"vtkGUISupportQt"
"vtkGUISupportQtOpenGL"
"vtkGUISupportQtSQL"
"vtkGUISupportQtWebkit"
"vtkViewsQt"
"vtkRenderingQt"
)

# Workaround for the bug in PCL(<1.8.1) https://github.com/PointCloudLibrary/pcl/issues/1406
remove_definitions(-DDISABLE_LIBUSB-1.0)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
Expand All @@ -61,9 +81,6 @@ include_directories(${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} ${Boost_INCLUDE
link_directories(${Boost_LIBRARY_DIRS} ${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

# Workaround for the bug in PCL(<1.8.1) https://github.com/PointCloudLibrary/pcl/issues/1406
remove_definitions(-DDISABLE_LIBUSB-1.0)

add_executable(mcl_3dl src/mcl_3dl.cpp)
target_link_libraries(mcl_3dl ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${PCL_LIBRARIES})
add_dependencies(mcl_3dl mcl_3dl_generate_messages)
Expand Down
12 changes: 6 additions & 6 deletions test/src/test_chunked_kdtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,37 +53,37 @@ TEST(ChunkedKdtreeTest, testRadiusSearch)
kdtree.radiusSearch(
pcl::PointXYZ(0.5, 0.5, 0.5),
0.3, id, dist, 1);
ASSERT_EQ(id.size(), 1);
ASSERT_EQ(id.size(), 1u);
ASSERT_EQ(id[0], 0);

kdtree.radiusSearch(
pcl::PointXYZ(0.5, 0.4, 0.5),
0.3, id, dist, 1);
ASSERT_EQ(id.size(), 1);
ASSERT_EQ(id.size(), 1u);
ASSERT_EQ(id[0], 0);

kdtree.radiusSearch(
pcl::PointXYZ(1.05, 0.0, 0.0),
0.3, id, dist, 1);
ASSERT_EQ(id.size(), 1);
ASSERT_EQ(id.size(), 1u);
ASSERT_EQ(id[0], 1);

kdtree.radiusSearch(
pcl::PointXYZ(1.1, 0.0, 0.0),
0.3, id, dist, 1);
ASSERT_EQ(id.size(), 1);
ASSERT_EQ(id.size(), 1u);
ASSERT_EQ(id[0], 2);

kdtree.radiusSearch(
pcl::PointXYZ(0.0, -0.05, 0.0),
0.3, id, dist, 1);
ASSERT_EQ(id.size(), 1);
ASSERT_EQ(id.size(), 1u);
ASSERT_EQ(id[0], 3);

kdtree.radiusSearch(
pcl::PointXYZ(0.0, -0.15, 0.0),
0.3, id, dist, 1);
ASSERT_EQ(id.size(), 1);
ASSERT_EQ(id.size(), 1u);
ASSERT_EQ(id[0], 4);
}

Expand Down