Skip to content

Commit

Permalink
mkdocs添加了中英文的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
ComerLater committed Apr 2, 2024
1 parent 4fa755e commit f53a8d5
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 69 deletions.
Empty file added docs/README.en.md
Empty file.
16 changes: 8 additions & 8 deletions docs/manual/01.快速入门/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Getting Started with PX4 Autopilot
# Getting Started with Nextpilot

This section provides an overview of the basic concepts you need to understand in order to build and fly an unmanned vehicle using PX4.
This section provides an overview of the basic concepts you need to understand in order to build and fly an unmanned vehicle using Nextpilot.

[Basic Concepts](../getting_started/px4_basic_concepts.md) — Brief introduction to PX4 and the Dronecode Platform.
[Basic Concepts](./basic_concepts.md) — Brief introduction to Nextpilot and the Dronecode Platform.

[Flight Controllers](../getting_started/flight_controller_selection.md) — Flight controller hardware options from different platforms and vendors.
[Flight Controllers](./flight_controller_selection.md) — Flight controller hardware options from different platforms and vendors.

[Vehicles/Frames](../getting_started/frame_selection.md) — Supported vehicle types, including air, ground and marine frames.
[Vehicles/Frames](./frame_selection.md) — Supported vehicle types, including air, ground and marine frames.

[Sensors](../getting_started/sensor_selection.md) — Sensors needed by the autopilot.
[Sensors](./sensor_selection.md) — Sensors needed by the autopilot.

[Radio Control Systems](../getting_started/rc_transmitter_receiver.md) — Handheld systems for manually controlling a vehicle.
<!-- [Radio Control Systems](../getting_started/rc_transmitter_receiver.md) — Handheld systems for manually controlling a vehicle.
[Payloads & Cameras](../payloads/README.md)
[Flight Reporting](../getting_started/flight_reporting.md) — Download detailed flight logs for debugging and analysis.
[Flight Reporting](../getting_started/flight_reporting.md) — Download detailed flight logs for debugging and analysis. -->
58 changes: 25 additions & 33 deletions docs/manual/01.快速入门/basic_concepts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 基本概念

This topic provides a basic introduction to drones and using PX4 (it is meant mostly for novice users but is also a good introduction for experienced users).
This topic provides a basic introduction to drones and using Nextpilot (it is meant mostly for novice users but is also a good introduction for experienced users).

