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

add examples for how to use the new rclcpp::WaitSet classes #262

Closed
wants to merge 8 commits into from

Conversation

wjwwood
Copy link
Member

@wjwwood wjwwood commented Apr 1, 2020

This is still WIP (not ready for review or comments).

Connects to ros2/rclcpp#1047

Signed-off-by: William Woodall <[email protected]>
@wjwwood wjwwood self-assigned this Apr 1, 2020
wjwwood added 5 commits April 3, 2020 05:22
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
Signed-off-by: William Woodall <[email protected]>
wjwwood added 2 commits April 9, 2020 06:46
Signed-off-by: William Woodall <[email protected]>
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2020-05-21/14247/1

@fred-apex-ai
Copy link

fred-apex-ai commented Nov 10, 2020

@wjwwood I just looked into the example code and it helped me quite a bit. I was wondering if you plan to finish this PR, it has been on hold since spring. If you do, it would be great to add the arguably more common use case of a node that is spinning and how to use a waitset inside the node to wait for input from another node.
When it's spinning, it's easier to interact with the node, e.g. to query it use_sim_time is true etc.
fyi @GTAeberhard

@wjwwood
Copy link
Member Author

wjwwood commented May 27, 2021

I want to, and now I might have the time, with help from others.

If you do, it would be great to add the arguably more common use case of a node that is spinning and how to use a waitset inside the node to wait for input from another node.

That's a good idea. These examples were really "does it work" more than "this is what I expect will happen in the wild". But we should improve them to be more like the latter.

When it's spinning, it's easier to interact with the node, e.g. to query it use_sim_time is true etc.

Yes, these examples were just testing the waitset part, but how it might be used in a larger scope.

@nnmm
Copy link

nnmm commented Jun 4, 2021

Echoing Fred's request, I'm also wondering how you could transfer responsibility for a subscription from an executor to a waitset, especially when you don't control the executor (like in a component container).

It's not even clear to me how to instantiate a static wait set with a single subscription – I would expect this to work, but it doesn't (in Foxy):

// in the initializer list
wait_set_(std::array<rclcpp::StaticWaitSet<1, 0, 0, 0, 0, 0>::SubscriptionEntry, 1>{{sub_}})

@carlossvg carlossvg mentioned this pull request Jun 25, 2021
@wjwwood
Copy link
Member Author

wjwwood commented Jul 29, 2021

Closing in favor of #315

@wjwwood wjwwood closed this Jul 29, 2021
@wjwwood wjwwood deleted the executor_refactor/add_wait_set branch July 29, 2021 22:36
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.

4 participants