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

wake up spin when new waitable things are added to a node #209

Closed
wjwwood opened this issue Mar 16, 2016 · 0 comments
Closed

wake up spin when new waitable things are added to a node #209

wjwwood opened this issue Mar 16, 2016 · 0 comments
Assignees

Comments

@wjwwood
Copy link
Member

wjwwood commented Mar 16, 2016

For example:

auto node = rclcpp::Node::make_shared("node_name");
rclcpp::executors::SingleThreadedExecutor executor;
executor.add_node(node);
std::thread spin_thread([&executor]() {executor.spin();});
auto timer = node->create_timer([]() {printf("hello world\n");});
spin_thread.join();

This code may never print "hello world" if the spin call starts before the timer is created. So to fix this, any time something that is affected by spinning is added to a node, spin should be woken up so that it can consider new work.

To accomplish this, each node will probably need a new guard condition which is triggered any time something new is added that needs to wake up spin. This would probably include subscriptions, timers, service servers or clients, and parameter servers or clients.

@jacquelinekay jacquelinekay self-assigned this Mar 16, 2016
@jacquelinekay jacquelinekay added the in progress Actively being worked on (Kanban column) label Mar 16, 2016
@jacquelinekay jacquelinekay added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Mar 17, 2016
@jacquelinekay jacquelinekay self-assigned this Mar 25, 2016
@jacquelinekay jacquelinekay added in progress Actively being worked on (Kanban column) in review Waiting for review (Kanban column) and removed in review Waiting for review (Kanban column) in progress Actively being worked on (Kanban column) labels Mar 25, 2016
@jacquelinekay jacquelinekay removed the in review Waiting for review (Kanban column) label Apr 1, 2016
nnmm pushed a commit to ApexAI/rclcpp that referenced this issue Jul 9, 2022
* Reset RMWCount when DEALLOC rmw storage of wait set

It is safe to reset RMWCount when free rmw storage of wait set

Signed-off-by: jwang <[email protected]>

* setting RMWCount to 0 only when RMWStorage is set to NULL

Signed-off-by: jwang <[email protected]>
nnmm pushed a commit to ApexAI/rclcpp that referenced this issue Jul 9, 2022
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this issue Aug 5, 2022
* [WIP] Move get_storage_identifier and get_bagfile_size

Signed-off-by: Zachary Michaels <[email protected]>

* Remove trailing spaces

Signed-off-by: Zachary Michaels <[email protected]>
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

No branches or pull requests

2 participants