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

Enable possibility to stop execution of play using ctrl-c #54

Merged
merged 1 commit into from Oct 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion rosbag2_transport/src/rosbag2_transport/player.cpp
Expand Up @@ -118,7 +118,7 @@ void Player::play_messages_from_queue()
{
auto start_time = std::chrono::high_resolution_clock::now();

while (message_queue_.size_approx() != 0 || !is_storage_completely_loaded()) {
while ((message_queue_.size_approx() != 0 || !is_storage_completely_loaded()) && rclcpp::ok()) {
ReplayableMessage message;
if (message_queue_.try_dequeue(message)) {
std::this_thread::sleep_until(start_time + message.time_since_start);
Expand Down