Skip to content

Commit

Permalink
[rosbag] Fix waitForSubscribers hanging with simtime (ros#1543)
Browse files Browse the repository at this point in the history
* [rosbag] Fix waitForSubscribers hanging with simtime

Use Walltime for sleep as clock is not running yet

* Simplify wallsleep in waitForSubscribers

Co-Authored-By: AlexReimann <alexander.reimann@enway.ai>
  • Loading branch information
Alexander Reimann authored and tahsinkose committed Apr 15, 2019
1 parent a4000ee commit f86ba17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/rosbag/src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void Player::waitForSubscribers() const
foreach(const PublisherMap::value_type& pub, publishers_) {
all_topics_subscribed &= pub.second.getNumSubscribers() > 0;
}
ros::Duration(0.1).sleep();
ros::WallDuration(0.1).sleep();
}
std::cout << "Finished waiting for subscribers." << std::endl;
}
Expand Down

0 comments on commit f86ba17

Please sign in to comment.