当前位置:   article > 正文

Ardupilot开源飞控之Wiki修改操作_ardupilot wiki是什么

ardupilot wiki是什么

1. 源由

最近为了为了增加一些Ardupilot Wiki内容,对Wiki的编辑提交步骤整理一下,以便后续工作的展开。

修改过程大致可以分为两大类:

  1. 页面编辑修改
  2. 增删页面修改

2. 页面编辑修改

原文链接详见:Wiki Editing - Quick Edits

2.1 Step 1: 申请Github账号

Create a Github account if you do not have one already

没有Github账号的同学,需要首先申请Github账号

注:如果遇到任何问题,请仔细阅读帮助文档Get started with GitHub documentation

2.2 Step 2: 选择修改页面

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

首先,在Ardupilot Wiki上,找到需要修改的页面。
然后,在网页右上方找到Edit on Github链接,点击进入。

在这里插入图片描述

2.3 Step 3: 修改页面内容

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. 请注意,此时应该有Github账号登录(这也就是为什么第一步是申请账号,如果没有登录会提示登录)。
  2. 点击Github上的修改按钮,进行相应文档内容的修改和编辑。
    在这里插入图片描述

2.4 Step 4: 提交修改

At the bottom of the page under “Commit changes”

当有修改变动后,【Commit changes】会变亮,此按钮可以提交修改。

在这里插入图片描述在这里插入图片描述

2.5 Step 5: 新增PR

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

在这里插入图片描述
此时,git库上,会新增一个分支来保存这个改动。

$ 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 <lida_mail@163.com>
Date:   Wed Nov 1 04:55:29 2023 +0800

    Test and Drop

    Test and Drop



  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27

3. 增删页面修改

这个操作主要问题在于需要动到文件的增加和删除,此时涉及:

  1. 常规的git库文件操作
  2. 编辑效果展示(构建web页面)

3.1 Step 1: 克隆本地的Ardupilot Wiki

$ git clone git@github.com:lida2003/ardupilot_wiki.git
  • 1

3.2 Step 2: 搭建本地验证环境

详细可以参考:Wiki Editing - Setting Up the Environment

一般Linux原生态环境是兼容性最好的,其他虚拟机之类,个人并不推荐。

在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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

编译html文档命令如下:

$ 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)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

编译构建html文档位置

  • 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: 增删改内容

  • Notepad++ 推荐使用
  • ssh git操作
  • samba共享,浏览器确认结果
$ git branch patch-4
$ git add .
$ git commit -m "Copter: change......"
$ git push
  • 1
  • 2
  • 3
  • 4

注意事项

3.4 Step 4: Github PR操作

略,不再赘述,详见:Creating a pull request

4. Ardupilot Wiki结构介绍

详见:Wiki Infrastructure Overview

.
|-- Dockerfile
|-- LICENSE
|-- Makefile
|-- README.md
|-- Sphinxsetup.bat
|-- Sphinxsetup.sh
|-- Vagrantfile
|-- antennatracker   // ATT天线
|-- ardupilot  // 官网主页
|-- blimp // 飞艇,气球
|-- build_parameters.py
|-- common // 通用页面
|-- common_conf.py
|-- copter // 多旋翼
|-- dev // 开发者
|-- frontend
|-- images
|-- js
|-- logos
|-- mavproxy // mavprox
|-- plane // 固定翼
|-- planner // mission planner
|-- planner2 // APM Planner 2
|-- rover // 车
|-- rst_table.py
|-- scripts
|-- update.py
`-- update.sh

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

5. 附录

A) 国内的环境有的时候是比较复杂的,因此,会给技术研发带来各种困难。真的对技术发展很不友好!

==> Build wiki failed, some kind of connection issue? #5743

B) 需要确认下是否安装python3-sphinxSphinxsetup.sh脚本似乎并未将spinx安装成功。

$ sudo apt-get install python3-sphinx
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/967579
推荐阅读
相关标签
  

闽ICP备14008679号