Turtle Mode (Copter)
Executive Summary
Turtle Mode (officially "Crash Flip") is designed to recover a multicopter that has flipped upside down after a crash. Instead of walking to the vehicle, the pilot can use this mode to reverse the motors and "flip" the drone upright using its own thrust.
Theory & Concepts
1. Reverse Thrust Mechanics
Standard propellers and motors are optimized to spin in one direction.
- The Airfoil: Propeller blades have a specific shape (airfoil) that creates lift. When spun backwards, they are incredibly inefficient.
- The Solution: To flip a drone over, you don't need efficient lift, you just need force. ArduPilot commands the ESC to reverse the magnetic field of the motor, producing enough negative thrust to "kick" the drone off the ground.
2. Geometry of the Flip
Flipping an upside-down drone is a game of Leverage.
- The drone is a square. If it is resting on its "top," it is stable.
- By spinning only the two motors on one side (e.g., the Right side) in reverse, you create a torque around the Left side's props. This leverages the drone's own weight to pivot it over its edge.
Hardware Dependency Matrix
This mode has strict hardware requirements related to the ESCs.
| Sensor/Hardware | Requirement | Code Implementation Notes |
|---|---|---|
| DShot ESCs | CRITICAL | The ESCs must support DShot protocol (DShot300, DShot600, etc.) to accept the "Reverse Direction" command. |
| Gyroscope | OPTIONAL | Not strictly required for the flip itself (it's open-loop), but useful for detecting when upright. |
| GPS | NONE | Not used. |
Control Architecture (Engineer's View)
Turtle Mode operates very differently from normal flight because it requires reversing motor direction.
- Entry Logic:
- When engaged, the mode checks if DShot is enabled. If not, it fails to initialize.
- It sends a DShot command (
DSHOT_REVERSE) to the ESCs.
- Motor Selection Logic:
- The code calculates which motors need to spin based on the pilot's stick input.
- Example: If you push the Pitch Stick Forward, the "Rear" motors spin (in reverse) to lift the tail and flip the nose over.
- Math: It projects the stick vector onto each motor's position vector to determine its contribution.
- Exit Logic:
- When you switch out of Turtle mode, the code sends
DSHOT_NORMALto restore normal rotation direction.
- When you switch out of Turtle mode, the code sends
Pilot Interaction
- Arming: You must be DISARMED to enter Turtle Mode. Once in the mode, you must ARM the vehicle.
- Safety: The motors will NOT spin immediately upon arming.
- Flipping:
- Raise the throttle (safety interlock).
- Push Pitch or Roll stick in the direction you want to flip.
- The motors opposite that direction will spin up in reverse.
- Disarming: Once upright, DISARM immediately. Then switch back to a normal flight mode (Stabilize/Acro).
Failsafe Logic
- DShot Failure: If the ESCs do not acknowledge the reverse command (or support it), the motors might spin the wrong way, driving the drone into the ground instead of flipping it. Test this on the bench (props off) first!
Key Parameters
| Parameter | Default | Description |
|---|---|---|
CRASH_FLIP_RATE |
0 | (0-100) Controls the power of the flip. Higher values spin motors faster. Start low! |
FRAME_CLASS |
1 | Must be a Multicopter (Quad, Hex, Octo). Not valid for Helis or Tricopters. |
Source Code Reference
- Mode Logic:
ardupilot/ArduCopter/mode_turtle.cpp - Initialization:
ModeTurtle::init()