Skip to content

Commit

Permalink
Robustify ros spin once
Browse files Browse the repository at this point in the history
  • Loading branch information
ToniRV committed Feb 26, 2020
1 parent 725a098 commit 5bc2e36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/RosOnlineDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ RosOnlineDataProvider::RosOnlineDataProvider()

LOG(WARNING) << "Waiting for ground-truth pose to initialize VIO...";
while (!gt_init_pose_receided_) {
ros::spinOnce();
if (nh_.ok() && ros::ok() && !ros::isShuttingDown()) {
ros::spinOnce();
} else {
LOG(FATAL) << "Ros is not ok... Shutting down.";
}
}
}

Expand Down

0 comments on commit 5bc2e36

Please sign in to comment.