def run(self):
FunctionUnit.init_node(self)
thread.start_new_thread(self.timer,())
heartbeat_receive = FunctionUnit.create_receive(self, self._heartbeat_topic, Heartbeat, self.heartbeat_on_received)
self._heartbeat_send = FunctionUnit.create_send(self, 'heart_beat', Heartbeat)
self._switch_send = FunctionUnit.create_send(self, self._switch_topic, Bool)
#sensory_receive = FunctionUnit.create_receive(self, self._node_name+"/sensory_feedback", Bool, self.sensory_on_received)
FunctionUnit.spin(self)
# def start_motive(self):
#FunctionUnit.init_node(self)
#heartbeat_receive = FunctionUnit.create_receive(self, self._heartbeat_topic, Heartbeat, self.heartbeat_on_received)
#FunctionUnit.spin(self)
motivational_behavior.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录