19 from simple_script_server
import *
21 from std_msgs.msg
import ColorRGBA
22 from std_srvs.srv
import Trigger, TriggerResponse
28 sss.set_light(
"light_base",
"cyan")
29 sss.set_light(
"light_torso",
"cyan")
30 return TriggerResponse(
True,
"")
33 sss.set_light(
"light_base",
"red")
34 sss.set_light(
"light_torso",
"red")
35 return TriggerResponse(
True,
"")
38 sss.set_light(
"light_base",
"green")
39 sss.set_light(
"light_torso",
"green")
40 return TriggerResponse(
True,
"")
44 sss.set_light(
"light_base",
"cyan")
47 set_light_torso = rospy.ServiceProxy(
"/light_torso/set_light",SetLightMode)
48 light_mode = LightMode()
49 cyan_color = ColorRGBA()
54 light_mode.colors.append(cyan_color)
56 light_mode.frequency = 30
57 resp = set_light_torso(light_mode)
59 except rospy.ServiceException
as e:
60 print(
"Service call failed: %s"%e)
61 return TriggerResponse(
False,
"Calling light service failed.")
62 return TriggerResponse(
True,
"")
66 sss.set_light(
"light_base",
"cyan")
69 set_light_torso = rospy.ServiceProxy(
"/light_torso/set_light",SetLightMode)
70 light_mode = LightMode()
71 cyan_color = ColorRGBA()
76 light_mode.colors.append(cyan_color)
78 light_mode.frequency = 0.25
79 resp = set_light_torso(light_mode)
81 except rospy.ServiceException
as e:
82 print(
"Service call failed: %s"%e)
83 return TriggerResponse(
False,
"Calling light service failed.")
84 return TriggerResponse(
True,
"")
88 sss.set_mimic(
"mimic",[
"afraid",0,1])
89 return TriggerResponse(
True,
"")
92 sss.set_mimic(
"mimic",[
"angry",0,1])
93 return TriggerResponse(
True,
"")
96 sss.set_mimic(
"mimic",[
"asking",0,1])
97 return TriggerResponse(
True,
"")
100 sss.set_mimic(
"mimic",[
"blinking_left",0,1])
101 return TriggerResponse(
True,
"")
104 sss.set_mimic(
"mimic",[
"blinking",0,1])
105 return TriggerResponse(
True,
"")
108 sss.set_mimic(
"mimic",[
"blinking_right",0,1])
109 return TriggerResponse(
True,
"")
112 sss.set_mimic(
"mimic",[
"bored",0,1])
113 return TriggerResponse(
True,
"")
116 sss.set_mimic(
"mimic",[
"busy",0,1])
117 return TriggerResponse(
True,
"")
120 sss.set_mimic(
"mimic",[
"confused",0,1])
121 return TriggerResponse(
True,
"")
124 sss.set_mimic(
"mimic",[
"default",0,1])
125 return TriggerResponse(
True,
"")
128 sss.set_mimic(
"mimic",[
"falling_asleep",0,1])
129 return TriggerResponse(
True,
"")
132 sss.set_mimic(
"mimic",[
"happy",0,1])
133 return TriggerResponse(
True,
"")
136 sss.set_mimic(
"mimic",[
"laughing",0,1])
137 return TriggerResponse(
True,
"")
140 sss.set_mimic(
"mimic",[
"no",0,1])
141 return TriggerResponse(
True,
"")
144 sss.set_mimic(
"mimic",[
"sad",0,1])
145 return TriggerResponse(
True,
"")
148 sss.set_mimic(
"mimic",[
"searching",0,1])
149 return TriggerResponse(
True,
"")
152 sss.set_mimic(
"mimic",[
"sleeping",0,1])
153 return TriggerResponse(
True,
"")
156 sss.set_mimic(
"mimic",[
"surprised",0,1])
157 return TriggerResponse(
True,
"")
160 sss.set_mimic(
"mimic",[
"tired",0,1])
161 return TriggerResponse(
True,
"")
164 sss.set_mimic(
"mimic",[
"waking_up",0,1])
165 return TriggerResponse(
True,
"")
168 sss.set_mimic(
"mimic",[
"yes",0,1])
169 return TriggerResponse(
True,
"")
172 sss.say(
"sound", [
"Hello, my name is Care O bot, a mobile service robot from Mojin Robotics."])
173 return TriggerResponse(
True,
"")
def setMimicSearching_cb(req)
def setMimicSurprised_cb(req)
def setLightGreen_cb(req)
def setMimicBlinkingRight_cb(req)
def setMimicTired_cb(req)
def setMimicDefault_cb(req)
def setMimicWakingUp_cb(req)
def setMimicBored_cb(req)
def setMimicBlinking_cb(req)
def setMimicFallingAsleep_cb(req)
def setMimicBlinkingLeft_cb(req)
def setLightCyanSweep_cb(req)
def setMimicAsking_cb(req)
def setMimicSleeping_cb(req)
def setMimicLaughing_cb(req)
def setMimicConfused_cb(req)
def setMimicHappy_cb(req)
def setMimicAngry_cb(req)
def setLightCyanBreath_cb(req)
def setMimicAfraid_cb(req)