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

use rate instead of thread::sleep to react to Ctrl-C #348

Merged
merged 1 commit into from
May 22, 2019

Conversation

dirk-thomas
Copy link
Member

Fixes #347 by using a WallRate.sleep instead of std::this_thread::sleep_for.

The additional check of rclcpp::ok after the sleep ensure to not print an error message when Ctrl-C-ing the process:

[ERROR] [lc_client]: Service /lc_talker/change_state is not available.

@dirk-thomas dirk-thomas added enhancement New feature or request in review Waiting for review (Kanban column) labels May 22, 2019
@dirk-thomas dirk-thomas self-assigned this May 22, 2019
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Copy link
Member

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

LGTM

@dirk-thomas dirk-thomas merged commit cee4332 into master May 22, 2019
@delete-merged-branch delete-merged-branch bot deleted the dirk-thomas/fix347 branch May 22, 2019 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lifecycle service client sometimes takes a long time to quit on Ctrl-C
2 participants