-
Notifications
You must be signed in to change notification settings - Fork 227
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
Image Transport rework port in progress for review #84
Merged
Merged
Changes from 16 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
defbba4
Remove boost where possible.
mjcarroll fe68da5
ros::VoidPtr to std::shared_ptr<void>
mjcarroll 01cfc33
Conversions around boost where necessary.
mjcarroll e7dd7fe
Ignore other packages for now.
mjcarroll 09c9ffd
Basic ament_cmake port.
mjcarroll b08ed32
Port camera_common.
mjcarroll c95076e
Port publisher.
mjcarroll 23f3617
Convert subscriber.
mjcarroll d9307c8
Port single_subscriber_publisher.
mjcarroll f263035
Type updates.
mjcarroll a86a847
Replace queue_size and latch with qos.
mjcarroll 5560254
Implement simple subscriber and publisher.
mjcarroll 17723b3
Refactor.
mjcarroll 08c7945
Restore comments and naming.
mjcarroll a5a8c53
Fixup transport and add republisher back in.
mjcarroll 1406eef
Add library export.
mjcarroll dd2eb98
Address reviewer feedback.
mjcarroll cc687fb
Clean up a few warnings, remove boost headers.
mjcarroll de98e0f
compile_definitions -> compile_options
mjcarroll 49ef0d9
Reviewer feedback on necessary includes.
mjcarroll 6aece52
Address comments about CMakeLists and package.
mjcarroll 0b90ac1
Switch to RCLCPP loggers.
mjcarroll 3407982
ERROR -> FATAL where asserts were used.
mjcarroll e6d4361
Add TODOs for ROS2 assert equivalents back.
mjcarroll 4c838f4
Added a TODO for getNumPublishers.
mjcarroll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
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,69 +1,104 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
project(image_transport) | ||
|
||
find_package(catkin REQUIRED | ||
COMPONENTS | ||
message_filters | ||
pluginlib | ||
rosconsole | ||
roscpp | ||
roslib | ||
sensor_msgs | ||
) | ||
# Default to C++14 | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 14) | ||
endif() | ||
|
||
find_package(Boost REQUIRED) | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
catkin_package( | ||
INCLUDE_DIRS include | ||
LIBRARIES ${PROJECT_NAME} | ||
DEPENDS message_filters pluginlib rosconsole roscpp roslib sensor_msgs | ||
) | ||
find_package(ament_cmake REQUIRED) | ||
|
||
find_package(message_filters REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
find_package(sensor_msgs REQUIRED) | ||
find_package(pluginlib REQUIRED) | ||
find_package(tinyxml_vendor REQUIRED) | ||
find_package(TinyXML REQUIRED) | ||
|
||
include_directories(include ${catkin_INCLUDE_DIRS}) | ||
include_directories(include) | ||
|
||
# Build libimage_transport | ||
add_library(${PROJECT_NAME} | ||
src/camera_common.cpp | ||
src/publisher.cpp | ||
src/subscriber.cpp | ||
src/single_subscriber_publisher.cpp | ||
src/camera_publisher.cpp | ||
src/camera_subscriber.cpp | ||
src/image_transport.cpp | ||
src/publisher.cpp | ||
src/single_subscriber_publisher.cpp | ||
src/subscriber.cpp | ||
) | ||
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS}) | ||
target_link_libraries(${PROJECT_NAME} | ||
${Boost_LIBRARIES} | ||
${catkin_LIBRARIES} | ||
) | ||
|
||
# Build libimage_transport_plugins | ||
add_library(${PROJECT_NAME}_plugins src/manifest.cpp src/raw_publisher.cpp) | ||
target_link_libraries(${PROJECT_NAME}_plugins ${PROJECT_NAME}) | ||
|
||
install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_plugins | ||
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
COMPONENT main | ||
) | ||
install(DIRECTORY include/${PROJECT_NAME}/ | ||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | ||
ament_target_dependencies(${PROJECT_NAME} | ||
"message_filters" | ||
"pluginlib" | ||
"rclcpp" | ||
"sensor_msgs" | ||
) | ||
|
||
# add two execs | ||
add_executable(list_transports src/list_transports.cpp) | ||
target_link_libraries(list_transports ${PROJECT_NAME}) | ||
|
||
add_executable(republish src/republish.cpp) | ||
target_link_libraries(republish ${PROJECT_NAME}) | ||
|
||
add_executable(list_transports src/list_transports.cpp) | ||
target_link_libraries(list_transports | ||
${PROJECT_NAME} | ||
${catkin_LIBRARIES} | ||
add_library(${PROJECT_NAME}_plugins | ||
SHARED | ||
src/manifest.cpp | ||
) | ||
|
||
install(TARGETS list_transports republish | ||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
target_link_libraries(${PROJECT_NAME}_plugins ${PROJECT_NAME}) | ||
pluginlib_export_plugin_description_file(image_transport default_plugins.xml) | ||
|
||
install( | ||
TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_plugins list_transports republish | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For multi OS support in the future |
||
RUNTIME DESTINATION bin | ||
) | ||
|
||
# add xml file | ||
install(FILES default_plugins.xml | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
install( | ||
DIRECTORY "include/" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: quotes unnecessary here |
||
DESTINATION include | ||
) | ||
|
||
ament_export_include_directories(include) | ||
ament_export_libraries(${PROJECT_NAME}) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
ament_lint_auto_find_test_dependencies() | ||
|
||
find_package(ament_cmake_gtest) | ||
|
||
ament_add_gtest(${PROJECT_NAME}-camera_common test/test_camera_common.cpp) | ||
if(TARGET ${PROJECT_NAME}-camera_common) | ||
target_link_libraries(${PROJECT_NAME}-camera_common ${PROJECT_NAME}) | ||
endif() | ||
|
||
ament_add_gtest(${PROJECT_NAME}-publisher test/test_publisher.cpp) | ||
if(TARGET ${PROJECT_NAME}-publisher) | ||
target_link_libraries(${PROJECT_NAME}-publisher ${PROJECT_NAME}) | ||
endif() | ||
|
||
ament_add_gtest(${PROJECT_NAME}-subscriber test/test_subscriber.cpp) | ||
if(TARGET ${PROJECT_NAME}-subscriber) | ||
target_link_libraries(${PROJECT_NAME}-subscriber ${PROJECT_NAME}) | ||
endif() | ||
|
||
ament_add_gtest(${PROJECT_NAME}-message_passing test/test_message_passing.cpp) | ||
if(TARGET ${PROJECT_NAME}-message_passing) | ||
target_link_libraries(${PROJECT_NAME}-message_passing ${PROJECT_NAME}) | ||
endif() | ||
|
||
ament_add_gtest(${PROJECT_NAME}-single_subscriber_publisher test/test_single_subscriber_publisher.cpp) | ||
if(TARGET ${PROJECT_NAME}-single_subscriber_publisher) | ||
target_link_libraries(${PROJECT_NAME}-single_subscriber_publisher ${PROJECT_NAME}) | ||
endif() | ||
endif() | ||
|
||
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is
tinyxml_vendor
/tinyxml
used anywhere in this package?