我有看起来像这样的python代码:
def execute_callback(self, goal_handle):
#This is a callback function from the action server
#-------do something-----
#publishing a message
self._cur_location_publisher.publish(msg)
# Now should wait until below callback is called
#update result
return result
def listener_callback(self, msg):
# called when result from other node is subscribed
#-----manipulate result----------
如何等待调用回调,然后继续在execute_callback中更新结果? 我正在使用python 3.6.2