@@ -10,8 +10,8 @@ def __init__(self):
1010 self .twitter_hashtag = str ()
1111 self .print_tags ()
1212
13- sub_vk = rospy .Subscriber ('/social/vk/newsfeed_scanner/hashtag' , String , self .callback_vk_hashtag )
14- twitter_vk = rospy .Subscriber ('/social/twitter/code_scanner/code' , String , self .callback_twitter_hashtag )
13+ # sub_vk = rospy.Subscriber('/social/vk/newsfeed_scanner/hashtag', String, self.callback_vk_hashtag)
14+ # twitter_vk = rospy.Subscriber('/social/twitter/code_scanner/code', String, self.callback_twitter_hashtag)
1515
1616 def callback_vk_hashtag (self , data : String ):
1717 self .vk_hashtag = data .data
@@ -22,10 +22,11 @@ def callback_twitter_hashtag(self, data: String):
2222 self .print_tags ()
2323
2424 def print_tags (self ):
25- clear = os .system ('clear' )
26- print ('-----------hashtags-----------' )
27- print ('vk: ' , self .vk_hashtag )
28- print ('twitter: ' , self .twitter_hashtag )
25+ #print('vk: ', self.vk_hashtag)
26+ if rospy .has_param ('twitter_hashtag' ):
27+ clear = os .system ('clear' )
28+ print ('-----------hashtags-----------' )
29+ print ('twitter: ' , rospy .get_param ('twitter_hashtag' )
2930
3031
3132
@@ -38,5 +39,5 @@ def print_tags(self):
3839 rospy .get_master ().getPid ()
3940 except :
4041 break
41-
42- time .time ( 0. 1 )
42+ social . print_tags ()
43+ time .sleep ( 1 )
0 commit comments