Advertisement
130s

sound_play/test.cpp_workedOnTurtlebot_11Dec06

Dec 6th, 2011
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <sound_play/sound_play.h>
  2. #include <unistd.h>
  3.  
  4. void sleepok(int t, ros::NodeHandle &nh)
  5. {
  6. if (nh.ok())
  7. sleep(t);
  8. }
  9.  
  10. int main(int argc, char **argv)
  11. {
  12. ros::init(argc, argv, "sound_play_test");
  13.  
  14. ros::NodeHandle nh;
  15. sound_play::SoundClient sc;
  16.  
  17. sleepok(1, nh);
  18.  
  19. while(nh.ok())
  20. {
  21. sc.say("Hello world!");
  22. sleepok(2, nh);
  23. }
  24. }
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement