Ejemplo n.º 1
0
 def sayVoltage(self):
     msg = VoiceAnnouncement()
     msg.priority = VoiceAnnouncement.FIRST
     if self.voltage is not None:
         msg.words = "Battery voltage, %4.1f"%self.voltage
     else:
         msg.words = "No battery voltage reported"
     self.audioPub.publish(msg)
Ejemplo n.º 2
0
 def voltageCallBack(self, float):
     self.voltage=float.data
     #rospy.logdebug("voltage_announcer received voltage %f", self.voltage)
     if ((self.voltage <= self.lowVoltageLimit) and not self.whine_guard):
         msg = VoiceAnnouncement()
         msg.priority = VoiceAnnouncement.FIRST
         msg.words = "Warning. Battery voltage, %4.1f"%self.voltage
         self.audioPub.publish(msg)
         self.whine_guard = True
         rospy.Timer(rospy.Duration(15.0), self.clear_guard, oneshot = True)
Ejemplo n.º 3
0
 def say(self, utterance):
     msg = VoiceAnnouncement()
     msg.priority = VoiceAnnouncement.OVERRIDE
     msg.words = utterance
     self.audio_pub.publish(msg)