Skip to content

Remove fixed guard conditions, add notify guard conditions - #210

Merged
jackieokay merged 14 commits into
masterfrom
fixed_guard_conditions
Apr 1, 2016
Merged

jackieokay merged 14 commits into
masterfrom
fixed_guard_conditions

Conversation

@jackieokay

Copy link
Copy Markdown
Contributor

Fixes #209
also connects to ros2/rcl#33

@jackieokay jackieokay added the in progress Actively being worked on (Kanban column) label Mar 17, 2016
@jackieokay jackieokay self-assigned this Mar 17, 2016
number_of_subscriptions_(0), number_of_timers_(0), number_of_services_(0),
use_intra_process_comms_(use_intra_process_comms)
use_intra_process_comms_(use_intra_process_comms),
notify_guard_condition_(rmw_create_guard_condition())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Where is this being deallocated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah, yeah, I have to add a custom destructor for Node now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What if rmw_create_guard_condition() returns nullptr (fails)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Does 9dc89bb answer these questions?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm.

@wjwwood

wjwwood commented Mar 24, 2016

Copy link
Copy Markdown
Member

+1

Comment thread rclcpp/include/rclcpp/node_impl.hpp Outdated
if (rmw_trigger_guard_condition(notify_guard_condition_) != RMW_RET_OK) {
throw std::runtime_error(
std::string(
"Failed to notify waitset of change to node state: ") + rmw_get_error_string());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it be helpful to customize the following error message to mention how the node state changed in order to distinguish them in case they happen?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea. I changed the error messages to the format "Failed to notify waitset on X creation" in ddc6609, where X is the type of entity added to the node.

@jackieokay

Copy link
Copy Markdown
Contributor Author

this has sat for a while so I'm going to merge soon unless there are objections.

@wjwwood

wjwwood commented Apr 1, 2016

Copy link
Copy Markdown
Member

It's in "in progress"?

I plus ones it before, so it should be fine. You were just fixing up tests right?

@jackieokay

Copy link
Copy Markdown
Contributor Author

Yeah... I think the label is a Waffle/Github sync bug. Not sure about that.

@jackieokay
jackieokay merged commit 6bcd9db into master Apr 1, 2016
@jackieokay
jackieokay deleted the fixed_guard_conditions branch April 1, 2016 21:07
@jackieokay jackieokay removed the in progress Actively being worked on (Kanban column) label Apr 1, 2016
nnmm pushed a commit to ApexAI/rclcpp that referenced this pull request Jul 9, 2022
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this pull request Aug 5, 2022
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.

3 participants