-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from aock/humble
ROS2 - Humble
- Loading branch information
Showing
76 changed files
with
4,180 additions
and
3,052 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,48 +1,76 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
cmake_minimum_required(VERSION 3.8) | ||
project(hdf5_map_io) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
# Default to C++17 | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
endif() | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
find_package(catkin REQUIRED) | ||
# DEFAULT RELEASE | ||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) | ||
if (NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) | ||
endif() | ||
endif() | ||
|
||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
find_package(LVR2 REQUIRED) | ||
find_package(MPI) | ||
find_package(PkgConfig REQUIRED) | ||
|
||
catkin_package( | ||
INCLUDE_DIRS include | ||
LIBRARIES hdf5_map_io | ||
DEPENDS LVR2 MPI | ||
) | ||
|
||
# HighFive | ||
set(HIGHFIVE_EXAMPLES FALSE) | ||
set(HIGHFIVE_UNIT_TESTS FALSE) | ||
|
||
find_library(LVR2_LIBRARY NAMES lvr2) | ||
|
||
|
||
include_directories( | ||
include | ||
${LVR2_INCLUDE_DIRS} | ||
) | ||
|
||
add_library(${PROJECT_NAME} | ||
add_library(${PROJECT_NAME} SHARED | ||
src/hdf5_map_io.cpp | ||
) | ||
|
||
find_library(LVR2_LIBRARY NAMES lvr2) | ||
target_include_directories(${PROJECT_NAME} PUBLIC | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" | ||
"$<INSTALL_INTERFACE:include>") | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
target_link_libraries(${PROJECT_NAME} PUBLIC | ||
${LVR2_LIBRARY} | ||
${MPI_CXX_LIBRARIES} | ||
rclcpp::rclcpp | ||
) | ||
|
||
target_compile_definitions(${PROJECT_NAME} PRIVATE "HDF5_MAP_IO_BUILDING_DLL") | ||
|
||
install(TARGETS ${PROJECT_NAME} | ||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
EXPORT export_${PROJECT_NAME} | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
RUNTIME DESTINATION bin | ||
) | ||
|
||
install(DIRECTORY include/ | ||
DESTINATION include | ||
) | ||
|
||
install(DIRECTORY include/${PROJECT_NAME}/ | ||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | ||
FILES_MATCHING PATTERN "*.h" | ||
PATTERN ".svn" EXCLUDE | ||
ament_export_include_directories("include/${PROJECT_NAME}") | ||
ament_export_libraries(${PROJECT_NAME}) | ||
|
||
# Export modern CMake targets | ||
ament_export_targets(export_${PROJECT_NAME}) | ||
|
||
ament_export_dependencies( | ||
rclcpp | ||
) | ||
|
||
ament_package() |
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
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 |
---|---|---|
@@ -1,52 +1,84 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
cmake_minimum_required(VERSION 3.8) | ||
project(label_manager) | ||
|
||
find_package(catkin REQUIRED COMPONENTS | ||
actionlib | ||
actionlib_msgs | ||
genmsg | ||
mesh_msgs | ||
message_generation | ||
roscpp | ||
sensor_msgs | ||
std_msgs | ||
tf | ||
) | ||
|
||
# Default to C++17 | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
endif() | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
add_service_files(FILES | ||
DeleteLabel.srv | ||
GetLabelGroups.srv | ||
GetLabeledClusterGroup.srv | ||
) | ||
find_package(ament_cmake REQUIRED) | ||
|
||
generate_messages(DEPENDENCIES | ||
mesh_msgs | ||
std_msgs | ||
|
||
find_package(rclcpp REQUIRED) | ||
find_package(rclcpp_action REQUIRED) | ||
find_package(rclcpp_components REQUIRED) | ||
find_package(rosidl_default_generators REQUIRED) | ||
find_package(actionlib_msgs REQUIRED) | ||
find_package(mesh_msgs REQUIRED) | ||
find_package(sensor_msgs REQUIRED) | ||
find_package(std_msgs REQUIRED) | ||
|
||
find_package(Boost COMPONENTS | ||
system | ||
filesystem | ||
) | ||
|
||
catkin_package( | ||
CATKIN_DEPENDS | ||
actionlib actionlib_msgs genmsg mesh_msgs message_generation message_runtime roscpp sensor_msgs std_msgs tf | ||
|
||
rosidl_generate_interfaces(${PROJECT_NAME} | ||
"srv/DeleteLabel.srv" | ||
"srv/GetLabelGroups.srv" | ||
"srv/GetLabeledClusterGroup.srv" | ||
DEPENDENCIES | ||
mesh_msgs | ||
std_msgs | ||
ADD_LINTER_TESTS | ||
) | ||
|
||
|
||
include_directories( | ||
include ${catkin_INCLUDE_DIRS} | ||
${catkin_INCLUDE_DIRS} | ||
include | ||
) | ||
|
||
|
||
add_executable(${PROJECT_NAME} | ||
add_executable(${PROJECT_NAME}_node | ||
src/manager.cpp | ||
src/manager_node.cpp) | ||
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | ||
target_link_libraries(${PROJECT_NAME} | ||
${catkin_LIBRARIES} | ||
|
||
add_dependencies(${PROJECT_NAME}_node | ||
${PROJECT_NAME} | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME}_node | ||
Boost::system | ||
Boost::filesystem | ||
) | ||
|
||
ament_target_dependencies(${PROJECT_NAME}_node | ||
rclcpp | ||
rclcpp_action | ||
rclcpp_components | ||
actionlib_msgs | ||
mesh_msgs | ||
sensor_msgs | ||
std_msgs | ||
) | ||
|
||
install(TARGETS ${PROJECT_NAME} | ||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
install(TARGETS ${PROJECT_NAME}_node | ||
ARCHIVE DESTINATION lib/${PROJECT_NAME} | ||
LIBRARY DESTINATION lib/${PROJECT_NAME} | ||
RUNTIME DESTINATION bin/${PROJECT_NAME} | ||
) | ||
|
||
rosidl_get_typesupport_target(cpp_typesupport_target | ||
${PROJECT_NAME} "rosidl_typesupport_cpp") | ||
target_link_libraries(${PROJECT_NAME}_node | ||
"${cpp_typesupport_target}") | ||
|
||
|
||
ament_export_dependencies(rosidl_default_runtime) | ||
ament_package() | ||
|
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
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
Oops, something went wrong.