-
Notifications
You must be signed in to change notification settings - Fork 316
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
Add an example about how to use wait_for_all_acked #316
Add an example about how to use wait_for_all_acked #316
Conversation
If pre-shutdown callback is supported (ros2/rclcpp#1706 (comment)), I can simplify current codes. |
probably it would be nice to have only specified example to introduce |
Yes. |
@Barry-Xu-2018 can we also have example for |
Yeah. I will consider adding this example. |
we can run CI once ros2/rclcpp#1662 is merged. |
Example code for python isn't added. |
7af8c38
to
d00623d
Compare
do rebase |
@ros-pull-request-builder retest this please |
@clalancette it appears that CI still does not have ros2/rclcpp#1662, that leads this PR to build failure. Do you know how long it takes? i was thinking this is done by nightly build. |
So for the Rpr job to pass, we need to make an explicit source and bloom release to get PRs in. I can do one of those later today. That said, you should be able to run a CI job from https://ci.ros2.org to verify this functionality on all platforms, and that will include the latest sources. |
I update code to fix build warning on macOS. |
@ros-pull-request-builder retest this please |
@ivanpauno @sloretz @clalancette could you help this with review? |
@ros-pull-request-builder retest this please |
@@ -26,6 +26,9 @@ ament_target_dependencies(publisher_member_function_with_type_adapter rclcpp std | |||
add_executable(publisher_member_function_with_unique_network_flow_endpoints member_function_with_unique_network_flow_endpoints.cpp) | |||
ament_target_dependencies(publisher_member_function_with_unique_network_flow_endpoints rclcpp std_msgs) | |||
|
|||
add_executable(publisher_member_function_with_wait_for_all_acked member_function_with_wait_for_all_acked.cpp) |
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.
can we use a shorter name for the example?
It really doesn't matter if this is using a "member function", I think we could rather use "publisher_wait_for_all_acked".
#include <inttypes.h> | ||
|
||
#include <chrono> | ||
#include <functional> |
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.
#include <inttypes.h> | |
#include <chrono> | |
#include <functional> | |
#include <chrono> | |
#include <cstdint> | |
#include <functional> |
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.
PRId64
is included in cinttypes
. So I include cinttypes
instead of cstdint
and adjust the order of header file as your advice.
rclcpp/topics/minimal_publisher/member_function_with_wait_for_all_acked.cpp
Show resolved
Hide resolved
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
d9ea59d
to
ce5e34f
Compare
Friendly ping @ivanpauno |
@ivanpauno really appreciate for helping on this, thanks 👍 |
This commit depends on the merge of ros2/rcl#913 and ros2/rclcpp#1662.