mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-03-26 17:02:20 +08:00
New Crowdin translations - uk
This commit is contained in:
committed by
Hamish Willee
parent
359d58effd
commit
71e553c67e
@@ -733,6 +733,7 @@
|
||||
- [Protocols/Microservices](mavlink/protocols.md)
|
||||
- [Standard Modes Protocol](mavlink/standard_modes.md)
|
||||
- [uXRCE-DDS (PX4-ROS 2/DDS Bridge)](middleware/uxrce_dds.md)
|
||||
- [UORB Bridged to ROS 2](middleware/dds_topics.md)
|
||||
- [Модулі & Команди](modules/modules_main.md)
|
||||
- [Автоматичне підлаштування](modules/modules_autotune.md)
|
||||
- [Команди](modules/modules_command.md)
|
||||
|
||||
@@ -128,21 +128,21 @@ You add some "boilerplate" code to regularly listen for changes in the [uORB Top
|
||||
|
||||
- **px4_platform_common/module_params.h** для отримання макросу `DEFINE_PARAMETERS`:
|
||||
|
||||
```cpp
|
||||
#include <px4_platform_common/module_params.h>
|
||||
```
|
||||
```cpp
|
||||
#include <px4_platform_common/module_params.h>
|
||||
```
|
||||
|
||||
- **parameter_update.h** для доступу до повідомлень uORB `parameter_update`:
|
||||
|
||||
```cpp
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
```
|
||||
```cpp
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
```
|
||||
|
||||
- **Subscription.hpp** для uORB C++ API підписки:
|
||||
|
||||
```cpp
|
||||
#include <uORB/Subscription.hpp>
|
||||
```
|
||||
```cpp
|
||||
#include <uORB/Subscription.hpp>
|
||||
```
|
||||
|
||||
Derive your class from `ModuleParams`, and use `DEFINE_PARAMETERS` to specify a list of parameters and their associated parameter attributes.
|
||||
Назви параметрів мають збігатися з визначеннями метаданих параметрів.
|
||||
@@ -194,7 +194,7 @@ void Module::parameters_update()
|
||||
- `_param_update_sub.updated()` повідомляє нам, чи є _будь-яке_ оновлення в uORB-повідомленні `param_update` (але не вказує, який саме параметр змінено).
|
||||
- Якщо було оновлено "деякий" параметр, ми копіюємо оновлення у `parameter_update_s` (`param_update`), щоб очистити очікуване оновлення.
|
||||
- Then we call `ModuleParams::updateParams()`.
|
||||
This "under the hood" updates all parameter attributes listed in our `DEFINE_PARAMETERS` list.
|
||||
This "under the hood" updates all parameter attributes listed in our `DEFINE_PARAMETERS` list.
|
||||
|
||||
Атрибути параметрів (`_sys_autostart` і `_att_bias_max` у цьому випадку) можна використовувати для відображення параметрів, і вони будуть оновлюватися щоразу, коли значення параметра змінюватиметься.
|
||||
|
||||
@@ -267,12 +267,12 @@ YAML meta data is intended as a full replacement for the **.c** definitions.
|
||||
- Приклад використання визначень YAML можна знайти у визначенні параметрів MAVLink: [/src/modules/mavlink/module.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/mavlink/module.yaml).
|
||||
- YAML-файл реєструється у системі збірки cmake шляхом додавання
|
||||
|
||||
```cmake
|
||||
MODULE_CONFIG
|
||||
module.yaml
|
||||
```
|
||||
```cmake
|
||||
MODULE_CONFIG
|
||||
module.yaml
|
||||
```
|
||||
|
||||
до секції `px4_add_module` файлу `CMakeLists.txt` цього модуля.
|
||||
до секції `px4_add_module` файлу `CMakeLists.txt` цього модуля.
|
||||
|
||||
#### Мета-дані YAML з багатьма екземплярами (шаблонами)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ This guide walks through the process of setting up the board and connecting to P
|
||||
You will temporarily need the following hardware in order to log into your Jetson and get its IP address, after which you will be able to log in via SSH:
|
||||
|
||||
- External display.
|
||||
If your display doesn't have a mini HDMI connector you will also need a [Mini HDMI to HDMI converter](https://a.co/d/6N815N9) if your external display has HDMI input
|
||||
If your display doesn't have a mini HDMI connector you will also need a [Mini HDMI to HDMI converter](https://a.co/d/6N815N9) if your external display has HDMI input
|
||||
- Ethernet cable
|
||||
- Mouse and keyboard (the baseboard has 4 USB ports exposed from Jetson, two of which are USB 3.0)
|
||||
|
||||
@@ -45,11 +45,11 @@ This information comes from the [Holybro Pixhawk-Jetson Baseboard Documentation]
|
||||
|
||||
- Розміри
|
||||
|
||||
- 126 x 80 x 45mm (with Jetson Orin NX + Heatsink/Fan & FC Module)
|
||||
- 126 x 80 x 22.9mm (without Jetson and FC Module)
|
||||
- 126 x 80 x 45mm (with Jetson Orin NX + Heatsink/Fan & FC Module)
|
||||
- 126 x 80 x 22.9mm (without Jetson and FC Module)
|
||||
|
||||
- Вага
|
||||
- 190g (with Jetson, Heatsink, Flight Controller, M.2 SSD, M.2 Wi-Fi Module)
|
||||
- 190g (with Jetson, Heatsink, Flight Controller, M.2 SSD, M.2 Wi-Fi Module)
|
||||
|
||||
:::
|
||||
|
||||
@@ -57,67 +57,67 @@ This information comes from the [Holybro Pixhawk-Jetson Baseboard Documentation]
|
||||
|
||||
- 2x Gigabit Ethernet Port
|
||||
|
||||
- Connected to both Jetson & Autopilot via Ethernet switch (RTL8367S)
|
||||
- Ethernet Switch powered by the same circuit as the Pixhawk
|
||||
- 8-pin JST-GH
|
||||
- RJ45
|
||||
- Connected to both Jetson & Autopilot via Ethernet switch (RTL8367S)
|
||||
- Ethernet Switch powered by the same circuit as the Pixhawk
|
||||
- 8-pin JST-GH
|
||||
- RJ45
|
||||
|
||||
- 2x MIPI CSI Camera Inputs
|
||||
|
||||
- 4 Lanes each
|
||||
- 22-Pin Raspberry Pi Cam FFC
|
||||
- 4 Lanes each
|
||||
- 22-Pin Raspberry Pi Cam FFC
|
||||
|
||||
- 2x USB 3.0 Host Port
|
||||
|
||||
- USB A
|
||||
- 5A Current Limit
|
||||
- USB A
|
||||
- 5A Current Limit
|
||||
|
||||
- 2x USB 2.0 Host Port
|
||||
|
||||
- 5-Pin JST-GH
|
||||
- 0A Current Limit
|
||||
- 5-Pin JST-GH
|
||||
- 0A Current Limit
|
||||
|
||||
- USB 2.0 for Programming/Debugging
|
||||
|
||||
- USB-C
|
||||
- USB-C
|
||||
|
||||
- 2 Key M 2242/2280 for NVMe SSD
|
||||
|
||||
- PCIEx4
|
||||
- PCIEx4
|
||||
|
||||
- 2 Key E 2230 for WiFi/BT
|
||||
|
||||
- PCIEx2
|
||||
- USB
|
||||
- UART
|
||||
- I2S
|
||||
- PCIEx2
|
||||
- USB
|
||||
- UART
|
||||
- I2S
|
||||
|
||||
- Mini HDMI Out
|
||||
|
||||
- 4x GPIO
|
||||
|
||||
- 6-pin JST-GH
|
||||
- 6-pin JST-GH
|
||||
|
||||
- CAN Port
|
||||
|
||||
- Connected to Autopilot's CAN2 (4 Pin JST-GH)
|
||||
- Connected to Autopilot's CAN2 (4 Pin JST-GH)
|
||||
|
||||
- SPI порт
|
||||
|
||||
- 7-Pin JST-GH
|
||||
- 7-Pin JST-GH
|
||||
|
||||
- I2C порт
|
||||
|
||||
- 4-Pin JST-GH
|
||||
- 4-Pin JST-GH
|
||||
|
||||
- I2S Port
|
||||
|
||||
- 7-Pin JST-GH
|
||||
- 7-Pin JST-GH
|
||||
|
||||
- 2x UART Port
|
||||
|
||||
- 1 for debug
|
||||
- 1 connected to Autopilot's telem2
|
||||
- 1 for debug
|
||||
- 1 connected to Autopilot's telem2
|
||||
|
||||
- Fan Power Port
|
||||
|
||||
@@ -129,13 +129,13 @@ This information comes from the [Holybro Pixhawk-Jetson Baseboard Documentation]
|
||||
|
||||
- Pixhawk Autopilot Bus Interface
|
||||
|
||||
- 100 Pin Hirose DF40
|
||||
- 50 Pin Hirose DF40
|
||||
- 100 Pin Hirose DF40
|
||||
- 50 Pin Hirose DF40
|
||||
|
||||
- Redundant Digital Power Module Inputs
|
||||
|
||||
- I2C Power Monitor Support
|
||||
- 2x 6-Pin Molex CLIK-Mate
|
||||
- I2C Power Monitor Support
|
||||
- 2x 6-Pin Molex CLIK-Mate
|
||||
|
||||
- Power Path Selector
|
||||
|
||||
@@ -143,68 +143,68 @@ This information comes from the [Holybro Pixhawk-Jetson Baseboard Documentation]
|
||||
|
||||
- Номінальна напруга
|
||||
|
||||
- Максимальна вхідна напруга: 6 В
|
||||
- Вхід USB Power: 4.75~5.25V
|
||||
- Максимальна вхідна напруга: 6 В
|
||||
- Вхід USB Power: 4.75~5.25V
|
||||
|
||||
- Повноцінний порт перемикача безпеки GPS Plus
|
||||
|
||||
- 10-Pin JST-GH
|
||||
- 10-Pin JST-GH
|
||||
|
||||
- Secondary (GPS2) Port
|
||||
|
||||
- 6-Pin JST-GH
|
||||
- 6-Pin JST-GH
|
||||
|
||||
- 2x CAN Ports
|
||||
|
||||
- 4-Pin JST-GH
|
||||
- 4-Pin JST-GH
|
||||
|
||||
- 3x Telemetry Ports with Flow Control
|
||||
|
||||
- 2x 6-Pin JST-GH
|
||||
- 1 is connected to Jetson's `UART1` Port
|
||||
- 2x 6-Pin JST-GH
|
||||
- 1 is connected to Jetson's `UART1` Port
|
||||
|
||||
- 16 PWM Outputs
|
||||
|
||||
- 2x 10-Pin JST-GH
|
||||
- 2x 10-Pin JST-GH
|
||||
|
||||
- UART4 & I2C Port
|
||||
|
||||
- 6-Pin JST-GH
|
||||
- 6-Pin JST-GH
|
||||
|
||||
- 2x Gigabit Ethernet Port
|
||||
|
||||
- Connected to both Jetson & Autopilot via Ethernet switch (RTL8367S)
|
||||
- 8-Pin JST-GH
|
||||
- RJ45
|
||||
- Connected to both Jetson & Autopilot via Ethernet switch (RTL8367S)
|
||||
- 8-Pin JST-GH
|
||||
- RJ45
|
||||
|
||||
- AD & IO
|
||||
|
||||
- 8-Pin JST-GH
|
||||
- 8-Pin JST-GH
|
||||
|
||||
- USB 2.0
|
||||
|
||||
- USB-C
|
||||
- 4-Pin JST-GH
|
||||
- USB-C
|
||||
- 4-Pin JST-GH
|
||||
|
||||
- DSM Input
|
||||
|
||||
- 3-Pin JST-ZH 1.5mm Pitch
|
||||
- 3-Pin JST-ZH 1.5mm Pitch
|
||||
|
||||
- RC In
|
||||
|
||||
- PPM/SBUS
|
||||
- 5-Pin JST-GH
|
||||
- PPM/SBUS
|
||||
- 5-Pin JST-GH
|
||||
|
||||
- SPI порт
|
||||
|
||||
- External Sensor Bus (SPI5)
|
||||
- 11-Pin JST-GH
|
||||
- External Sensor Bus (SPI5)
|
||||
- 11-Pin JST-GH
|
||||
|
||||
- 2x Debug Port
|
||||
|
||||
- 1 for FMU
|
||||
- 1 for IO
|
||||
- 10-Pin JST-SH
|
||||
- 1 for FMU
|
||||
- 1 for IO
|
||||
- 10-Pin JST-SH
|
||||
|
||||
:::
|
||||
|
||||
@@ -218,7 +218,7 @@ The Jetson has separate input power circuitry from the Pixhawk autopilot:
|
||||
- 8V/3A Minimum (Depends on Usage and Peripherals)
|
||||
- Voltage Rating: 7-21V (3S-4S)
|
||||
- Jetson Baseboard onboard BEC is rated for 7-21V (3S-4S).
|
||||
Note that the external UBEC-12A can be used for applications above 4S
|
||||
Note that the external UBEC-12A can be used for applications above 4S
|
||||
|
||||
During development using the following wired power supply is recommended:
|
||||
|
||||
@@ -698,7 +698,7 @@ On the following screen, confirm your selected device:
|
||||
|
||||
- Choose `Pre-config` for the OEM Configuration (this will skip Ubuntu first time setup screens after reboot).
|
||||
- Choose your preferred username and password (and write them down).
|
||||
These will be used as your login credentials to Jetpack.
|
||||
These will be used as your login credentials to Jetpack.
|
||||
- Choose `NVMe` as the storage device because the board has separate SSD for storage.
|
||||
|
||||

|
||||
@@ -922,95 +922,95 @@ These instructions approximately mirror the [PX4 Ethernet setup](../advanced_con
|
||||
Next we modify the Jetson IP address to be on the same network as the Pixhawk:
|
||||
|
||||
1. Make sure `netplan` is installed.
|
||||
You can check by running the following command:
|
||||
You can check by running the following command:
|
||||
|
||||
```sh
|
||||
netplan -h
|
||||
```
|
||||
```sh
|
||||
netplan -h
|
||||
```
|
||||
|
||||
If not, install it using the commands:
|
||||
If not, install it using the commands:
|
||||
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt install netplan.io
|
||||
```
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt install netplan.io
|
||||
```
|
||||
|
||||
2. Check `system_networkd` is running:
|
||||
|
||||
```sh
|
||||
sudo systemctl status systemd-networkd
|
||||
```
|
||||
```sh
|
||||
sudo systemctl status systemd-networkd
|
||||
```
|
||||
|
||||
You should see output like below if it is active:
|
||||
You should see output like below if it is active:
|
||||
|
||||
```sh
|
||||
● systemd-networkd.service - Network Configuration
|
||||
Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
|
||||
Active: active (running) since Wed 2024-09-11 23:32:44 EDT; 23min ago
|
||||
TriggeredBy: ● systemd-networkd.socket
|
||||
Docs: man:systemd-networkd.service(8)
|
||||
Main PID: 2452 (systemd-network)
|
||||
Status: "Processing requests..."
|
||||
Tasks: 1 (limit: 18457)
|
||||
Memory: 2.7M
|
||||
CPU: 157ms
|
||||
CGroup: /system.slice/systemd-networkd.service
|
||||
└─2452 /lib/systemd/systemd-networkd
|
||||
```sh
|
||||
● systemd-networkd.service - Network Configuration
|
||||
Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
|
||||
Active: active (running) since Wed 2024-09-11 23:32:44 EDT; 23min ago
|
||||
TriggeredBy: ● systemd-networkd.socket
|
||||
Docs: man:systemd-networkd.service(8)
|
||||
Main PID: 2452 (systemd-network)
|
||||
Status: "Processing requests..."
|
||||
Tasks: 1 (limit: 18457)
|
||||
Memory: 2.7M
|
||||
CPU: 157ms
|
||||
CGroup: /system.slice/systemd-networkd.service
|
||||
└─2452 /lib/systemd/systemd-networkd
|
||||
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: lo: Gained carrier
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: wlan0: Gained IPv6LL
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: eth0: Gained IPv6LL
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: Enumeration completed
|
||||
Sep 11 23:32:44 ubuntu systemd[1]: Started Network Configuration.
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: wlan0: Connected WiFi access point: Verizon_7YLWWD (78:67:0e:ea:a6:0>
|
||||
Sep 11 23:34:16 ubuntu systemd-networkd[2452]: eth0: Re-configuring with /run/systemd/network/10-netplan-eth0.netwo>
|
||||
Sep 11 23:34:16 ubuntu systemd-networkd[2452]: eth0: DHCPv6 lease lost
|
||||
Sep 11 23:34:16 ubuntu systemd-networkd[2452]: eth0: Re-configuring with /run/systemd/network/10-netplan-eth0.netwo>
|
||||
Sep 11 23:34:16 ubuntu systemd-networkd[2452]: eth0: DHCPv6 lease lost
|
||||
```
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: lo: Gained carrier
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: wlan0: Gained IPv6LL
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: eth0: Gained IPv6LL
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: Enumeration completed
|
||||
Sep 11 23:32:44 ubuntu systemd[1]: Started Network Configuration.
|
||||
Sep 11 23:32:44 ubuntu systemd-networkd[2452]: wlan0: Connected WiFi access point: Verizon_7YLWWD (78:67:0e:ea:a6:0>
|
||||
Sep 11 23:34:16 ubuntu systemd-networkd[2452]: eth0: Re-configuring with /run/systemd/network/10-netplan-eth0.netwo>
|
||||
Sep 11 23:34:16 ubuntu systemd-networkd[2452]: eth0: DHCPv6 lease lost
|
||||
Sep 11 23:34:16 ubuntu systemd-networkd[2452]: eth0: Re-configuring with /run/systemd/network/10-netplan-eth0.netwo>
|
||||
Sep 11 23:34:16 ubuntu systemd-networkd[2452]: eth0: DHCPv6 lease lost
|
||||
```
|
||||
|
||||
If `system_networkd` is not running, it can be enabled using:
|
||||
If `system_networkd` is not running, it can be enabled using:
|
||||
|
||||
```sh
|
||||
sudo systemctl start systemd-networkd
|
||||
sudo systemctl enable systemd-networkd
|
||||
```
|
||||
```sh
|
||||
sudo systemctl start systemd-networkd
|
||||
sudo systemctl enable systemd-networkd
|
||||
```
|
||||
|
||||
3. Open the Netplan configuration file (so we can set up a static IP for the Jetson).
|
||||
|
||||
The Netplan configuration file is usually located in the `/etc/netplan/` directory and named something like `01-netcfg.yaml` (the name can vary).
|
||||
Below we use `nano` to open the file, but you can use your preferred text editor:
|
||||
The Netplan configuration file is usually located in the `/etc/netplan/` directory and named something like `01-netcfg.yaml` (the name can vary).
|
||||
Below we use `nano` to open the file, but you can use your preferred text editor:
|
||||
|
||||
```sh
|
||||
sudo nano /etc/netplan/01-netcfg.yaml
|
||||
```
|
||||
```sh
|
||||
sudo nano /etc/netplan/01-netcfg.yaml
|
||||
```
|
||||
|
||||
4. Modify the yaml configuration, by overwriting the contents with the following information and then saving:
|
||||
|
||||
```sh
|
||||
network:
|
||||
version: 2
|
||||
renderer: networkd
|
||||
ethernets:
|
||||
eth0:
|
||||
dhcp4: no
|
||||
addresses:
|
||||
- 10.41.10.1/24
|
||||
routes:
|
||||
- to: 0.0.0.0/0
|
||||
via: 10.41.10.254
|
||||
nameservers:
|
||||
addresses:
|
||||
- 10.41.10.254
|
||||
```
|
||||
```sh
|
||||
network:
|
||||
version: 2
|
||||
renderer: networkd
|
||||
ethernets:
|
||||
eth0:
|
||||
dhcp4: no
|
||||
addresses:
|
||||
- 10.41.10.1/24
|
||||
routes:
|
||||
- to: 0.0.0.0/0
|
||||
via: 10.41.10.254
|
||||
nameservers:
|
||||
addresses:
|
||||
- 10.41.10.254
|
||||
```
|
||||
|
||||
This gives the Jetson a static IP address on the Ethernet interface of `10.41.10.1` .
|
||||
This gives the Jetson a static IP address on the Ethernet interface of `10.41.10.1` .
|
||||
|
||||
5. Apply the changes using the following command:
|
||||
|
||||
```sh
|
||||
sudo netplan apply
|
||||
```
|
||||
```sh
|
||||
sudo netplan apply
|
||||
```
|
||||
|
||||
The Pixhawk Ethernet address is set to `10.41.10.2` by default, which is on the same subnet.
|
||||
We can test our changes above by pinging the Pixhawk from within the Jetson terminal:
|
||||
@@ -1221,15 +1221,15 @@ Assuming the client is set up as defined above:
|
||||
|
||||
- (Serial connection) Start the agent on `/dev/ttyTHS1`:
|
||||
|
||||
```sh
|
||||
sudo MicroXRCEAgent serial --dev /dev/ttyTHS1 -b 921600
|
||||
```
|
||||
```sh
|
||||
sudo MicroXRCEAgent serial --dev /dev/ttyTHS1 -b 921600
|
||||
```
|
||||
|
||||
- (Ethernet) Start the agent on UDP port `8888`:
|
||||
|
||||
```sh
|
||||
MicroXRCEAgent udp4 -p 8888
|
||||
```
|
||||
```sh
|
||||
MicroXRCEAgent udp4 -p 8888
|
||||
```
|
||||
|
||||
If your agent and client are connected and no nodes are running, you should see output similar to this in the Agent terminal:
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ Selecting an airframe applies a [frame configuration file](../dev_airframes/addi
|
||||
Коли ви виводите новий транспортний засіб, рама зазвичай містить досить мінімальну конфігурацію:
|
||||
|
||||
- Кадри з назвою "Загальний" визначають тип транспортного засобу, кількість роторів та позиції роторів-заповнювачі.
|
||||
Після вибору конструкції фюзеляжу ви визначаєте фактичну геометрію, а потім налаштовуєте виходи.
|
||||
Після вибору конструкції фюзеляжу ви визначаєте фактичну геометрію, а потім налаштовуєте виходи.
|
||||
- Кадри з назвою моделі/бренду визначать тип транспортного засобу, кількість роторів, фактичні позиції роторів та напрямки руху двигуна.
|
||||
Після вибору конструкції фюзеляжу вам зазвичай все ще потрібно налаштувати виводи.
|
||||
Після вибору конструкції фюзеляжу вам зазвичай все ще потрібно налаштувати виводи.
|
||||
|
||||
:::
|
||||
|
||||
@@ -52,7 +52,7 @@ If using PWM ESCs and OneShot ESCs (but not DShot and DroneCAN/Cyphal ESC) you s
|
||||
The final step is [Motor Configuration](../config/actuators.md#motor-configuration):
|
||||
|
||||
- [Reverse any motors](../config/actuators.md#reversing-motors) that don't match the spin direction configured in the Geometry.
|
||||
Для DShot ESC ви можете це зробити через інтерфейс тестування приводу.
|
||||
Для DShot ESC ви можете це зробити через інтерфейс тестування приводу.
|
||||
- PWM, OneShot та CAN ESC встановлюють ліміти введення мотора для режимів роззброєння, низької та високої швидкості (не потрібно для DShot ESC)
|
||||
|
||||
Відповідні теми:
|
||||
@@ -123,14 +123,14 @@ PX4 може бути налаштований для автоматичної
|
||||
|
||||
- [Autotune](../config/autotune_mc.md) — Automates tuning PX4 rate and attitude controllers (recommended).
|
||||
|
||||
::: info
|
||||
Automatic tuning works on frames that have reasonable authority and dynamics around all the body axes.
|
||||
Це було перевірено в основному на гоночних квадрокоптерах та X500, і очікується, що воно буде менш ефективним на трикоптерах з нахилом ротора.
|
||||
::: info
|
||||
Automatic tuning works on frames that have reasonable authority and dynamics around all the body axes.
|
||||
Це було перевірено в основному на гоночних квадрокоптерах та X500, і очікується, що воно буде менш ефективним на трикоптерах з нахилом ротора.
|
||||
|
||||
Manual tuning using these guides are only needed if there is a problem with autotune:
|
||||
Manual tuning using these guides are only needed if there is a problem with autotune:
|
||||
|
||||
- [MC PID Tuning (Manual/Basic)](../config_mc/pid_tuning_guide_multicopter_basic.md) — Manual tuning basic how to.
|
||||
- [MC PID Tuning Guide (Manual/Detailed)](../config_mc/pid_tuning_guide_multicopter.md) — Manual tuning with detailed explanation.
|
||||
- [MC PID Tuning (Manual/Basic)](../config_mc/pid_tuning_guide_multicopter_basic.md) — Manual tuning basic how to.
|
||||
- [MC PID Tuning Guide (Manual/Detailed)](../config_mc/pid_tuning_guide_multicopter.md) — Manual tuning with detailed explanation.
|
||||
|
||||
|
||||
:::
|
||||
@@ -138,7 +138,7 @@ PX4 може бути налаштований для автоматичної
|
||||
- [MC Filter/Control Latency Tuning](../config_mc/filter_tuning.md) — Trade off control latency and noise filtering.
|
||||
|
||||
- [MC Setpoint Tuning (Trajectory Generator)](../config_mc/mc_trajectory_tuning.md)
|
||||
- [MC Jerk-limited Type Trajectory](../config_mc/mc_jerk_limited_type_trajectory.md)
|
||||
- [MC Jerk-limited Type Trajectory](../config_mc/mc_jerk_limited_type_trajectory.md)
|
||||
|
||||
- [Multicopter Racer Setup](../config_mc/racer_setup.md)
|
||||
|
||||
@@ -167,7 +167,7 @@ Yes but it must be physically feasible. E.g. if you make a quadrotor where all m
|
||||
- [Периферія контролера польоту](../peripherals/README.md) - налаштування конкретних датчиків, опціональних датчиків, приводів тощо.
|
||||
- [Advanced Configuration](../advanced_config/index.md) - Factory/OEM calibration, configuring advanced features, less-common configuration.
|
||||
- Конфігурація/налаштування, що залежать від апарату:
|
||||
- **Multicopter Config/Tuning**
|
||||
- [Конфігурація/налаштування гелікоптера](../config_heli/index.md)
|
||||
- [Fixed Wing Config/Tuning](../config_fw/index.md)
|
||||
- [Конфігурація/налаштування VTOL](../config_vtol/index.md)
|
||||
- **Multicopter Config/Tuning**
|
||||
- [Конфігурація/налаштування гелікоптера](../config_heli/index.md)
|
||||
- [Fixed Wing Config/Tuning](../config_fw/index.md)
|
||||
- [Конфігурація/налаштування VTOL](../config_vtol/index.md)
|
||||
|
||||
@@ -26,13 +26,13 @@ This topic provides full instructions for building the [Holybro X500 V2 ARF Kit]
|
||||
The Holybro [X500 V2 Kit](https://holybro.com/collections/x500-kits) includes almost all the required components:
|
||||
|
||||
- X500V2 Frame Kit
|
||||
- Body - Full Carbon Fiber Top & Bottom plate (144 x 144mm, 2mm thick)
|
||||
- Arm - High strength & ultra-lightweight 16mm carbon fiber tubes
|
||||
- Landing gear - 16mm & 10mm diameter carbon fiber tubes
|
||||
- Platform board - With mounting holes for GPS & popular companion computer
|
||||
- Система кріплення з подвійними пружинними валиками 10 мм Ø та довжиною 250 мм
|
||||
- Кріплення батареї з двома стропами для батареї
|
||||
- Ручні інструменти для встановлення
|
||||
- Body - Full Carbon Fiber Top & Bottom plate (144 x 144mm, 2mm thick)
|
||||
- Arm - High strength & ultra-lightweight 16mm carbon fiber tubes
|
||||
- Landing gear - 16mm & 10mm diameter carbon fiber tubes
|
||||
- Platform board - With mounting holes for GPS & popular companion computer
|
||||
- Система кріплення з подвійними пружинними валиками 10 мм Ø та довжиною 250 мм
|
||||
- Кріплення батареї з двома стропами для батареї
|
||||
- Ручні інструменти для встановлення
|
||||
- Holybro Motors - 2216 KV880 x6 (superseded - check [spare parts list](https://holybro.com/products/spare-parts-x500-v2-kit) for current version).
|
||||
- Holybro BLHeli S ESC 20A x4 (superseded - check [spare parts list](https://holybro.com/products/spare-parts-x500-v2-kit) for current version).
|
||||
- Propellers - 1045 x4 (superseded - check [spare parts list](https://holybro.com/products/spare-parts-x500-v2-kit) for current version).
|
||||
@@ -93,92 +93,92 @@ _Figure 1_: X500 V2 ARF Kit what's inside
|
||||
Орієнтовний час збірки - 55 хвилин (25 хвилин на раму, 30 хвилин на встановлення/налаштування автопілота)
|
||||
|
||||
1. Start by assembling the payload & battery holder.
|
||||
Втисніть гумки в захоплювачі (не використовуйте гострі предмети, щоб їх втиснути в них!).
|
||||
Далі пропустіть тримачі через планки тримача з основами тримача батарей, як показано на рисунку 3.
|
||||
Втисніть гумки в захоплювачі (не використовуйте гострі предмети, щоб їх втиснути в них!).
|
||||
Далі пропустіть тримачі через планки тримача з основами тримача батарей, як показано на рисунку 3.
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 2_: Payload holder components
|
||||
_Figure 2_: Payload holder components
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 3_: Payload holder assembled
|
||||
_Figure 3_: Payload holder assembled
|
||||
|
||||
2. Наступним кроком буде прикріплення нижньої пластини до тримача вантажу.
|
||||
|
||||
Вам знадобляться деталі, як показано на рисунку 4.
|
||||
Потім встановіть основу для розподільної плати живлення, використовуючи нейлонові гайки, як зображено на Рис. 5.
|
||||
Нарешті, використовуючи 8 шестигранних гвинтів, ви можете приєднати нижню пластину до тримача навантаження (Рисунок 7)
|
||||
Вам знадобляться деталі, як показано на рисунку 4.
|
||||
Потім встановіть основу для розподільної плати живлення, використовуючи нейлонові гайки, як зображено на Рис. 5.
|
||||
Нарешті, використовуючи 8 шестигранних гвинтів, ви можете приєднати нижню пластину до тримача навантаження (Рисунок 7)
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 4_: Needed Materials
|
||||
_Figure 4_: Needed Materials
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 5_: PDB mount base
|
||||
_Figure 5_: PDB mount base
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 6_: Mounted pdb with nylon nuts
|
||||
_Figure 6_: Mounted pdb with nylon nuts
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 7_: Mounted Plate on payload holder
|
||||
_Figure 7_: Mounted Plate on payload holder
|
||||
|
||||
3. Давайте зберемо речі, необхідні для монтажу посадкового шасі, як на рисунку 8.
|
||||
Використовуйте гвинти, щоб приєднати посадкові шасі до нижньої пластини.
|
||||
Також потрібно відкрити три шестигранних гвинти на кожній з ніжок, щоб ви могли вставити їх у вуглецеві труби.
|
||||
Не забудьте знову їх затягнути.
|
||||
Використовуйте гвинти, щоб приєднати посадкові шасі до нижньої пластини.
|
||||
Також потрібно відкрити три шестигранних гвинти на кожній з ніжок, щоб ви могли вставити їх у вуглецеві труби.
|
||||
Не забудьте знову їх затягнути.
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 8_: Required parts for landing gear attachment
|
||||
_Figure 8_: Required parts for landing gear attachment
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 9_: Landing gear attachment to the body
|
||||
_Figure 9_: Landing gear attachment to the body
|
||||
|
||||
4. Зараз ми зберемо все оснащення, щоб встановити верхню пластину.
|
||||
Прошу звернути увагу, що номери моторів на кронштейнах відповідають тим, що згадані на верхній платі.
|
||||
На щастя, мотори встановлені, а ESCs були з'єднані заздалегідь.
|
||||
Почніть, проходячи через всі гвинти, так як ви зафіксували кронштейни на їхніх власних місцях (Вони мають направляючий елемент, як показано на рисунку 11, щоб переконатися, що вони на місці), і трохи підтягніть всі нейлонові гайки.
|
||||
Потім ви зможете підключити роз'єми живлення XT30 до плати живлення.
|
||||
Пам'ятайте, що дроти сигналу повинні бути проведені через верхню пластину так, що ми зможемо пізніше їх підключити до Pixhawk.
|
||||
Прошу звернути увагу, що номери моторів на кронштейнах відповідають тим, що згадані на верхній платі.
|
||||
На щастя, мотори встановлені, а ESCs були з'єднані заздалегідь.
|
||||
Почніть, проходячи через всі гвинти, так як ви зафіксували кронштейни на їхніх власних місцях (Вони мають направляючий елемент, як показано на рисунку 11, щоб переконатися, що вони на місці), і трохи підтягніть всі нейлонові гайки.
|
||||
Потім ви зможете підключити роз'єми живлення XT30 до плати живлення.
|
||||
Пам'ятайте, що дроти сигналу повинні бути проведені через верхню пластину так, що ми зможемо пізніше їх підключити до Pixhawk.
|
||||
|
||||
<img src="../../assets/airframes/multicopter/x500_v2_holybro_pixhawk5x/needed_stuff_top_plate.png" width="700" title="Arms and top plate materials">
|
||||
<img src="../../assets/airframes/multicopter/x500_v2_holybro_pixhawk5x/needed_stuff_top_plate.png" width="700" title="Arms and top plate materials">
|
||||
|
||||
_Figure 10_: Connecting arms needed materials.
|
||||
_Figure 10_: Connecting arms needed materials.
|
||||
|
||||
<img src="../../assets/airframes/multicopter/x500_v2_holybro_pixhawk5x/guide_for_arm_mount.png" width="700" title="Guide for the arms mount">
|
||||
<img src="../../assets/airframes/multicopter/x500_v2_holybro_pixhawk5x/guide_for_arm_mount.png" width="700" title="Guide for the arms mount">
|
||||
|
||||
_Figure 11_: Guide for the arms mount
|
||||
_Figure 11_: Guide for the arms mount
|
||||
|
||||
5. Для затягування всіх 16 гвинтів і гайок використовуйте як шестигранний ключ, так і гайковий ключ.
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 12_: Mounted top plate
|
||||
_Figure 12_: Mounted top plate
|
||||
|
||||
6. Наступним кроком ви можете закріпити свій pixhawk на верхній плиті, використовуючи наклейки.
|
||||
Рекомендується мати напрямок стрілки вашого Pixhawk таким же, як зазначено на верхній плиті.
|
||||
Рекомендується мати напрямок стрілки вашого Pixhawk таким же, як зазначено на верхній плиті.
|
||||
|
||||

|
||||

|
||||
|
||||
_Figure 13_: Sticker tapes on Pixhawk
|
||||
_Figure 13_: Sticker tapes on Pixhawk
|
||||
|
||||
7. Якщо ви хочете встановити GPS на плату компаньйона-комп'ютера, тепер ви можете закріпити кріплення GPS на ній за допомогою 4 гвинтів і гайок.
|
||||
|
||||
<img src="../../assets/airframes/multicopter/x500_v2_holybro_pixhawk5x/gps_mount_plate.png" width="400" title="Secure GPS mount onto companion plate">
|
||||
<img src="../../assets/airframes/multicopter/x500_v2_holybro_pixhawk5x/gps_mount_plate.png" width="400" title="Secure GPS mount onto companion plate">
|
||||
|
||||
_Figure 14_: Secure GPS mount onto companion plate
|
||||
_Figure 14_: Secure GPS mount onto companion plate
|
||||
|
||||
8. За допомогою скотча приклейте GPS до верхньої частини GPS-щогли і встановіть її на щоглу.
|
||||
Переконайтеся, що стрілка на gps вказує вперед (зображення 15).
|
||||
Переконайтеся, що стрілка на gps вказує вперед (зображення 15).
|
||||
|
||||
<img src="../../assets/airframes/multicopter/x500_holybro_pixhawk4/gps2.jpg" width="400" title="Figure 16: GPS and mast">
|
||||
<img src="../../assets/airframes/multicopter/x500_holybro_pixhawk4/gps2.jpg" width="400" title="Figure 16: GPS and mast">
|
||||
|
||||
_Figure 15_: GPS and mast
|
||||
_Figure 15_: GPS and mast
|
||||
|
||||
9. Наразі ви можете підключити інтерфейси Pixhawk, такі як телеметрійне радіо до 'TELEM1' та відповідно кабелі сигналів для моторів.
|
||||
|
||||
@@ -204,14 +204,14 @@ _QGroundControl_ is used to install the PX4 autopilot and configure/tune it for
|
||||
|
||||
- [Airframe](../config/airframe.md)
|
||||
|
||||
You will need to select the _Holybro X500 V2_ airframe (**Quadrotor x > Holybro 500 V2**)
|
||||
You will need to select the _Holybro X500 V2_ airframe (**Quadrotor x > Holybro 500 V2**)
|
||||
|
||||

|
||||

|
||||
|
||||
- [Actuators](../config/actuators.md)
|
||||
- Вам не потрібно оновлювати геометрію транспортного засобу (оскільки це попередньо налаштована конструкція повітряного каркасу).
|
||||
- Призначте функції приводу до актуаторів, щоб відповідати вашому підключенню.
|
||||
- Перевірте конфігурацію, використовуючи слайдери.
|
||||
- Вам не потрібно оновлювати геометрію транспортного засобу (оскільки це попередньо налаштована конструкція повітряного каркасу).
|
||||
- Призначте функції приводу до актуаторів, щоб відповідати вашому підключенню.
|
||||
- Перевірте конфігурацію, використовуючи слайдери.
|
||||
|
||||
Потім виконайте обов'язкове налаштування / калібрування:
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@ The Reptile Dragon 2 is a twin motor RC airplane specifically designed for effic
|
||||
- Видалення V-хвоста або варіанти звичайного хвоста включені
|
||||
- Різьбові вставки в крилах та верхній частині фюзеляжу для зовнішнього монтажу
|
||||
- Чимало кріплень-ознак
|
||||
- Отвір для верхньої антени
|
||||
- Верхнє покриття GPS
|
||||
- Кріплення антени біля гільзи "T"
|
||||
- Задній електронний лоток
|
||||
- Виріз "екшн камери" на передній панелі
|
||||
- Виріз для камери FPV спереду
|
||||
- Отвір для верхньої антени
|
||||
- Верхнє покриття GPS
|
||||
- Кріплення антени біля гільзи "T"
|
||||
- Задній електронний лоток
|
||||
- Виріз "екшн камери" на передній панелі
|
||||
- Виріз для камери FPV спереду
|
||||
- Знімні крила
|
||||
- Низька швидкість стійки
|
||||
- Лагідна обробка
|
||||
@@ -69,10 +69,10 @@ The Reptile Dragon 2 is a twin motor RC airplane specifically designed for effic
|
||||
- [6s2p 18650 LiIon flight battery](https://www.upgradeenergytech.com/product-page/6s-22-2v-5600mah-30c-dark-lithium-liion-drone-battery) (select XT60 connector)
|
||||
|
||||
- [Custom designed 3D printed parts](https://github.com/PX4/PX4-user_guide/raw/main/assets/airframes/fw/reptile_dragon_2/rd2_3d_printed_parts.zip)
|
||||
- Монтаж платформи ARK6X
|
||||
- Кріплення для каркасу Holybro Pixhawk 5x
|
||||
- FPV модуль та кріплення камери
|
||||
- Адаптер "заглушка" статичного зонда Піто
|
||||
- Монтаж платформи ARK6X
|
||||
- Кріплення для каркасу Holybro Pixhawk 5x
|
||||
- FPV модуль та кріплення камери
|
||||
- Адаптер "заглушка" статичного зонда Піто
|
||||
|
||||
- [Custom designed power distribution PCB](https://github.com/PX4/PX4-user_guide/raw/main/assets/airframes/fw/reptile_dragon_2/xt30_power_distro_pcb.zip)
|
||||
|
||||
@@ -425,15 +425,15 @@ With the propellers removed, power the airplane up and use the [Actuator](../con
|
||||
Я рекомендую перевірити наступні елементи:
|
||||
|
||||
- Калібрування датчиків (QGC)
|
||||
- Калібрування магнітів
|
||||
- Калібрування акселерометра
|
||||
- Калібрування швидкості повітря
|
||||
- Калібрування рівня горизонту
|
||||
- Калібрування магнітів
|
||||
- Калібрування акселерометра
|
||||
- Калібрування швидкості повітря
|
||||
- Калібрування рівня горизонту
|
||||
- Перевірка контролю над відхиленням поверхні
|
||||
- Right stick -> Right aileron goes up, left aileron goes down
|
||||
- Left stick -> Left aileron goes up, right aileron goes down
|
||||
- Stick back -> elevator goes up
|
||||
-Stick forward -> elevator goes down
|
||||
-Stick forward -> elevator goes down
|
||||
- Left rudder -> Rudder goes left
|
||||
- Right rudder -> Rudder goes right
|
||||
- Check Px4 inputs (in `stabilized mode`)
|
||||
|
||||
@@ -98,11 +98,11 @@ The mapping between flight controller outputs and specific controls/motors depen
|
||||
Assembly information is covered in several sections:
|
||||
|
||||
- [Basic Assembly](../assembly/index.md) contains topics shows the setup of core components for a number of popular [flight controllers](../flight_controller/index.md).
|
||||
Контролери польоту, для яких у нас немає посібників, зазвичай налаштовуються таким же чином (і майже завжди містять схожі посібники з налаштуванням).
|
||||
Контролери польоту, для яких у нас немає посібників, зазвичай налаштовуються таким же чином (і майже завжди містять схожі посібники з налаштуванням).
|
||||
- [Peripherals](../peripherals/index.md) contains information about other peripherals, including [Airspeed Sensors](../sensor/airspeed.md).
|
||||
- [Airframes Reference > VTOL](../airframes/airframe_reference.md#vtol) explains which flight controller outputs must be connected to different flight controls for each airframe configuration:
|
||||
- Виберіть конфігурацію для вашого транспортного засобу, якщо вона існує, оскільки вона буде достатньо попередньо налаштована для польоту (можливо, потребує тільки дрібного налаштування).
|
||||
- В іншому випадку виберіть "Загальну конструкцію", яка відповідає вашому транспортному засобу.
|
||||
- Виберіть конфігурацію для вашого транспортного засобу, якщо вона існує, оскільки вона буде достатньо попередньо налаштована для польоту (можливо, потребує тільки дрібного налаштування).
|
||||
- В іншому випадку виберіть "Загальну конструкцію", яка відповідає вашому транспортному засобу.
|
||||
|
||||
In addition, build logs showing how others have set up different types of vehicles are provided as sub topics.
|
||||
For example see [FunCub QuadPlane](../frames_vtol/vtol_quadplane_fun_cub_vtol_pixhawk.md).
|
||||
|
||||
@@ -29,151 +29,151 @@ This consists of a single _C_ file and a _cmake_ definition (which tells the too
|
||||
|
||||
2. Create a new C file in that directory named **px4_simple_app.c**:
|
||||
|
||||
- Скопіюйте заголовок за замовчуванням у верхній частині сторінки.
|
||||
Це повинно бути присутнім у всіх розміщених файлах!
|
||||
- Скопіюйте заголовок за замовчуванням у верхній частині сторінки.
|
||||
Це повинно бути присутнім у всіх розміщених файлах!
|
||||
|
||||
```c
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2022 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
```
|
||||
```c
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2022 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
```
|
||||
|
||||
- Скопіюйте наступний код під заголовком за замовчуванням.
|
||||
Це повинно бути присутнім у всіх розміщених файлах!
|
||||
- Скопіюйте наступний код під заголовком за замовчуванням.
|
||||
Це повинно бути присутнім у всіх розміщених файлах!
|
||||
|
||||
```c
|
||||
/**
|
||||
* @file px4_simple_app.c
|
||||
* Minimal application example for PX4 autopilot
|
||||
*
|
||||
* @author Example User <mail@example.com>
|
||||
*/
|
||||
```c
|
||||
/**
|
||||
* @file px4_simple_app.c
|
||||
* Minimal application example for PX4 autopilot
|
||||
*
|
||||
* @author Example User <mail@example.com>
|
||||
*/
|
||||
|
||||
#include <px4_platform_common/log.h>
|
||||
#include <px4_platform_common/log.h>
|
||||
|
||||
__EXPORT int px4_simple_app_main(int argc, char *argv[]);
|
||||
__EXPORT int px4_simple_app_main(int argc, char *argv[]);
|
||||
|
||||
int px4_simple_app_main(int argc, char *argv[])
|
||||
{
|
||||
PX4_INFO("Hello Sky!");
|
||||
return OK;
|
||||
}
|
||||
```
|
||||
int px4_simple_app_main(int argc, char *argv[])
|
||||
{
|
||||
PX4_INFO("Hello Sky!");
|
||||
return OK;
|
||||
}
|
||||
```
|
||||
|
||||
:::tip
|
||||
The main function must be named `<module_name>_main` and exported from the module as shown.
|
||||
:::tip
|
||||
The main function must be named `<module_name>_main` and exported from the module as shown.
|
||||
|
||||
:::
|
||||
|
||||
:::tip
|
||||
`PX4_INFO` is the equivalent of `printf` for the PX4 shell (included from **px4_platform_common/log.h**).
|
||||
There are different log levels: `PX4_INFO`, `PX4_WARN`, `PX4_ERR`, `PX4_DEBUG`.
|
||||
Warnings and errors are additionally added to the [ULog](../dev_log/ulog_file_format.md) and shown on [Flight Review](https://logs.px4.io/).
|
||||
:::tip
|
||||
`PX4_INFO` is the equivalent of `printf` for the PX4 shell (included from **px4_platform_common/log.h**).
|
||||
There are different log levels: `PX4_INFO`, `PX4_WARN`, `PX4_ERR`, `PX4_DEBUG`.
|
||||
Warnings and errors are additionally added to the [ULog](../dev_log/ulog_file_format.md) and shown on [Flight Review](https://logs.px4.io/).
|
||||
|
||||
:::
|
||||
|
||||
3. Create and open a new _cmake_ definition file named **CMakeLists.txt**.
|
||||
Скопіюйте текст нижче:
|
||||
Скопіюйте текст нижче:
|
||||
|
||||
```cmake
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
px4_add_module(
|
||||
MODULE examples__px4_simple_app
|
||||
MAIN px4_simple_app
|
||||
STACK_MAIN 2000
|
||||
SRCS
|
||||
px4_simple_app.c
|
||||
DEPENDS
|
||||
)
|
||||
```
|
||||
```cmake
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
px4_add_module(
|
||||
MODULE examples__px4_simple_app
|
||||
MAIN px4_simple_app
|
||||
STACK_MAIN 2000
|
||||
SRCS
|
||||
px4_simple_app.c
|
||||
DEPENDS
|
||||
)
|
||||
```
|
||||
|
||||
The `px4_add_module()` method builds a static library from a module description.
|
||||
The `px4_add_module()` method builds a static library from a module description.
|
||||
|
||||
- The `MODULE` block is the Firmware-unique name of the module (by convention the module name is prefixed by parent directories back to `src`).
|
||||
- The `MAIN` block lists the entry point of the module, which registers the command with NuttX so that it can be called from the PX4 shell or SITL console.
|
||||
- The `MODULE` block is the Firmware-unique name of the module (by convention the module name is prefixed by parent directories back to `src`).
|
||||
- The `MAIN` block lists the entry point of the module, which registers the command with NuttX so that it can be called from the PX4 shell or SITL console.
|
||||
|
||||
:::tip
|
||||
The `px4_add_module()` format is documented in [PX4-Autopilot/cmake/px4_add_module.cmake](https://github.com/PX4/PX4-Autopilot/blob/main/cmake/px4_add_module.cmake). <!-- NEED px4_version -->
|
||||
:::tip
|
||||
The `px4_add_module()` format is documented in [PX4-Autopilot/cmake/px4_add_module.cmake](https://github.com/PX4/PX4-Autopilot/blob/main/cmake/px4_add_module.cmake). <!-- NEED px4_version -->
|
||||
|
||||
:::
|
||||
|
||||
::: info
|
||||
If you specify `DYNAMIC` as an option to `px4_add_module`, a _shared library_ is created instead of a static library on POSIX platforms (these can be loaded without having to recompile PX4, and shared to others as binaries rather than source code).
|
||||
Your app will not become a builtin command, but ends up in a separate file called `examples__px4_simple_app.px4mod`.
|
||||
You can then run your command by loading the file at runtime using the `dyn` command: `dyn ./examples__px4_simple_app.px4mod`
|
||||
::: info
|
||||
If you specify `DYNAMIC` as an option to `px4_add_module`, a _shared library_ is created instead of a static library on POSIX platforms (these can be loaded without having to recompile PX4, and shared to others as binaries rather than source code).
|
||||
Your app will not become a builtin command, but ends up in a separate file called `examples__px4_simple_app.px4mod`.
|
||||
You can then run your command by loading the file at runtime using the `dyn` command: `dyn ./examples__px4_simple_app.px4mod`
|
||||
|
||||
:::
|
||||
|
||||
4. Create and open a new _Kconfig_ definition file named **Kconfig** and define your symbol for naming (see [Kconfig naming convention](../hardware/porting_guide_config.md#px4-kconfig-symbol-naming-convention)).
|
||||
Скопіюйте текст нижче:
|
||||
Скопіюйте текст нижче:
|
||||
|
||||
```
|
||||
menuconfig EXAMPLES_PX4_SIMPLE_APP
|
||||
bool "px4_simple_app"
|
||||
default n
|
||||
---help---
|
||||
Enable support for px4_simple_app
|
||||
```
|
||||
```
|
||||
menuconfig EXAMPLES_PX4_SIMPLE_APP
|
||||
bool "px4_simple_app"
|
||||
default n
|
||||
---help---
|
||||
Enable support for px4_simple_app
|
||||
```
|
||||
|
||||
## Побудуйте Програму/прошивку
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ CONFIG_DRIVERS_RPM_CAPTURE=y
|
||||
Additionally, to enable the module:
|
||||
|
||||
- Set [ICE_EN](../advanced_config/parameter_reference.md#ICE_EN)
|
||||
to true and adjust the other `ICE_` module parameters according to your needs.
|
||||
to true and adjust the other `ICE_` module parameters according to your needs.
|
||||
- Set [RPM_CAP_ENABLE](../advanced_config/parameter_reference.md#RPM_CAP_ENABLE) to true.
|
||||
|
||||
The module outputs control signals for ignition, throttle, and choke,
|
||||
@@ -367,8 +367,8 @@ The state machine:
|
||||
|
||||
- Checks if [Rpm.msg](../msg_docs/Rpm.md) is updated to know if the engine is running
|
||||
- Allows for user inputs from:
|
||||
- AUX{N}
|
||||
- Arming state in [VehicleStatus.msg](../msg_docs/VehicleStatus.md)
|
||||
- AUX{N}
|
||||
- Arming state in [VehicleStatus.msg](../msg_docs/VehicleStatus.md)
|
||||
|
||||
The module publishes [InternalCombustionEngineControl.msg](../msg_docs/InternalCombustionEngineControl.md).
|
||||
|
||||
@@ -484,7 +484,7 @@ The normal log is always a superset of the mission log.
|
||||
The implementation uses two threads:
|
||||
|
||||
- The main thread, running at a fixed rate (or polling on a topic if started with -p) and checking for
|
||||
data updates
|
||||
data updates
|
||||
- The writer thread, writing data to the file
|
||||
|
||||
In between there is a write buffer with configurable size (and another fixed-size buffer for
|
||||
@@ -688,9 +688,9 @@ There are 2 environment variables used for configuration: `replay`, which must b
|
||||
the log file to be replayed. The second is the mode, specified via `replay_mode`:
|
||||
|
||||
- `replay_mode=ekf2`: specific EKF2 replay mode. It can only be used with the ekf2 module, but allows the replay
|
||||
to run as fast as possible.
|
||||
to run as fast as possible.
|
||||
- Generic otherwise: this can be used to replay any module(s), but the replay will be done with the same speed as the
|
||||
log was recorded.
|
||||
log was recorded.
|
||||
|
||||
The module is typically used together with uORB publisher rules, to specify which messages should be replayed.
|
||||
The replay module will just publish all messages that are found in the log. It also applies the parameters from
|
||||
@@ -842,12 +842,12 @@ it into a more usable form, and publishes it for the rest of the system.
|
||||
The provided functionality includes:
|
||||
|
||||
- Read the output from the sensor drivers (`SensorGyro`, etc.).
|
||||
If there are multiple of the same type, do voting and failover handling.
|
||||
Then apply the board rotation and temperature calibration (if enabled). And finally publish the data; one of the
|
||||
topics is `SensorCombined`, used by many parts of the system.
|
||||
If there are multiple of the same type, do voting and failover handling.
|
||||
Then apply the board rotation and temperature calibration (if enabled). And finally publish the data; one of the
|
||||
topics is `SensorCombined`, used by many parts of the system.
|
||||
- Make sure the sensor drivers get the updated calibration parameters (scale & offset) when the parameters change or
|
||||
on startup. The sensor drivers use the ioctl interface for parameter updates. For this to work properly, the
|
||||
sensor drivers must already be running when `sensors` is started.
|
||||
on startup. The sensor drivers use the ioctl interface for parameter updates. For this to work properly, the
|
||||
sensor drivers must already be running when `sensors` is started.
|
||||
- Do sensor consistency checks and publish the `SensorsStatusImu` topic.
|
||||
|
||||
### Імплементація
|
||||
|
||||
@@ -25,37 +25,37 @@ Other examples in Python can be found here: [integrationtests/python_src/px4_it/
|
||||
|
||||
1. Open the terminal and go to `~/catkin_ws/src` directory
|
||||
|
||||
```sh
|
||||
roscd # Should cd into ~/catkin_ws/devel
|
||||
cd ..
|
||||
cd src
|
||||
```
|
||||
```sh
|
||||
roscd # Should cd into ~/catkin_ws/devel
|
||||
cd ..
|
||||
cd src
|
||||
```
|
||||
|
||||
2. In the `~/catkin_ws/src` directory create a new package named `offboard_py` (in this case) with the `rospy` dependency:
|
||||
|
||||
```sh
|
||||
catkin_create_pkg offboard_py rospy
|
||||
```
|
||||
```sh
|
||||
catkin_create_pkg offboard_py rospy
|
||||
```
|
||||
|
||||
3. Build the new package in the `~/catkin_ws/` directory:
|
||||
|
||||
```sh
|
||||
cd .. # Assuming previous directory to be ~/catkin_ws/src
|
||||
catkin build
|
||||
source devel/setup.bash
|
||||
```
|
||||
```sh
|
||||
cd .. # Assuming previous directory to be ~/catkin_ws/src
|
||||
catkin build
|
||||
source devel/setup.bash
|
||||
```
|
||||
|
||||
4. Тепер ви можете мати можливість перейти до пакета, використовуючи:
|
||||
|
||||
```sh
|
||||
```
|
||||
```sh
|
||||
```
|
||||
|
||||
5. To store your Python files, create a new folder called `/scripts` on the package:
|
||||
|
||||
```sh
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
```
|
||||
```sh
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
```
|
||||
|
||||
## Код
|
||||
|
||||
|
||||
@@ -37,63 +37,63 @@ This is needed because, by default, you cannot arm a vehicle without a connectio
|
||||
|
||||
2. Створіть новий каталог робочого простору colcon і перейдіть до нього за допомогою:
|
||||
|
||||
```sh
|
||||
mkdir -p ~/ws_offboard_control/src/
|
||||
cd ~/ws_offboard_control/src/
|
||||
```
|
||||
```sh
|
||||
mkdir -p ~/ws_offboard_control/src/
|
||||
cd ~/ws_offboard_control/src/
|
||||
```
|
||||
|
||||
3. Clone the [px4_msgs](https://github.com/PX4/px4_msgs) repo to the `/src` directory (this repo is needed in every ROS 2 PX4 workspace!):
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/px4_msgs.git
|
||||
# checkout the matching release branch if not using PX4 main.
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/PX4/px4_msgs.git
|
||||
# checkout the matching release branch if not using PX4 main.
|
||||
```
|
||||
|
||||
4. Clone the example repository [px4_ros_com](https://github.com/PX4/px4_ros_com) to the `/src` directory:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/px4_ros_com.git
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/PX4/px4_ros_com.git
|
||||
```
|
||||
|
||||
5. Source the ROS 2 development environment into the current terminal and compile the workspace using `colcon`:
|
||||
|
||||
:::: tabs
|
||||
:::: tabs
|
||||
|
||||
::: tab humble
|
||||
::: tab humble
|
||||
|
||||
```sh
|
||||
cd ..
|
||||
source /opt/ros/humble/setup.bash
|
||||
colcon build
|
||||
```
|
||||
```sh
|
||||
cd ..
|
||||
source /opt/ros/humble/setup.bash
|
||||
colcon build
|
||||
```
|
||||
|
||||
|
||||
:::
|
||||
|
||||
::: tab foxy
|
||||
::: tab foxy
|
||||
|
||||
```sh
|
||||
cd ..
|
||||
source /opt/ros/foxy/setup.bash
|
||||
colcon build
|
||||
```
|
||||
```sh
|
||||
cd ..
|
||||
source /opt/ros/foxy/setup.bash
|
||||
colcon build
|
||||
```
|
||||
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
::::
|
||||
|
||||
6. Source the `local_setup.bash`:
|
||||
|
||||
```sh
|
||||
source install/local_setup.bash
|
||||
```
|
||||
```sh
|
||||
source install/local_setup.bash
|
||||
```
|
||||
|
||||
7. Запустіть приклад.
|
||||
|
||||
```
|
||||
ros2 run px4_ros_com offboard_control
|
||||
```
|
||||
```
|
||||
ros2 run px4_ros_com offboard_control
|
||||
```
|
||||
|
||||
Транспортний засіб повинен озброїтися, піднятися на 5 метрів і потім зачекати (вічно).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user