can switch between autoimitation and voice mode
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#! /usr/bin/env python
|
||||
import os
|
||||
from time import sleep
|
||||
|
||||
import rospy
|
||||
from naoqi import ALProxy, ALBroker, ALModule
|
||||
@@ -11,6 +10,7 @@ from controller import inform_controller_factory
|
||||
fall_broker = None
|
||||
almem = None
|
||||
|
||||
|
||||
_inform_controller = inform_controller_factory('fall_detector')
|
||||
|
||||
|
||||
@@ -27,12 +27,12 @@ class FallDetectorModule(ALModule):
|
||||
if not _inform_controller('fallen'):
|
||||
return
|
||||
self.mp.rest()
|
||||
sleep(2)
|
||||
rospy.Rate(0.5).sleep()
|
||||
self.mp.wakeUp()
|
||||
pp = ALProxy('ALRobotPosture')
|
||||
while not pp.goToPosture('StandInit', 1.0):
|
||||
pass
|
||||
sleep(1)
|
||||
rospy.Rate(1).sleep()
|
||||
_inform_controller('recovered')
|
||||
|
||||
|
||||
@@ -51,6 +51,6 @@ if __name__ == "__main__":
|
||||
"on_robot_fallen")
|
||||
|
||||
while not rospy.is_shutdown():
|
||||
sleep(0.1)
|
||||
rospy.Rate(10).sleep()
|
||||
|
||||
fall_broker.shutdown()
|
||||
|
||||
Reference in New Issue
Block a user