def _subscribe(self):
assert self.state_subscriber is None
assert self.position_subscriber is None
self.state_subscriber = rospy.Subscriber(
'%s/mavros/state' % self.namespace, State,
callback=self._state_callback)
self.position_subscriber = rospy.Subscriber(
'%s/mavros/global_position/global' % self.namespace, NavSatFix,
callback=self._position_callback)
评论列表
文章目录