def __init__(self, frame_id, name, namespace, marker_id):
		Marker.__init__(self)
		
		self.header.frame_id = frame_id
		self.ns = namespace
		self.id = marker_id
		
		self.type = Marker.SPHERE
		
		self.detection()
		
		self._publisher = rospy.Publisher('~'+name, Marker, queue_size=10) 
Example #2
0
 def __init__(self, *args, **kwargs):
     # init base class
     Marker.__init__(self, *args, **kwargs)
     
     mID = kwargs.get('id')
     if mID <= len(Command.default_colors):
         try:
             color = Command.default_colors[mID-1]
         except:
             color = self.random_color()
     else:
         color = self.random_color()
     
     rospy.logdebug('--with color {}'.format(color))
         
     self.color.a = 0.8
     self.color.r = color[0]/255.0
     self.color.g = color[1]/255.0
     self.color.b = color[2]/255.0