Advertisement
Guest User

naobaby

a guest
Dec 9th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1.  
  2. self.posture.goToPosture("Stand",1.0)
  3.  
  4. self.tts.post.say("Hello") # Do both things at the same time
  5. hello(self.motion) ########
  6.  
  7.  
  8. dance(self.motion) # The robot starts dancing
  9.  
  10. self.tts.post.say("I am tired")##
  11. wipe(self.motion)
  12.  
  13. self.posture.goToPosture("LyingBack",1.0)
  14.  
  15. ## Waiting for 4 seconds
  16. import time
  17. time.sleep(4)
  18.  
  19. ## Making the robot stand at speed 1, walk forwards, say phrase and sit at speed 1
  20. self.posture.goToPosture("Stand",1.0)
  21. self.motion.walkTo(0.5,0.0,0.0)
  22. self.tts.say("Mission accomplished")
  23. self.posture.goToPosture("SitRelax",1.0)
  24.  
  25.  
  26. # Defer the stopping procedure to the box
  27. self.onInput_onStop()
  28.  
  29. def onInput_onStop(self):
  30. self.onUnload() #it is recommended to reuse the clean-up as the box is stopped
  31. self.onStopped() #activate the output of the boxx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement