35 import roslib; roslib.load_manifest(
'kobuki_testsuite')
38 from kobuki_msgs.msg
import Led
40 colours = [
"Black",
"Green",
"Orange",
"Red"]
42 rospy.init_node(
"test_led_array")
44 pub.append(rospy.Publisher(
'/mobile_base/commands/led1',Led))
45 pub.append(rospy.Publisher(
'/mobile_base/commands/led2',Led))
50 leds[0].value = Led.GREEN
51 leds[1].value = Led.BLACK
54 while not rospy.is_shutdown():
56 if led.value == Led.GREEN:
57 led.value = Led.ORANGE
58 elif led.value == Led.ORANGE:
60 elif led.value == Led.RED:
62 elif led.value == Led.BLACK:
64 print "[" + colours[leds[0].value] +
"," + colours[leds[1].value] +
"]"