Skip to content

Commit

Permalink
Merge pull request #15 from cyberbotics/klues-patch-1
Browse files Browse the repository at this point in the history
keyboard_teleop.cpp: avoid high CPU usage
  • Loading branch information
klues authored Apr 1, 2020
2 parents 100db61 + 127313a commit 546c8fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/keyboard_teleop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ int main(int argc, char **argv) {
ros::Subscriber nameSub = n.subscribe("model_name", 100, controllerNameCallback);
while (controllerCount == 0 || controllerCount < nameSub.getNumPublishers()) {
ros::spinOnce();
ros::spinOnce();
ros::spinOnce();
ros::Duration(0.5).sleep();
}
ros::spinOnce();

Expand Down

0 comments on commit 546c8fa

Please sign in to comment.