overlay_menu_sample.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import rospy
00004 from jsk_rviz_plugins.msg import OverlayMenu
00005 
00006 rospy.init_node("test_menu")
00007 p = rospy.Publisher("test_menu", OverlayMenu)
00008 r = rospy.Rate(5)
00009 counter = 0
00010 while not rospy.is_shutdown():
00011   menu = OverlayMenu()
00012   menu.title = "The Beatles"
00013   menu.menus = ["John Lennon", "Paul McCartney", "George Harrison",
00014                 "Ringo Starr"]
00015   menu.current_index = counter % len(menu.menus)
00016   if counter % 100 == 0:
00017     menu.action = OverlayMenu.ACTION_CLOSE
00018   p.publish(menu)
00019   counter = counter + 1
00020   r.sleep()


jsk_rviz_plugins
Author(s): Kei Okada , Yohei Kakiuchi , Shohei Fujii , Ryohei Ueda
autogenerated on Mon Oct 6 2014 01:18:44