Learning the ArduPilot Codebase¶
The ArduPilot code base is quite large (about 700k lines for the core ardupilot git tree) and can be quite intimidating to a new user. This page is meant to give some suggestions on how to come up to speed on the code quickly. It assumes you already are familiar with the key concepts of C++ and the many of the examples currently assume you will be exploring the code on a Linux system.
This page and the pages linked below are designed to be used as a tutorial. You should work through each page step by step, trying things for yourself as you go. If you think some important information is missing or could be improved then please open an issue for the wiki and we will try to get to it when we can.
- Library Description
- Library Example Sketches
- Sensor Drivers
- UARTs and the Console
- RC Input and Output
- Storage and EEPROM management
- Copter - Vehicle Code introduction
- Copter - Attitude Control
- Copter - Adding Parameters
- Copter - Adding a new flight mode (ver 3.6 and higher)
- Copter - Adding a new flight mode (ver 3.5 and lower)
- Copter - Scheduling your new code to run intermittently
- Copter - Object Avoidance
- Rover - Adding a new drive mode
- Rover - L1 navigation controller
- Plane - Architecture overview
- Adding a new Log message
- Adding a new MAVLink message
- Adding a new MAVLink Gimbal
There are currently 4 vehicles in ArduPilot (Copter, Plane, Rover, Antenna Tracker) and while there are a lot of common elements between different vehicle types, they are each different. For now we only have a detailed description of the code structure for the Copter code.