def callLedsForCmplxMv(self): fColor = ColorRGBA() sColor = ColorRGBA() fColor.r = 1.0 fColor.g = 1.0 fColor.b = 1.0 sColor.r = 0.0 sColor.g = 0.0 sColor.b = 0.0 ledGroup = LedGroup() ledGroup.ledMask = 3 # binary mask to decide which leds are active try: self.LEDS_BLINK(ledGroup, fColor, sColor, rospy.Duration(0.75), rospy.Duration(0.25), rospy.Duration(5), 50) except rospy.ServiceException, e: print "Service call failed: %s" % e
def callLedsForTurningMv(self, side): fColor = ColorRGBA() sColor = ColorRGBA() fColor.r = 0.5 fColor.g = 1.0 fColor.b = 0.5 sColor.r = 0.0 sColor.g = 0.0 sColor.b = 0.0 ledGroup = LedGroup() if side == 'LEFT': ledGroup.ledMask = 1 # binary mask to decide which leds are active else: ledGroup.ledMask = 2 try: self.LEDS_BLINK(ledGroup, fColor, sColor, rospy.Duration(0.75), rospy.Duration(0.25), rospy.Duration(5), 50) except rospy.ServiceException, e: print "Service call failed: %s" % e
def callLedsForStraightMv(self, status): fColor = ColorRGBA() sColor = ColorRGBA() fColor.r = 0 if status == 'STRAIGHT': fColor.g = 0 fColor.b = 0.9 else: fColor.g = 0.9 fColor.b = 0 sColor.r = 0 sColor.g = 0.9 sColor.b = 0 ledGroup = LedGroup() ledGroup.ledMask = 3 # binary mask to decide which leds are active try: self.LEDS_FADE(ledGroup, fColor, sColor, rospy.Duration(0.5), True, rospy.Duration(2), 50) except rospy.ServiceException, e: print "Service call failed: %s" % e