Ardusub learning-flight mode

Reference materials:

Ardusb official manual
Sub: Rework joystick input and pilot input in general
Flight Modes


Ardusub supports multiple flight modes, but some of them require corresponding sensor support to operate. At present, Ardusub's modes mainly include standard mode and advanced mode. The standard mode is well supported, but the advanced mode is still in the development stage, so it is not recommended to use it under normal circumstances.

It should be noted that, unlike other multi-rotor drones in the air, Ardusub does not support QGC to control pitch and roll motion, but it can be controlled by a gamepad. Specifically, a roll_pitch_toggle button is set on the handle, which is similar to the function of the shift key on the keyboard to realize the shift function. When it is not pressed, the joystick of the handle normally supports forward, backward, left, and right translational movements, but when this button is pressed, the forward and backward movement of the joystick changes to the Roll direction posture adjustment, and the left and right movement joystick changes to the pitch direction posture adjustment.

Note: Ardusub is started manually by default.


Standard mode

  • mode_manual : manual mode. The movement, position and posture of the robot are directly controlled by the joystick of the handle. At this time, the state of the robot is completely controlled by the operator.
  • mode_stabilize : Self-stabilize mode. Similar to manual mode, but automatically stabilizes the course and attitude. When the joystick of the handle is in the center position, the underwater drone will maintain a horizontal and stable attitude. In this mode, two parameters are used to control the maximum angle of robot deflection: the pilot input gain (pilot input gain, zoomable input) and ANGLE_MAX (which can control the maximum angle that the vehicle can deflect in stable mode, if you remember correctly, it should It is in the MultiCopter structure in the AP_Vehicle class. If you make a mistake, please let me know in time). For example, if the ANGLE_MAX parameter is set to 80° and the input gain is 50%, then when the Roll or Pitch stick is pushed to the end, the vehicle will deflect 40°. At this time, after pressing the roll_pitch_toggle button, the robot will lock the current posture and return to the state where the joystick controls the front, back, left, and right movements. If you want to return to the original posture, then switch to MANUAL manual control mode, or press the roll_pitch_toggle button again.
  • mode_depth_hold : fixed depth mode. The function of this mode is similar to the STABILIZE self-stabilization mode, but only allows small-angle deflection, large-angle deflection will be abnormal. In this mode, try to avoid the input control transformation in the Roll and Pitch directions until proper support is obtained in the future.

Advanced mode

  • mode_poshold : Position Hold Model (Position Hold Model). In this mode, the UAV will maintain the current absolute position, attitude and orientation when there is no control input. And can be re-operated and positioned by the operator (currently not yet fully supported).
  • mode_auto : automatic mode. In this mode, the tasks set on the autopilot will be executed automatically, and the user's input control amount will be ignored in most cases. The vehicle can be disarmed or switch mode to suspend the current mission (currently not fully supported).
  • mode_circle : In circle mode, the vehicle will navigate in the circle with the center point of its front facing (currently not fully supported).
  • mode_guided : The guided mode allows the ground control station or supporting computer to dynamically set the target position of the vehicle. It also allows "click to navigate to here" interaction with the map (currently not yet fully supported).
  • mode_acro : Acrobatics mode. Similar to manual control mode, but precise control and stable speed.

Guess you like

Origin blog.csdn.net/moumde/article/details/108867899