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

Reorg namespaces #37

Merged
merged 4 commits into from
Mar 7, 2021
Merged

Reorg namespaces #37

merged 4 commits into from
Mar 7, 2021

Conversation

JWhitleyWork
Copy link
Contributor

Using just the namespace drivers in the udp_driver package was too vague. This adds drivers::common for the io_context package and drivers::udp_driver for the udp_driver package.

Also removes some unnecessary destructors.

@flynneva Would you be available to review this?

@JWhitleyWork
Copy link
Contributor Author

@flynneva Good call. Removed include_directories.

Copy link
Contributor

@flynneva flynneva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, i like the changes - just a few questions to follow up with

@@ -42,11 +50,16 @@ include_directories(include)
ament_auto_add_library(${PROJECT_NAME} SHARED
src/udp_socket.cpp
src/udp_driver.cpp
examples/udp_driver_node.cpp)
src/udp_driver_node.cpp)
ament_target_dependencies(${PROJECT_NAME} "Boost")

target_compile_options(${PROJECT_NAME} PUBLIC "-O0" PRIVATE -Wno-sign-conversion -Wno-conversion)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency with io_context, should this be changed to

Suggested change
target_compile_options(${PROJECT_NAME} PUBLIC "-O0" PRIVATE -Wno-sign-conversion -Wno-conversion)
target_compile_options(${PROJECT_NAME} PUBLIC "-O0" PRIVATE -Wall

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line shouldn't be required at all because CMAKE_CXX_FLAGS should cover that above. Removed.

udp_driver/CMakeLists.txt Show resolved Hide resolved
ament_target_dependencies(${PROJECT_NAME} "Boost")

target_compile_options(${PROJECT_NAME} PUBLIC "-O0" PRIVATE -Wno-sign-conversion -Wno-conversion)

#rclcpp_components_register_node(udp_driver_node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming you are planning on "compontent-izing" this later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Sorry this got mixed in. Planning on creating two nodes: sender and receiver. They will both be components and managed lifecycle nodes.

#PLUGIN "drivers::udp_driver::UdpDriverNode"
#EXECUTABLE ${PROJECT_NAME}_node_exe
#)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing here, do we need the test/gtest_main.cpp similar to what we did within io_context?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't. Removed here and removed the actual file.

@JWhitleyWork JWhitleyWork merged commit 80749a1 into main Mar 7, 2021
@JWhitleyWork JWhitleyWork deleted the reorg-namespaces branch March 7, 2021 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants