Main Page
Namespaces
Classes
Files
File List
scripts
std_marker_demo.py
Go to the documentation of this file.
1
#!/usr/bin/python
2
3
import
rospy
4
from
easy_markers.generator
import
*
5
6
if
__name__==
'__main__'
:
7
rospy.init_node(
'some_markers'
)
8
pub = rospy.Publisher(
'/visualization_marker'
, Marker)
9
gen =
MarkerGenerator
()
10
gen.ns =
'/awesome_markers'
11
gen.type = Marker.SPHERE_LIST
12
gen.scale = [.3]*3
13
gen.frame_id =
'/base_link'
14
15
while
not
rospy.is_shutdown():
16
gen.counter = 0
17
t = rospy.get_time()
18
19
gen.color = [1,0,0,1]
20
m = gen.marker(points= [(0, i, (i+t)%5.0)
for
i
in
range(10)])
21
pub.publish(m)
22
gen.color = [0,1,0,1]
23
m = gen.marker(points= [(0, i, (i-t)%5.0)
for
i
in
range(10)])
24
pub.publish(m)
25
rospy.sleep(.1)
easy_markers.generator.MarkerGenerator
Definition:
generator.py:54
easy_markers.generator
Definition:
generator.py:1
easy_markers
Author(s): David V. Lu!!
autogenerated on Mon Jun 10 2019 15:48:46