-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
PeaceWord
committed
Mar 3, 2022
0 parents
commit cf1adb0
Showing
474 changed files
with
314,863 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# toplevel CMakeLists.txt for a catkin workspace | ||
# catkin/cmake/toplevel.cmake | ||
|
||
cmake_minimum_required(VERSION 3.0.2) | ||
|
||
project(Project) | ||
|
||
set(CATKIN_TOPLEVEL TRUE) | ||
|
||
# search for catkin within the workspace | ||
set(_cmd "catkin_find_pkg" "catkin" "${CMAKE_SOURCE_DIR}") | ||
execute_process(COMMAND ${_cmd} | ||
RESULT_VARIABLE _res | ||
OUTPUT_VARIABLE _out | ||
ERROR_VARIABLE _err | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
ERROR_STRIP_TRAILING_WHITESPACE | ||
) | ||
if(NOT _res EQUAL 0 AND NOT _res EQUAL 2) | ||
# searching fot catkin resulted in an error | ||
string(REPLACE ";" " " _cmd_str "${_cmd}") | ||
message(FATAL_ERROR "Search for 'catkin' in workspace failed (${_cmd_str}): ${_err}") | ||
endif() | ||
|
||
# include catkin from workspace or via find_package() | ||
if(_res EQUAL 0) | ||
set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/${_out}/cmake") | ||
# include all.cmake without add_subdirectory to let it operate in same scope | ||
include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE) | ||
add_subdirectory("${_out}") | ||
|
||
else() | ||
# use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument | ||
# or CMAKE_PREFIX_PATH from the environment | ||
if(NOT DEFINED CMAKE_PREFIX_PATH) | ||
if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "") | ||
if(NOT WIN32) | ||
string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) | ||
else() | ||
set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) | ||
endif() | ||
endif() | ||
endif() | ||
|
||
# list of catkin workspaces | ||
set(catkin_search_path "") | ||
foreach(path ${CMAKE_PREFIX_PATH}) | ||
if(EXISTS "${path}/.catkin") | ||
list(FIND catkin_search_path ${path} _index) | ||
if(_index EQUAL -1) | ||
list(APPEND catkin_search_path ${path}) | ||
endif() | ||
endif() | ||
endforeach() | ||
|
||
# search for catkin in all workspaces | ||
set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE) | ||
find_package(catkin QUIET | ||
NO_POLICY_SCOPE | ||
PATHS ${catkin_search_path} | ||
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) | ||
unset(CATKIN_TOPLEVEL_FIND_PACKAGE) | ||
|
||
if(NOT catkin_FOUND) | ||
message(FATAL_ERROR "find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.") | ||
endif() | ||
endif() | ||
|
||
catkin_workspace() |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(laser_filters) | ||
|
||
############################################################################## | ||
# Find dependencies | ||
############################################################################## | ||
|
||
set(THIS_PACKAGE_ROS_DEPS sensor_msgs roscpp tf filters message_filters | ||
laser_geometry pluginlib angles) | ||
|
||
find_package(catkin REQUIRED COMPONENTS ${THIS_PACKAGE_ROS_DEPS}) | ||
find_package(Boost REQUIRED COMPONENTS system) | ||
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) | ||
|
||
############################################################################## | ||
# Define package | ||
############################################################################## | ||
|
||
catkin_package( | ||
INCLUDE_DIRS include | ||
LIBRARIES pointcloud_filters laser_scan_filters | ||
CATKIN_DEPENDS ${THIS_PACKAGE_ROS_DEPS} | ||
DEPENDS | ||
) | ||
|
||
############################################################################## | ||
# Build | ||
############################################################################## | ||
|
||
add_library(pointcloud_filters src/pointcloud_filters.cpp) | ||
target_link_libraries(pointcloud_filters ${catkin_LIBRARIES}) | ||
|
||
add_library(laser_scan_filters src/laser_scan_filters.cpp src/median_filter.cpp src/array_filter.cpp src/box_filter.cpp) | ||
target_link_libraries(laser_scan_filters ${catkin_LIBRARIES} ${Boost_LIBRARIES}) | ||
|
||
add_executable(scan_to_cloud_filter_chain src/scan_to_cloud_filter_chain.cpp) | ||
target_link_libraries(scan_to_cloud_filter_chain ${catkin_LIBRARIES} ${Boost_LIBRARIES}) | ||
|
||
add_executable(scan_to_scan_filter_chain src/scan_to_scan_filter_chain.cpp) | ||
target_link_libraries(scan_to_scan_filter_chain ${catkin_LIBRARIES} ${Boost_LIBRARIES}) | ||
|
||
add_executable(generic_laser_filter_node src/generic_laser_filter_node.cpp) | ||
target_link_libraries(generic_laser_filter_node ${catkin_LIBRARIES} ${Boost_LIBRARIES}) | ||
|
||
if (CATKIN_ENABLE_TESTING) | ||
find_package(rostest) | ||
add_executable(test_scan_filter_chain test/test_scan_filter_chain.cpp) | ||
target_link_libraries(test_scan_filter_chain laser_scan_filters ${rostest_LIBRARIES} ${GTEST_LIBRARIES}) | ||
add_dependencies(test_scan_filter_chain gtest) | ||
|
||
add_rostest(test/test_scan_filter_chain.launch) | ||
|
||
catkin_add_gtest(test_shadow_detector test/test_shadow_detector.cpp) | ||
target_link_libraries(test_shadow_detector ${catkin_LIBRARIES} ${rostest_LIBRARIES}) | ||
endif() | ||
|
||
############################################################################## | ||
# Install | ||
############################################################################## | ||
|
||
install(TARGETS pointcloud_filters laser_scan_filters | ||
scan_to_cloud_filter_chain | ||
scan_to_scan_filter_chain | ||
generic_laser_filter_node | ||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
) | ||
|
||
# Install headers | ||
install(DIRECTORY include/${PROJECT_NAME}/ | ||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) | ||
|
||
install(FILES laser_filters_plugins.xml | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
) |
Oops, something went wrong.