std_marker_demo.py
Go to the documentation of this file.
00001 #!/usr/bin/python
00002 
00003 import rospy
00004 from easy_markers.generator import *
00005 
00006 if __name__=='__main__':
00007     rospy.init_node('some_markers')
00008     pub = rospy.Publisher('/visualization_marker', Marker)
00009     gen = MarkerGenerator()
00010     gen.ns = '/awesome_markers'
00011     gen.type = Marker.SPHERE_LIST
00012     gen.scale = [.3]*3
00013     gen.frame_id = '/base_link'
00014    
00015     while not rospy.is_shutdown():
00016         gen.counter = 0
00017         t = rospy.get_time()
00018 
00019         gen.color = [1,0,0,1]
00020         m = gen.marker(points= [(0, i, (i+t)%5.0) for i in range(10)])
00021         pub.publish(m)
00022         gen.color = [0,1,0,1]
00023         m = gen.marker(points= [(0, i, (i-t)%5.0) for i in range(10)])
00024         pub.publish(m)
00025         rospy.sleep(.1)


easy_markers
Author(s): David V. Lu!!
autogenerated on Fri Feb 12 2016 00:28:27