-
Notifications
You must be signed in to change notification settings - Fork 159
Adds Guard Conditions #249
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
Adds Guard Conditions #249
Conversation
0d504a0
to
120817b
Compare
I'll check it out this evening! |
120817b
to
c6e3145
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.
Great job as usual. I left a round of comments.
d9a2f4d
to
862167c
Compare
Updated to address all comments! |
b9c242b
to
8db9568
Compare
8db9568
to
e76865a
Compare
e76865a
to
1e01cd4
Compare
BTW, you could add guard conditions (and graph support, which I forgot) to the new |
6543fd4
to
4ca95c5
Compare
All comments addressed, except for the open discussion on the return type of |
dc8b52a
to
d00df06
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.
(Probably) final comments from my side
7e0744b
to
108ea39
Compare
@christopherjreid in the future, could you push commit by commit, instead of force-push? It's easier to see the changes that happen while reviewing a PR. We'll squash all the commits in the end when we merge the PR, so there's no need to squash them while the PR is being worked on. Thanks. |
- Adds the Guard Condition struct encapsulating rcl_guard_condition_t. - Adds optional callbacks and a trigger method to approximate the rclcpp implementation. - Adds an `add_guard_condition` method to `WaitSet` to add the GuardCondition to the WaitSet - Adds a `create_guard_condition` method to `Node` and adds a weak pointer to the created guard condition to the `Node`'s internal data. When `spin_once` is called on the node, the guard condition can be used to interrupt the wait - Increments version for all packages to 0.3.0
108ea39
to
2a8999d
Compare
I also took a look at the clippy error – I hadn't thought about that. Maybe it would be nicest to have two methods:
That way the callback type could always be deduced. I think it also makes the call sites prettier. Alternatively, we could just revert to taking boxed callbacks. |
@christopherjreid I agree with @nnmm about adding an explicit |
Hrm, so we're looking at:
? |
No, the rcl_context version can receive a boxed Option callback |
57fcc86
to
a256204
Compare
a256204
to
7722761
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.
LGTM!
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.
@christopherjreid LGTM! Thank you so much for iterating with us and for your patience 🙂
implementation.
add_guard_condition
method to WaitSet to add theGuardCondition to the WaitSet