Class offboard_start
1-1) subscription, publisher 선언
subscriptions (vehicle_status, velocity_sub, vehicle_attitude, arm_message, vtol_message_fw, vtol_message_mc)
publishers(offboard_mode, velocity, trajectory,vehiclecommand )
1-2) main logic
# Variables
self.nav_state = VehicleStatus.NAVIGATION_STATE_MAX
self.arm_state = VehicleStatus.ARMING_STATE_ARMED
self.velocity = Vector3()
self.yaw = 0.0 # Yaw value send
self.trueYaw = 0.0 # Current Yaw
self.offboardMode = False
self.flightCheck = False
self.myCnt = 0
self.arm_message = False
self.failsafe = False
self.vtol_msg_fw = False
self.vtol_msg_mc = False
self.states = {
"IDLE": self.state_init,
"ARMING": self.state_arming,
"TAKEOFF": self.state_takeoff,
"LOITER": self.state_loiter,
"OFFBOARD": self.state_offboard,
"DONE": self.state_done
}
self.current_state = "IDLE"
self.last_state = self.current_state
msg 수신 → data 로그 생성
current_state에 따라 다르게 실행
arm_state ≠vehiclestatus.arming_state_armed → arm_message= False