mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 08:40:30 +08:00
docs(i18n): PX4 guide translations (Crowdin) - ko (#28765)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
1 parent
2750a9bd27
commit
98fefd3beb
162 files changed
+2460
-1254
No files matched your search
@@ -1,6 +1,7 @@
|
||||
# PX4 콘솔/쉘
|
||||
|
||||
PX4 enables terminal access to the system through the [MAVLink Shell](../debug/mavlink_shell.md) and the [System Console](../debug/system_console.md).
|
||||
DroneCAN peripheral nodes running PX4 firmware can also be accessed through the [DroneCAN Shell](../debug/dronecan_shell.md) (it can't be used to access the flight controller).
|
||||
|
||||
이 페이지에서는 콘솔과 쉘 사용 방법과 주요 차이점을 설명합니다.
|
||||
|
||||
@@ -27,8 +28,8 @@ The `dmesg` command is now available through the shell on some boards, enabling
|
||||
For example, with `dmesg -f &` you also see the output of background tasks.
|
||||
:::
|
||||
|
||||
전용 UART에서 실행되거나, MAVLink로 실행되는 여러 셸이 있을 수 있습니다.
|
||||
Since MAVLink provides more flexibility, currently only the [MAVLink Shell](../debug/mavlink_shell.md) is used.
|
||||
There can be several shells, either running on a dedicated UART, or tunnelled over a link such as MAVLink or DroneCAN.
|
||||
Most boards use the [MAVLink Shell](../debug/mavlink_shell.md); peripheral nodes with only a CAN connection can use the [DroneCAN Shell](../debug/dronecan_shell.md) (requires firmware built with `CONFIG_UAVCANNODE_COMMAND_SHELL`).
|
||||
|
||||
The [System Console](../debug/system_console.md) is essential when the system does not boot (it displays the system boot log when power-cycling the board).
|
||||
The [MAVLink Shell](../debug/mavlink_shell.md) is much easier to setup, and so is more generally recommended for most debugging.
|
||||
@@ -37,7 +38,7 @@ The [MAVLink Shell](../debug/mavlink_shell.md) is much easier to setup, and so i
|
||||
|
||||
## 콘솔/쉘 사용
|
||||
|
||||
The MAVLink shell/console and the [System Console](../debug/system_console.md) are used in much the same way.
|
||||
The MAVLink shell, [DroneCAN Shell](../debug/dronecan_shell.md), and [System Console](../debug/system_console.md) are all used in much the same way.
|
||||
|
||||
For example, type `ls` to view the local file system, `free` to see the remaining free RAM, `dmesg` to look at boot output.
|
||||
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
# DroneCAN Shell
|
||||
|
||||
The DroneCAN Shell is a [NuttShell (NSH)](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629410) console running on a DroneCAN peripheral node (a CAN node running PX4 firmware), which you access over the CAN bus via the `uavcan.protocol.AccessCommandShell` service.
|
||||
It is intended for peripheral nodes that only have a CAN connection and no accessible serial debug port.
|
||||
|
||||
:::tip
|
||||
This gives you a shell on the peripheral node, not on the flight controller.
|
||||
To access the flight controller, use the [MAVLink Shell](../debug/mavlink_shell.md) or the [System Console](../debug/system_console.md) — see [System Console vs. Shells](../debug/consoles.md#console_vs_shell) for how they compare.
|
||||
If the node does not boot, the DroneCAN Shell is not available: use the node's [System Console](../debug/system_console.md) instead, if it has an accessible debug port.
|
||||
:::
|
||||
|
||||
## 전제 조건
|
||||
|
||||
PX4 firmware [must be built with](../hardware/porting_guide_config.md) `CONFIG_UAVCANNODE_COMMAND_SHELL` enabled.
|
||||
This option is part of the `uavcannode` driver (`CONFIG_DRIVERS_UAVCANNODE`), so it is only available in DroneCAN peripheral-node firmware (such as `ark_can-gps`), not on flight controllers.
|
||||
It is not enabled by default on any board.
|
||||
|
||||
## 쉘 열기
|
||||
|
||||
### dronecan_shell.py
|
||||
|
||||
Access the shell from a terminal using the `dronecan_shell.py` script.
|
||||
|
||||
#### Requirements
|
||||
|
||||
- A computer running Linux or macOS.
|
||||
The script uses `termios` for terminal handling, so it does not run on Windows.
|
||||
- A USB-CAN adapter that supports SLCAN, connected to the same CAN bus as the node.
|
||||
- The `dronecan` and `pyserial` Python packages:
|
||||
|
||||
```sh
|
||||
pip3 install --user dronecan pyserial
|
||||
```
|
||||
|
||||
#### 통신
|
||||
|
||||
```sh
|
||||
./Tools/dronecan_shell.py <device> [--node-id NODE_ID] [--baudrate BAUDRATE] [--bitrate BITRATE] [--allocator]
|
||||
```
|
||||
|
||||
| Argument | 기본값 | 설명 |
|
||||
| ------------- | --------- | ------------------------------------------------------------------------------------- |
|
||||
| `device` | required | Serial port of the SLCAN adapter, e.g. `/dev/ttyACM0` |
|
||||
| `--node-id` | `100` | DroneCAN node ID used by the script itself |
|
||||
| `--baudrate` | `115200` | Serial baudrate to the adapter |
|
||||
| `--bitrate` | `1000000` | CAN bus bitrate |
|
||||
| `--allocator` | disabled | Act as a dynamic node ID allocator |
|
||||
|
||||
The script listens on the bus for 5 seconds, lists the nodes it finds, and asks for the ID of the one to connect to.
|
||||
The list includes every node on the bus, such as the flight controller and ESCs, but only PX4 peripheral nodes built with `CONFIG_UAVCANNODE_COMMAND_SHELL` provide a shell.
|
||||
|
||||
If you select a node that does not provide a shell, the script prints the `node <id>: Ctrl-C interrupts, Ctrl-D goes back` banner and then nothing else.
|
||||
No `nsh>` prompt appears and no error is reported, because the node silently ignores the shell requests.
|
||||
Press **Ctrl+D** to return to the node list.
|
||||
|
||||
In the shell, **Ctrl+C** resets the shell (it starts a new NSH session rather than interrupting the running command), and **Ctrl+D** returns to the node list.
|
||||
Arrow keys, command history and tab completion are not supported (arrow keys insert stray characters such as `[A` into the line).
|
||||
|
||||
#### Scenarios
|
||||
|
||||
Flight controller connected to the bus, already allocating dynamic node IDs:
|
||||
|
||||
```sh
|
||||
./Tools/dronecan_shell.py /dev/ttyACM0
|
||||
```
|
||||
|
||||
No other allocator on the bus, so the script must allocate an ID for the target node:
|
||||
|
||||
```sh
|
||||
./Tools/dronecan_shell.py /dev/ttyACM0 --allocator
|
||||
```
|
||||
|
||||
:::warning
|
||||
Don't use `--allocator` if the flight controller or any other node is already allocating IDs on the same bus.
|
||||
Two allocators racing can assign conflicting IDs.
|
||||
:::
|
||||
|
||||
## Using the DroneCAN Shell
|
||||
|
||||
For information see: [PX4 Consoles/Shells > Using Consoles/Shells](../debug/consoles.md#using_the_console).
|
||||
|
||||
## 제한 사항
|
||||
|
||||
- Only one shell session per node: a request from another client node closes the current shell and starts a new one.
|
||||
- The output buffer is just the pipe's current buffer, not a persistent per-command output store.
|
||||
- `FLAG_CLEAR_OUTPUT_BUFFERS`, `FLAG_READ_STDERR`, `FLAG_READ_STDOUT`, `FLAG_RUNNING`, `FLAG_HAS_PENDING_STDERR` are not implemented.
|
||||
- `last_exit_status` is not reported (always 0).
|
||||
- There is no separate stderr stream: stderr is redirected to stdout.
|
||||
@@ -14,21 +14,21 @@ What differs is whether a _consumer_ applies the failure, and that depends on th
|
||||
The table lists the failure types that actually take effect per environment: `off`, `stuck`, `wrong` (`ok` is not listed, but clears an active injection on all environments).
|
||||
A `—` means the module still accepts the command, but no consumer applies it in that environment.
|
||||
|
||||
| Component | [Gazebo] (gz) | [SIH] | `simulator_mavlink` (Gazebo Classic/JMAVSim) | 하드웨어 |
|
||||
| ----------------- | ----------------------- | ----------------------- | --------------------------------------------------------------- | ----------------------- |
|
||||
| `gyro` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `accel` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `mag` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `baro` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `distance_sensor` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `gps` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` |
|
||||
| `airspeed` | `off`, `stuck`, `wrong` | — | `off`, `wrong` | — |
|
||||
| `vio` | — | — | `off` | — |
|
||||
| `battery` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` |
|
||||
| `traffic` | `off` | `off` | `off` | `off` |
|
||||
| `motor` | `off` | `off` | `off` | `off` |
|
||||
| `esc` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` |
|
||||
| `can` | — | — | — | `off` |
|
||||
| Component | [Gazebo] (gz) | [SIH] | `simulator_mavlink` (Gazebo Classic) | 하드웨어 |
|
||||
| ----------------- | ----------------------- | ----------------------- | ------------------------------------------------------- | ----------------------- |
|
||||
| `gyro` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `accel` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `mag` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `baro` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `distance_sensor` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` |
|
||||
| `gps` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` |
|
||||
| `airspeed` | `off`, `stuck`, `wrong` | — | `off`, `wrong` | — |
|
||||
| `vio` | — | — | `off` | — |
|
||||
| `battery` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` |
|
||||
| `traffic` | `off` | `off` | `off` | `off` |
|
||||
| `motor` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` |
|
||||
| `esc` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` |
|
||||
| `can` | — | — | — | `off` |
|
||||
|
||||
[SIH]: ../sim_sih/index.md
|
||||
[Gazebo]: ../sim_gazebo_gz/index.md
|
||||
@@ -39,7 +39,7 @@ A `—` means the module still accepts the command, but no consumer applies it i
|
||||
- `airspeed off | stuck | wrong` on Gazebo (Gz): only injectable when airspeed is provided by the simulated-airspeed module ([SENS_EN_ARSPDSIM](../advanced_config/parameter_reference.md#SENS_EN_ARSPDSIM)); worlds that model an airspeed sensor directly are not injected.
|
||||
- `battery wrong` reports the remaining charge just below the [SYS_FAIL_BAT_LVL](../advanced_config/parameter_reference.md#SYS_FAIL_BAT_LVL) warning threshold to trigger the battery failsafe; `off` stops publishing the battery status entirely.
|
||||
- `traffic off` suppresses incoming reports and marks the ADS-B/FLARM link unhealthy.
|
||||
- `motor off` also requires [CA_FAILURE_MODE](../advanced_config/parameter_reference.md#CA_FAILURE_MODE).
|
||||
- `motor off` and `motor wrong` are the two motor failures, and both require [CA_FAILURE_MODE](../advanced_config/parameter_reference.md#CA_FAILURE_MODE). `motor off` is the _detected_ failure: the motor is reported as failed, so the control allocator removes it from the allocation and handles the opposite motor per `CA_FAILURE_MODE`. Only a single failed motor can be recovered from, so an instance mask naming several motors has no effect. `motor wrong` is the _undetected_ failure: the output is stopped without informing the allocator, which models a failure with no feedback path (such as PWM ESCs), and any number of motors can be addressed.
|
||||
- `esc off` reports the addressed ESC as offline and blanks its telemetry; `esc wrong` keeps it online but reports implausible telemetry (voltage and current at 10% of the real value, RPM 10x). ESCs are addressed by motor instance (the ESC's actuator function), so `-i 1` targets the ESC driving motor 1.
|
||||
- On hardware, ESC injection is applied only by the UAVCAN (DroneCAN) ESC driver; the other ESC drivers (DShot, Cyphal, VOXL, TAP ESC) publish their telemetry unmodified.
|
||||
- `can off` takes the addressed CAN bus offline entirely, so every node on it stops responding; the instance selects the bus. Only applied on fmu-v6x-class hardware.
|
||||
@@ -98,7 +98,7 @@ failure <component> <failure_type> [-i <instance_number>] [-m <instance_bitmask>
|
||||
- `off`: Stop publishing
|
||||
- `stuck`: Constantly report the same value which _can_ happen on a malfunctioning sensor
|
||||
- `garbage`: Publish random noise. This looks like reading uninitialized memory
|
||||
- `wrong`: Publish invalid values that still look reasonable/aren't "garbage"
|
||||
- `wrong`: Publish invalid values that still look reasonable/aren't "garbage". For an actuator such as `motor` there is nothing to publish, so `wrong` means the motor stops without anything reporting it
|
||||
- `slow`: Publish at a reduced rate
|
||||
- `delayed`: Publish valid data with a significant delay
|
||||
- `intermittent`: Publish intermittently
|
||||
@@ -121,7 +121,7 @@ A failure can also be injected from an RC switch, without a console or telemetry
|
||||
- [SYS_FAIL_RC_MODE](../advanced_config/parameter_reference.md#SYS_FAIL_RC_MODE): the failure type (the `FAILURE_TYPE` value; e.g. `1` = off).
|
||||
- [SYS_FAIL_RC_INST](../advanced_config/parameter_reference.md#SYS_FAIL_RC_INST): the affected instances, as a bitmask (bit 0 = instance 1, e.g. `5` = instances 1 and 3; `0` = all instances).
|
||||
|
||||
While the selected aux switch is on the configured failure is injected; switching it back off clears the failure. The injection goes through the same path as the console/MAVLink commands, so for a motor it stops the motor exactly as `failure motor off` does (which also requires [CA_FAILURE_MODE](../advanced_config/parameter_reference.md#CA_FAILURE_MODE)).
|
||||
While the selected aux switch is on the configured failure is injected; switching it back off clears the failure. The injection goes through the same path as the console/MAVLink commands, so for a motor it fails the motor exactly as `failure motor off` (`SYS_FAIL_RC_MODE` = `1`) or `failure motor wrong` (`SYS_FAIL_RC_MODE` = `4`) does, with the same [CA_FAILURE_MODE](../advanced_config/parameter_reference.md#CA_FAILURE_MODE) requirement. A `SYS_FAIL_RC_INST` mask addressing several motors only takes effect for `wrong`, the undetected failure.
|
||||
|
||||
## MAVSDK 실패 플러그인
|
||||
|
||||
@@ -147,16 +147,25 @@ To test the GPS failsafe by stopping GPS:
|
||||
|
||||
## Example: Motor
|
||||
|
||||
To stop a motor mid-flight without the system anticipating it or excluding it from allocation effectiveness:
|
||||
To fail a motor mid-flight:
|
||||
|
||||
1. Enable the [SYS_FAILURE_EN](../advanced_config/parameter_reference.md#SYS_FAILURE_EN) parameter.
|
||||
2. Enable [CA_FAILURE_MODE](../advanced_config/parameter_reference.md#CA_FAILURE_MODE) parameter to allow turning off motors.
|
||||
3. Enter the following commands on the MAVLink console or SITL _pxh shell_:
|
||||
3. Pick the failure type for the behavior you want to test:
|
||||
- `off` — detected: the motor is flagged as failed and removed from control allocation, so the allocator compensates using the remaining motors (per `CA_FAILURE_MODE`).
|
||||
Only one failed motor can be recovered from, so an instance mask naming several motors has no effect.
|
||||
- `wrong` — undetected: the motor output is stopped without notifying the allocator, so its effectiveness is not excluded.
|
||||
This models a failure with no feedback path, such as PWM ESCs.
|
||||
Any number of motors can be addressed.
|
||||
4. Enter the following commands on the MAVLink console or SITL _pxh shell_:
|
||||
|
||||
```sh
|
||||
# Turn off first motor
|
||||
# Detected failure: motor 1 is reported as failed and removed from the allocation
|
||||
failure motor off -i 1
|
||||
|
||||
# Undetected failure: motor 1 stops, the allocator is not informed
|
||||
failure motor wrong -i 1
|
||||
|
||||
# Turn it back on
|
||||
failure motor ok -i 1
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ Clang 주소 새니타이저는 정렬(버스) 오류 및 분할 오류와 같
|
||||
|
||||
```sh
|
||||
make clean # only required on first address sanitizer run after a normal build
|
||||
PX4_ASAN=1 make px4_sitl jmavsim
|
||||
PX4_ASAN=1 make px4_sitl_sih sihsim_quadx
|
||||
```
|
||||
|
||||
## Valgrind
|
||||
@@ -26,7 +26,7 @@ sudo apt-get install valgrind
|
||||
SITL 시뮬레이션 중에 valgrind를 사용하려면:
|
||||
|
||||
```sh
|
||||
make px4_sitl_default jmavsim___valgrind
|
||||
make px4_sitl_default gazebo-classic___valgrind
|
||||
```
|
||||
|
||||
## Launch Gazebo Classic SITL Without Debugger
|
||||
@@ -36,7 +36,7 @@ By default SITL is launched without a debugger attached when using any simulator
|
||||
```sh
|
||||
make px4_sitl_default gz
|
||||
make px4_sitl_default gazebo-classic
|
||||
make px4_sitl_default jmavsim
|
||||
make px4_sitl_sih sihsim_quadx
|
||||
```
|
||||
|
||||
For Gazebo Classic (only) you can also start the simulator with a debugger attached.
|
||||
|
||||
@@ -48,7 +48,7 @@ For an example, see [SensorCombined.msg](https://github.com/PX4/PX4-Autopilot/bl
|
||||
So, for replaying `ekf2`, the rules file should look like this:
|
||||
|
||||
```sh
|
||||
restrict_topics: sensor_combined, vehicle_gps_position, vehicle_land_detected
|
||||
restrict_topics: sensor_combined, vehicle_gnss, vehicle_land_detected
|
||||
module: replay
|
||||
ignore_others: true
|
||||
```
|
||||
@@ -63,7 +63,7 @@ For an example, see [SensorCombined.msg](https://github.com/PX4/PX4-Autopilot/bl
|
||||
- 재생
|
||||
|
||||
```sh
|
||||
make px4_sitl_default jmavsim
|
||||
make px4_sitl_default none_iris
|
||||
```
|
||||
|
||||
This will automatically open the log file, apply the parameters and start the replay.
|
||||
|
||||
Reference in new issue
Block a user