I used the example of change flight mode, in order to change to STABILIZE mode, but the terminal printed ‘Command executed, but failed’.
Even though I had changed the firmware to ardusub, I printed MAV_TYPE and found that it was ‘fixed wing’, not ‘submarine’.
from pymavlink import mavutil import time # Create the connection # Need to provide the serial port and baudrate master = mavutil.mavlink_connection( '/dev/ttyACM0', baud=115200) mav_type=master.field('HEARTBEAT', 'type', master.mav_type) print(mav_type)
The above program prints 1, and the following figure shows that this is a fixed wing.
How do I solve this problem?Thank you.