docs: English translation updates (#190)

* docs: Add CLI article (en)

* docs: Update frames article (en)

* docs: Add article about part models (en)

* docs: Update Raspberry Pi article (en)

* docs: Remove unused raspberry3.jpg

* docs: Add COEX Pix article (en)

* docs: Add CopterHack 2019 article (en)

* docs: Update connection article (en)

* docs: Add programming overview (en)

* docs: Add anchor in modes article

* docs: Fix link in auto_setup, add editing ID (en)

* docs: Rearrange summary to match Russian version (en)

* docs/camera_frame: Add link to cli#editing (en)

* docs/wifi: Fix link to next article (en)

* docs: Add "next" links where appropriate (en)
This commit is contained in:
Alexey Rogachevskiy
2019-11-25 20:22:41 +03:00
committed by GitHub
parent 4feac879eb
commit 7dc82e8154
17 changed files with 406 additions and 72 deletions

View File

@@ -1,60 +1,52 @@
Connecting Pixhawk/Pixracer to Raspberry Pi
===
# Connecting Raspberry Pi to the flight controller
To program [autonomous flights](simple_offboard.md) [work with Pixhawk (Pixracer) over Wi-Fi](gcs_bridge.md), use [of a phone transmitter] (rc.md), and other functions, it is necessary to connect Raspberry Pi to Pixhawk (Pixracer).
In order to program [autonomous flights](simple_offboard.md), [work with Pixhawk or Pixracer over Wi-Fi](gcs_bridge.md), use [controller app](rc.md) and access other functions you need to connect your Raspberry Pi to the flight controller.
Check operability of the connection [by running on Raspberry Pi](ssh.md):
## USB connection
```bash
rostopic echo /mavros/state
```
USB connection is the preferred way to connect to the flight controller.
The `connected` field should contain value `True`.
1. Connect your FCU to the Raspberry Pi using a microUSB to USB cable.
2. [Connect to the Raspberry Pi over SSH](ssh.md).
3. Make sure the connection is working by [running the following command on the Raspberry Pi](ssh.md):
Connection via USB
---
```bash
rostopic echo /mavros/state
```
Connect Pixhawk/Pixracer to micro USB in Raspberry Pi with a USB cable.
The `connected` field should have the `True` value.s
Make sure that in Clever launch file (`~/catkin_ws/src/clever/clever/launch/clever.launch`), connection type is set to USB:
> **Hint** You need to set the `CBRK_USB_CHK` [parameter](px4_parameters.md) to 197848 for the USB connection to work.
```xml
<arg name="fcu_conn" default="usb"/>
```
## UART connection
After the launch file is edited, restart package `clever`:
<!-- TODO: Connection scheme -->
```bash
sudo systemctl restart clever
```
UART connection is another way for the Raspberry Pi and FCU to communicate.
> **Hint** For correct operation of the Raspberry Pi connection to Pixhawk via USB, set value of [parameter](px4_parameters.md) `CBRK_USB_CHK` to 197848.
1. Connect Raspberry Pi to your FCU using a UART cable.
2. [Connect to the Raspberry Pi over SSH](ssh.md).
3. Change the connection type in `~/catkin_ws/src/clever/clever/launch/clever.launch` to UART:
Connection via UART
---
```xml
<arg name="fcu_conn" default="uart"/>
```
TODO connection diagram
Be sure to restart the `clever` service after editing the .launch file:
Make sure that in Clever launch file (`~/catkin_ws/src/clever/clever/clever.launch`), connection type is set to UART:
```bash
sudo systemctl restart clever
```
```xml
<arg name="fcu_conn" default="uart"/>
```
> **Hint** Set the `SYS_COMPANION` PX4 parameter to 921600 to enable UART on the FCU.
After the launch-file is edited, restart package `clever`:
## SITL connection
```bash
sudo systemctl restart clever
```
> **Hint** For correct operation of the Raspberry Pi connection to Pixhawk via UART, set value of parameter`SYS_COMPANION` to 921600.
Connection to SITL
---
To connect locally/remotely to a running [SITL](sitl.md), set argument `fcu_conn` to `udp`, and `fcu_ip` to the IP address of the machine where SITL is running (`127.0.0.1` for local):
In order to connect to a local or a remote [SITL](sitl.md) instance set the `fcu_conn` parameter to `udp` and `fcu_ip` to the IP address of the SITL instance (`127.0.0.1` if you are running the instance locally):
```xml
<arg name="fcu_conn" default="udp"/>
<arg name="fcu_ip" default="127.0.0.1"/>
```
**Next**: [Using QGroundControl over Wi-Fi](gcs_bridge.md)