-
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 wait set examples #315
Conversation
@wjwwood I will add more comments, add a readme and probably rename the examples. Could briefly you take a look and see if you miss an example or a specific usage we want to show? |
f66bb18
to
df31c38
Compare
db0a78e
to
3432aa7
Compare
57148df
to
aa1f133
Compare
@wjwwood This PR should be ready to review. |
@Mergifyio rebase |
Command
|
e5f6e58
to
b0cbf73
Compare
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.
I left some additional comments, mostly minor things.
I would like to discuss (in a call if we can) the examples in examples_rclcpp_wait_set
, just to help me understand better.
I think that if we can avoid the headers (may or may not be possible) then it would save us some trouble, but we can discuss that too.
997a4ca
to
bee789d
Compare
@wjwwood I addressed your comments. You can review it again. |
Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Co-authored-by: William Woodall <william+github@osrfoundation.org> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Co-authored-by: William Woodall <william+github@osrfoundation.org> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Co-authored-by: William Woodall <william+github@osrfoundation.org> Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: Carlos San Vicente <carlos.sanvicente@apex.ai> Signed-off-by: William Woodall <william@osrfoundation.org>
Co-authored-by: William Woodall <william+github@osrfoundation.org> Signed-off-by: Carlos San Vicente <carlos.svic@gmail.com> Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: William Woodall <william@osrfoundation.org>
23982cc
to
7d63434
Compare
I fixed some of the warning, but didn't follow up yet on the rest. I can do that hopefully tonight and get this merged. |
Signed-off-by: William Woodall <william@osrfoundation.org>
This PR adds examples for how to use the new rclcpp::WaitSet classes. It is an extension of the existing PR #262 created by @wjwwood.
This PR includes the following additional examples:
wait_set_subscriber.cpp
uses arclcpp::WaitSet
to wait and poll for datastatic_wait_set_subscriber.cpp
uses arclcpp::StaticWaitSet
to wait and poll for datatime_triggered_wait_set_subscriber.cpp
uses arclcpp::Waitset
and a timer to poll for dataperiodically
wait_set.cpp
: Simple example showing how to use the default wait-set with a dynamicstorage policy and a sequential (no thread-safe) synchronization policy.
static_wait_set.cpp
: Simple example showing how to use the static wait-set with a staticstorage policy.
thread_safe_wait_set.cpp
: Simple example showing how to use the thread-safe wait-set with athread-safe synchronization policy.
wait_set_topics_and_timer.cpp
: Simple example using multiple subscriptions,publishers, and a timer.
wait_set_random_order.cpp
: An example showing user-defineddata handling and a random publisher.
executor_random_order.cpp
run the same node logicusing
SingleThreadedExecutor
to compare the data handling order.wait_set_and_executor_composition.cpp
: An example showing how to combine aSingleThreadedExecutor
and a wait-set.wait_set_topics_with_different_rate.cpp
: An example showing how to use a custom triggercondition to handle topics with different topic rates.
Some of the examples may be moved to ros2/tutorials or ros2/demos.
Connects to ros2/rclcpp#1047