parameters: (self)
docstring: main ROS thread
docstring_summary: main ROS thread
docstring_tokens: main ROS thread
function: def start(self):
          rospy.init_node("offboard_node")
          for i in range(10):
              if self.current_heading is not None:
                  break
              else:
                  print("Waiting for initialization.")
                  time.sleep(0.5)
          self.cur_target_pose = self.construct_target(0, 0, self.takeoff_height, self.current_heading)
  
          #print ("self.cur_target_pose:", self.cur_target_pose, type(self.cur_target_pose))
  
          for i in range(10):
              self.local_target_pub.publish(self.cur_target_pose)
              self.arm_state = self.arm()
              self.offboard_state = self.offboard()
              time.sleep(0.2)
  
  
          if self.takeoff_detection():
              print("Vehicle Took Off!")
  
          else:
              print("Vehicle Took Off Failed!")
              return
  
          '''
          main ROS thread
          '''
          while self.arm_state and self.offboard_state and (rospy.is_shutdown() is False):
  
              self.local_target_pub.publish(self.cur_target_pose)
  
              if (self.state is "LAND") and (self.local_pose.pose.position.z < 0.15):
  
                  if(self.disarm()):
  
                      self.state = "DISARMED"
  
  
              time.sleep(0.1)
function_tokens: def start ( self ) : rospy . init_node ( "offboard_node" ) for i in range ( 10 ) : if self . current_heading is not None : break else : print ( "Waiting for initialization." ) time . sleep ( 0.5 ) self . cur_target_pose = self . construct_target ( 0 , 0 , self . takeoff_height , self . current_heading ) #print ("self.cur_target_pose:", self.cur_target_pose, type(self.cur_target_pose)) for i in range ( 10 ) : self . local_target_pub . publish ( self . cur_target_pose ) self . arm_state = self . arm ( ) self . offboard_state = self . offboard ( ) time . sleep ( 0.2 ) if self . takeoff_detection ( ) : print ( "Vehicle Took Off!" ) else : print ( "Vehicle Took Off Failed!" ) return while self . arm_state and self . offboard_state and ( rospy . is_shutdown ( ) is False ) : self . local_target_pub . publish ( self . cur_target_pose ) if ( self . state is "LAND" ) and ( self . local_pose . pose . position . z < 0.15 ) : if ( self . disarm ( ) ) : self . state = "DISARMED" time . sleep ( 0.1 )