If you are already familiar with the basic concepts, you can move on to [Basic Assembly](../assembly/README.md) to learn how to wire your specific autopilot hardware.
To load firmware and set up the vehicle with _QGroundControl_, see [Basic Configuration](../config/README.md).
Expand Down Expand Up @@ -47,14 +47,14 @@ Download and install it from [here](http://qgroundcontrol.com/downloads/).

## Flight Controller Board

PX4 was initially designed to run on [Pixhawk Series](../flight_controller/pixhawk_series.md) controllers, but can now run on Linux computers and other hardware.
Nextpilot was initially designed to run on [Pixhawk Series](../flight_controller/pixhawk_series.md) controllers, but can now run on Linux computers and other hardware.
You should select a board that suits the physical constraints of your vehicle, the activities you wish to perform, and of course cost.

For more information see: [Flight Controller Selection](flight_controller_selection.md).

## Sensors

PX4 uses sensors to determine vehicle state (needed for stabilization and to enable autonomous control).
Nextpilot uses sensors to determine vehicle state (needed for stabilization and to enable autonomous control).
The system _minimally requires_ a gyroscope, accelerometer, magnetometer (compass) and barometer.
A GPS or other positioning system is needed to enable all automatic flight modes and some manual modes.
Fixed-wing and VTOL-vehicles should additionally include an airspeed sensor (very highly recommended).
Expand All @@ -65,7 +65,7 @@ For more information see:

## Outputs: Motors, Servos, Actuators

PX4 uses _outputs_ to control: motor speed (e.g. via [ESC](#escs-motors)), flight surfaces like ailerons and flaps, camera triggers, parachutes, grippers, and many other types of payloads.
Nextpilot uses _outputs_ to control: motor speed (e.g. via [ESC](#escs-motors)), flight surfaces like ailerons and flaps, camera triggers, parachutes, grippers, and many other types of payloads.

The outputs may be PWM ports or DroneCAN nodes (e.g. DroneCAN [motor controllers](../dronecan/escs.md)).
The images below show the PWM output ports for [Pixhawk 4](../flight_controller/pixhawk4.md) and [Pixhawk 4 mini](../flight_controller/pixhawk4_mini.md).
Expand All @@ -75,10 +75,9 @@ The images below show the PWM output ports for [Pixhawk 4](../flight_controller/
The outputs are divided into `MAIN` and `AUX` outputs, and individually numbered (i.e. `MAINn` and `AUXn`, where `n` is 1 to usually 6 or 8).
They might also be marked as `IO PWM Out` and `FMU PWM OUT` (or similar).

:::warning
A flight controller may only have `MAIN` PWM outputs (like the _Pixhawk 4 Mini_), or may have only 6 outputs on either `MAIN` or `AUX`.
Ensure that you select a controller that has enough ports/outputs for your [airframe](../airframes/airframe_reference.md).
:::
!!! warning
A flight controller may only have `MAIN` PWM outputs (like the _Pixhawk 4 Mini_), or may have only 6 outputs on either `MAIN` or `AUX`.
Ensure that you select a controller that has enough ports/outputs for your [airframe](../airframes/airframe_reference.md).

You can connect almost any output to any motor or other actuator, by assigning the associated function ("Motor 1") to the desired output ("AUX1") in QGroundControl: [Actuator Configuration and Testing](../config/actuators.md).
Note that the functions (motor and control surface actuator positions) for each frame are given in the [Airframe Reference](../airframes/airframe_reference.md).
Expand Down Expand Up @@ -126,9 +125,8 @@ They can be used for most manual flight use cases such as taking off, surveys, a
Joysticks are often used in integrated GCS/manual control systems because it is cheaper and easier to integrate a joystick than a separate radio system, and for the majority of use cases, the lower latency does not matter.
They are also perfect for flying the PX4 simulator, because you can plug them directly into your ground control computer.

:::note
PX4 does not _require_ a manual control system for autonomous flight modes.
:::
!!! note
PX4 does not _require_ a manual control system for autonomous flight modes.

## Safety Switch

Expand Down Expand Up @@ -162,10 +160,9 @@ PX4 uses SD memory cards for storing [flight logs](../getting_started/flight_rep

By default, if no SD card is present PX4 will play the [format failed (2-beep)](../getting_started/tunes.md#format-failed) tune twice during boot (and none of the above features will be available).

::: tip
The maximum supported SD card size on Pixhawk boards is 32GB.
The _SanDisk Extreme U3 32GB_ and _Samsung EVO Plus 32_ are [highly recommended](../dev_log/logging.md#sd-cards).
:::
!!! tip
The maximum supported SD card size on Pixhawk boards is 32GB.
The _SanDisk Extreme U3 32GB_ and _Samsung EVO Plus 32_ are [highly recommended](../dev_log/logging.md#sd-cards).

SD cards are never-the-less optional.
Flight controllers that do not include an SD Card slot may:
Expand All @@ -191,9 +188,8 @@ For more information see:
A vehicle is said to be _armed_ when all motors and actuators are powered, and _disarmed_ when nothing is powered.
There is also a _prearmed_ state when only actuators are powered.

:::warning
Armed vehicles can be dangerous as propellors will be spinning.
:::
!!! warning
Armed vehicles can be dangerous as propellors will be spinning.

Arming is triggered by default (on Mode 2 transmitters) by holding the RC throttle/yaw stick on the _bottom right_ for one second (to disarm, hold stick on bottom left).
It is alternatively possible to configure PX4 to arm using an RC switch or button (and arming MAVLink commands can also be sent from a ground station).
Expand All @@ -211,11 +207,10 @@ By default, vehicles are:
When prearmed you can still use actuators, while disarming unpowers everything.
Prearmed and disarmed should both be safe, and a particular vehicle may support either or both.

:::tip
Sometimes a vehicle will not arm for reasons that are not obvious.
QGC v4.2.0 (Daily build at time of writing) and later provide an arming check report in [Fly View > Arming and Preflight Checks](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/fly_view/fly_view.html#arm).
From PX4 v1.14 this provides comprehensive information about arming problems along with possible solutions.
:::
!!! tip
Sometimes a vehicle will not arm for reasons that are not obvious.
QGC v4.2.0 (Daily build at time of writing) and later provide an arming check report in [Fly View > Arming and Preflight Checks](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/fly_view/fly_view.html#arm).
From PX4 v1.14 this provides comprehensive information about arming problems along with possible solutions.

A detailed overview of arming and disarming configuration can be found here: [Prearm, Arm, Disarm Configuration](../advanced_config/prearm_arm_disarm.md).

Expand All @@ -230,9 +225,8 @@ _Manual modes_ are controlled by the user (via the RC control sticks/joystick) w
Different manual modes enable different flight characteristics - for example, some modes enable acrobatic tricks,
while others are impossible to flip and will hold position/course against wind.

:::tip
Not all flight modes are available on all vehicle types, and some modes can only be used when specific conditions have been met (e.g. many modes require a global position estimate).
:::
!!! tip
Not all flight modes are available on all vehicle types, and some modes can only be used when specific conditions have been met (e.g. many modes require a global position estimate).

An overview of the available flight modes for each vehicle can be found below:

Expand All @@ -248,10 +242,9 @@ Instructions for how to set up your remote control switches to enable different
PX4 has configurable failsafe systems to protect and recover your vehicle if something goes wrong!
These allow you to specify areas and conditions under which you can safely fly, and the action that will be performed if a failsafe is triggered (for example, landing, holding position, or returning to a specified point).

:::note
You can only specify the action for the _first_ failsafe event.
Once a failsafe occurs the system will enter special handling code, such that subsequent failsafe triggers are managed by separate system level and vehicle specific code.
:::
!!! note
You can only specify the action for the _first_ failsafe event.
Once a failsafe occurs the system will enter special handling code, such that subsequent failsafe triggers are managed by separate system level and vehicle specific code.

The main failsafe areas are listed below:

Expand All @@ -272,9 +265,8 @@ All the vehicles, boats and aircraft have a heading direction or an orientation

![Frame Heading](../../assets/concepts/frame_heading.png)

:::note
For a VTOL Tailsitter the heading is relative to the multirotor configuration (i.e. vehicle pose during takeoff, hovering, landing).
:::
!!! note
For a VTOL Tailsitter the heading is relative to the multirotor configuration (i.e. vehicle pose during takeoff, hovering, landing).

It is important to know the vehicle heading direction in order to align the autopilot with the vehicle vector of movement.
Multicopters have a heading even when they are symmetrical from all sides!
Expand Down
16 changes: 8 additions & 8 deletions docs/manual/01.快速入门/flight_controller_selection.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# 支持的硬件

Flight controllers are the "brains" of an unmanned vehicle.
PX4 can run on [many flight controller boards](../flight_controller/README.md).
Nextpilot can run on [many flight controller boards](../flight_controller/README.md).

You should select a board that suits the physical constraints of your vehicle, the activities you wish to perform, and of course cost.

<img src="../../assets/flight_controller/pixhawk6x/pixhawk6x_hero_upright.png" width="130px" title="Holybro Pixhawk6X"> <img src="../../assets/flight_controller/cuav_pixhawk_v6x/pixhawk_v6x.jpg" width="230px" title="CUAV Pixhawk 6X" > <img src="../../assets/flight_controller/cube/orange/cube_orange_hero.jpg" width="300px" title="CubePilot Cube Orange" />

## Pixhawk Series

[Pixhawk Series](../flight_controller/pixhawk_series.md) open-hardware flight controllers run PX4 on NuttX OS.
[Pixhawk Series](../flight_controller/pixhawk_series.md) open-hardware flight controllers run Nextpilot on RT-Thread OS.
With many form factors, there are versions targeted towards many use cases and market segments.

[Pixhawk Standard Autopilots](../flight_controller/autopilot_pixhawk_standard.md) are used as the PX4 reference platform.
They are supported and tested by the PX4 development team, and are highly recommended.
[Pixhawk Standard Autopilots](../flight_controller/autopilot_pixhawk_standard.md) are used as the Nextpilot reference platform.
They are supported and tested by the Nextpilot development team, and are highly recommended.

## Manufacturer-supported Controllers

Expand All @@ -26,15 +26,15 @@ Note that manufacturer-supported controllers can be just as "good" (or better) t

Dedicated flight controllers like Pixhawk are not usually well-suited for general purpose computing or running computationally intensive tasks.
For more computing power, the most common approach is to run those applications on a separate onboard [Companion Computer](../companion_computer/README.md).
Some companion computers can also run PX4 on a separate DSP, as part of the same autopilot board.
Some companion computers can also run Nextpilot on a separate DSP, as part of the same autopilot board.

Similarly, PX4 can also run natively Raspberry Pi (this approach is not generally considered as "robust" as having a separate companion or using a dedicated DSP):
Similarly, Nextpilot can also run natively Raspberry Pi (this approach is not generally considered as "robust" as having a separate companion or using a dedicated DSP):

- [Raspberry Pi 2/3 Navio2](../flight_controller/raspberry_pi_navio2.md)
- [Raspberry Pi 2/3/4 PilotPi Shield](../flight_controller/raspberry_pi_pilotpi.md)

## Commercial UAVs that can run PX4
## Commercial UAVs that can run Nextpilot

PX4 is available on many popular commercial drone products, including some that ship with PX4 and others that can be updated with PX4 (allowing you to add mission planning and other PX4 Flight modes to your vehicle).
Nextpilot is available on many popular commercial drone products, including some that ship with Nextpilot and others that can be updated with Nextpilot (allowing you to add mission planning and other Nextpilot Flight modes to your vehicle).

For more information see [Complete Vehicles](../complete_vehicles/README.md).
4 changes: 4 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mkdocs-material
mkdocs-autorefs
mkdocs-static-i18n
mkdocstrings
63 changes: 43 additions & 20 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,38 +68,56 @@ markdown_extensions:
separator: "_"
- attr_list
- def_list
- md_in_html
- tables
- admonition
- pymdownx.tabbed:
alternate_style: true
- pymdownx.highlight:
use_pygments: false
anchor_linenums: true
- pymdownx.arithmatex:
generic: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.details
- pymdownx.superfences
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
# - mdx_gh_links:
# user: mkdocs
# repo: mkdocs
# - mkdocs-click
# - callouts

# - mdx_gh_links:
# user: mkdocs
# repo: mkdocs
# - mkdocs-click

# - callouts

plugins:
- search
# - autorefs
# - literate-nav:
# nav_file: README.md
# implicit_index: true
# - mkdocstrings:
# handlers:
# python:
# options:
# docstring_section_style: list
# members_order: source
# show_root_heading: true
# show_source: false
# show_signature_annotations: true
- autorefs
# - literate-nav:
# nav_file: README.md
# implicit_index: true
# - mkdocstrings:
# handlers:
# python:
# options:
# docstring_section_style: list
# members_order: source
# show_root_heading: true
# show_source: false
# show_signature_annotations: true
- i18n:
docs_structure: suffix
languages:
- locale: en
name: English
build: true
- locale: zh
name: 简体中文
default: true
build: true

extra:
version:
Expand All @@ -115,3 +133,8 @@ extra:
- name: 简体中文
link: /zh/
lang: zh

extra_javascript:
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

0 comments on commit f53a8d5

Please sign in to comment.