Ardupilot open source flight control Wiki modification operation

Ardupilot open source flight control Wiki modification operation

  • 1. Origin
  • 2. Page editing and modification
    • 2.1 Step 1: Apply for a Github account
    • 2.2 Step 2: Select the modification page
    • 2.3 Step 3: Modify page content
    • 2.4 Step 4: Submit changes
    • 2.5 Step 5: Add PR
  • 3. Add, delete, and modify pages
    • 3.1 Step 1: Clone the local Ardupilot Wiki
    • 3.2 Step 2: Set up a local verification environment
    • 3.3 Step 3: Add, delete or modify content
    • 3.4 Step 4: Github PR operation
  • 4. Ardupilot Wiki structure introduction

1. Origin

Recently, in order to add some Ardupilot Wiki content, the editing and submission steps of the Wiki have been organized to facilitate subsequent work.

The modification process can be roughly divided into two categories:

  1. Page editing and modification
  2. Add, delete, and modify pages

2. Page editing

For the original link, please see: Wiki Editing – Quick Edits

2.1 Step 1: Apply for a Github account

Create a Github account if you do not have one already

Students who do not have a Github account need to apply for a Github account first.

Note: If you encounter any problems, please read the Get started with GitHub documentation carefully.

2.2 Step 2: Select the page to modify

Find the page you wish to edit and click the Edit on GitHub link on the top right of the page to be taken to its source, Select the Edit this file icon

First, on the Ardupilot Wiki, find the page that needs to be modified.
Then, find the Edit on Github link in the upper right corner of the web page and click to enter.

2.3 Step 3: Modify page content

Make the changes in the “Edit file” tab and use the “Preview changes” tab to check the change.
Note: links to other wiki pages are not rendered properly and will appear with :ref:` in front

  1. Please note that you should have a Github account to log in at this time (this is why the first step is to apply for an account. If you are not logged in, you will be prompted to log in).
  2. Click the modify button on Github to modify and edit the corresponding document content.

2.4 Step 4: Submit changes

At the bottom of the page under “Commit changes”

When there are modifications, [Commit changes] will light up, and this button can submit the modifications.

2.5 Step 5: Add PR

When taken to the “Open a pull request” screen, press the “Create pull request” button


At this time, a new branch will be added to the git library to save this change.

$ git pull
Already up to date.
daniel@palfocus:~/ArduPilot/ardupilot_wiki$ git pull
remote: Enumerating objects: 21, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 21 (delta 6), reused 10 (delta 5), pack-reused 0
Unpacking objects: 100% (21/21), 123.80 KiB | 248.00 KiB/s, done.
From github.com:lida2003/ardupilot_wiki
 * [new branch] patch-3 -> origin/patch-3
Already up to date.

$ git checkout patch-3
Branch 'patch-3' set up to track remote branch 'patch-3' from 'origin'.
Switched to a new branch 'patch-3'

$ git log -n 1
commit 98f5a52e7b38ae9a63c2cc0db1569ae169c59995 (HEAD -> patch-3, origin/patch-3)
Author: Daniel Li <[email protected]>
Date: Wed Nov 1 04:55:29 2023 + 0800

    Test and Drop

    Test and Drop



3. Add, delete, and modify pages

The main problem with this operation is that it requires adding and deleting files, which involves:

  1. Regular git library file operations
  2. Editing effect display (building web pages)

3.1 Step 1: Clone the local Ardupilot Wiki

$ git clone [email protected]:lida2003/ardupilot_wiki.git

3.2 Step 2: Build a local verification environment

For details, please refer to: Wiki Editing – Setting Up the Environment

Generally, the original Linux environment has the best compatibility. I personally do not recommend other virtual machines and the like.

Install compilation tools on ubuntu:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

$ ./Sphinxsetup.sh

The command to compile the html document is as follows:

$ cd ardupilot_wiki
$ python3 update.py (to build all wikis)
$ python3 update.py --site copter (to build just the copter wiki)
$ python3 update.py --site plane (to build just the plane wiki)
$ python3 update.py --site rover (to build just the rover wiki)
$ python3 update.py --site dev (to build just this developer wiki)

Compile and build html document location

  • For Copter look for ardupilot_wiki/copter/build/html/index.html
  • For Plane look for ardupilot_wiki/plane/build/html/index.html
  • For Rover look for ardupilot_wiki/rover/build/html/index.html
  • For Developer look for ardupilot_wiki/dev/build/html/index.html

3.3 Step 3: Add, delete or modify content

  • Notepad++ recommended
  • ssh git operation
  • samba sharing, browser confirmation result
$ git branch patch-4
$ git add .
$ git commit -m "Copter: change......"
$ git push

Notes

  • Wiki Editing Style Guide
  • Wiki Editing – Archiving and Deleting

3.4 Step 4: Github PR operation

I won’t go into details here. For details, see: Creating a pull request.

4. Ardupilot Wiki structure introduction

For details, see: Wiki Infrastructure Overview

.
|-- Dockerfile
|-- LICENSE
|-- Makefile
|-- README.md
|-- Sphinxsetup.bat
|-- Sphinxsetup.sh
|-- Vagrantfile
|-- antennatracker // ATT antenna
|-- ardupilot // official website homepage
|-- blimp // airship, balloon
|-- build_parameters.py
|-- common // Common page
|-- common_conf.py
|-- copter // multi-rotor
|-- dev // developer
|-- frontend
|-- images
|-- js
|-- logos
|-- mavproxy // mavprox
|-- plane // fixed wing
|-- planner // mission planner
|-- planner2 // APM Planner 2
|-- rover // car
|-- rst_table.py
|-- scripts
|-- update.py
`--update.sh