def start_switch(self):
FunctionUnit.init_node(self)
#print 'run'
if not(self._topic_1 == None):
receive_1 = FunctionUnit.create_receive(self, self._topic_1, self._msg_type_1, self.receive_cb_1)
if not(self._topic_2 == None):
receive_2 = FunctionUnit.create_receive(self, self._topic_2, self._msg_type_2, self.receive_cb_2)
receive_3 = FunctionUnit.create_receive(self, self._motive_topic_1, Bool, self.motivational_shared_var_update)
FunctionUnit.spin(self)
评论列表
文章目录