示例#1
0
 def do_action(self):
     print("Searching")
     rospy.Subscriber('/mavros/local_position/pose', PoseStamped,
                      self._local_pose_callback)
     ObjectDetection.start_object_detection()
     self.result = ObjectDetection.detect_object()
     print("search-drone-pos: " +
           str(ObjectDetection.get_detection_position()))
     obj = ObjectDetection.get_detection_position()
     if obj.x is not 0 and obj.y is not 0 and obj.z is not 0:
         self.found = True
     print("-------------")
示例#2
0
 def do_action(self):
     print("FlyToDrone!")
     # ObjectDetection.detect_object()
     position = ObjectDetection.get_detection_position()
     self.success = Flying.fly_to_position(position.x, position.y,
                                           position.z)