did some work

This commit is contained in:
Pavel Lutskov
2019-01-31 17:44:15 +01:00
parent e368cd9abe
commit 3217b7f841
10 changed files with 323 additions and 44 deletions

View File

@@ -4,7 +4,7 @@ import rospy
from teleoperation.srv import InformController, InformControllerResponse
STATE = 'idle' # Also walk, imitate and fallen
STATE = 'idle' # Also walk, imitate, fallen, recognizing
def inform_controller_factory(who):
@@ -49,7 +49,7 @@ def handle_request(r):
if STATE == 'imitate':
permission = True
elif module == 'speech_recognition':
elif module == 'speech':
if message == 'recognize':
if STATE in ('idle', 'imitate'):
permission = True
@@ -73,6 +73,6 @@ def handle_request(r):
if __name__ == '__main__':
rospy.init_node('teleoperation/controller', log_level=rospy.INFO)
rospy.init_node('controller', log_level=rospy.INFO)
ic = rospy.Service('inform_controller', InformController, handle_request)
rospy.spin()