mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-04 23:20:06 +08:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2309036f63 | |||
| 917daf379e | |||
| 9e99bd3b7a | |||
| a2341c29f4 | |||
| f608a10ed4 | |||
| 5cb3fd1c9f | |||
| 9e8b530ad9 | |||
| c2706f5406 | |||
| 735777862d | |||
| 4184cf67d3 | |||
| 71554af8fa | |||
| f67027f066 | |||
| dfc66993b6 | |||
| ca2ed655b8 | |||
| fdebdc447d | |||
| 283a69dedf | |||
| 451b0a3db8 | |||
| 4c0a63f679 | |||
| a048a8e8a0 | |||
| 80ea3a09bb | |||
| b35753ded9 | |||
| 18b6a61788 | |||
| b91e1cd482 | |||
| d1eff16ad7 | |||
| 895afea0a7 | |||
| 1afa098c90 | |||
| 12988c94f5 | |||
| 19230aa369 | |||
| 950f2272bf | |||
| 440d76b839 | |||
| 7c444828f3 | |||
| 3d7bc4a558 | |||
| d04e6695ac | |||
| bd0a59eb1f | |||
| e63b09da63 | |||
| 5e1df797e0 | |||
| d699adb308 | |||
| 58282c5292 | |||
| bcd609ce51 | |||
| 497efb9665 | |||
| 029060264e | |||
| cba54fc59d | |||
| 3d48ba4c19 | |||
| 7c6abf2237 | |||
| bd4aad0796 | |||
| c909611149 | |||
| 77df2c97ec | |||
| c77f3887aa | |||
| 6cab668270 |
@@ -19,7 +19,7 @@ jobs:
|
||||
fail-fast: false
|
||||
max-parallel: 1 # Should be 1 to avoid parallel builds
|
||||
matrix:
|
||||
lc: [ko, uk, zh] # Target languages https://developer.crowdin.com/language-codes/
|
||||
lc: [ko, uk, zh-CN] # Target languages https://developer.crowdin.com/language-codes/
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -41,6 +41,8 @@ jobs:
|
||||
pull_request_base_branch_name: 'main'
|
||||
pull_request_title: New PX4 guide translations (Crowdin) - ${{ matrix.lc }}
|
||||
pull_request_body: 'New PX4 guide Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action) for ${{ matrix.lc }}'
|
||||
pull_request_labels: Documentation
|
||||
pull_request_reviewers: hamishwillee
|
||||
download_language: ${{ matrix.lc }}
|
||||
env:
|
||||
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
|
||||
|
||||
@@ -8,18 +8,18 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- 'docs/en/**'
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'docs/en/**'
|
||||
#pull_request:
|
||||
# types:
|
||||
# - closed
|
||||
# branches:
|
||||
# - main
|
||||
# paths:
|
||||
# - 'docs/en/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
upload-to-crowdin:
|
||||
if: github.event.pull_request.merged == true || github.event_name == 'push'
|
||||
#if: github.event.pull_request.merged == true || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
- name: crowdin push
|
||||
uses: crowdin/github-action@v2
|
||||
with:
|
||||
config: 'docs/crowdin.yml'
|
||||
config: 'docs/crowdin_docs.yml'
|
||||
upload_sources: true
|
||||
upload_translations: false
|
||||
download_translations: false
|
||||
|
||||
@@ -5,8 +5,6 @@ on:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'release/**'
|
||||
tags:
|
||||
- 'v*'
|
||||
paths:
|
||||
- 'docs/en/**'
|
||||
pull_request:
|
||||
@@ -70,7 +68,7 @@ jobs:
|
||||
deploy:
|
||||
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) || github.event_name == 'workflow_dispatch' }}
|
||||
needs: build
|
||||
runs-on: [runs-on,runner=2cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
|
||||
steps:
|
||||
- name: Download Artifact
|
||||
|
||||
@@ -95,62 +95,61 @@ jobs:
|
||||
echo "$EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
# TODO:
|
||||
# This part of the workflow is causing errors, we should find a way to fix this and enable this test again
|
||||
# This part of the workflow is causing errors for forks. We should find a way to fix this and enable it again for forks.
|
||||
# Track this issue https://github.com/PX4/PX4-Autopilot/issues/24408
|
||||
#
|
||||
#post_pr_comment:
|
||||
#name: Publish Results
|
||||
#runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
#needs: [analyze_flash]
|
||||
#env:
|
||||
#V5X-SUMMARY-MAP-ABS: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-summary-map).vm-absolute) }}
|
||||
#V5X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-summary-map).vm-percentage) }}
|
||||
#V6X-SUMMARY-MAP-ABS: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-absolute) }}
|
||||
#V6X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-percentage) }}
|
||||
#if: ${{ github.event.pull_request }}
|
||||
#steps:
|
||||
#- name: Find Comment
|
||||
#uses: peter-evans/find-comment@v3
|
||||
#id: fc
|
||||
#with:
|
||||
#issue-number: ${{ github.event.pull_request.number }}
|
||||
#comment-author: 'github-actions[bot]'
|
||||
#body-includes: FLASH Analysis
|
||||
post_pr_comment:
|
||||
name: Publish Results
|
||||
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
needs: [analyze_flash]
|
||||
env:
|
||||
V5X-SUMMARY-MAP-ABS: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-summary-map).vm-absolute) }}
|
||||
V5X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-summary-map).vm-percentage) }}
|
||||
V6X-SUMMARY-MAP-ABS: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-absolute) }}
|
||||
V6X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-percentage) }}
|
||||
if: github.event.pull_request && github.event.pull_request.head.repo.full_name == github.repository
|
||||
steps:
|
||||
- name: Find Comment
|
||||
uses: peter-evans/find-comment@v3
|
||||
id: fc
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
comment-author: 'github-actions[bot]'
|
||||
body-includes: FLASH Analysis
|
||||
|
||||
#- name: Set Build Time
|
||||
#id: bt
|
||||
#run: |
|
||||
#echo "timestamp=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT
|
||||
- name: Set Build Time
|
||||
id: bt
|
||||
run: |
|
||||
echo "timestamp=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT
|
||||
|
||||
#- name: Create or update comment
|
||||
## This can't be moved to the job-level conditions, as GH actions don't allow a job-level if condition to access the env.
|
||||
#if: |
|
||||
#steps.fc.outputs.comment-id != '' ||
|
||||
#env.V5X-SUMMARY-MAP-ABS >= fromJSON(env.MIN_FLASH_POS_DIFF_FOR_COMMENT) ||
|
||||
#env.V5X-SUMMARY-MAP-ABS <= fromJSON(env.MIN_FLASH_NEG_DIFF_FOR_COMMENT) ||
|
||||
#env.V6X-SUMMARY-MAP-ABS >= fromJSON(env.MIN_FLASH_POS_DIFF_FOR_COMMENT) ||
|
||||
#env.V6X-SUMMARY-MAP-ABS <= fromJSON(env.MIN_FLASH_NEG_DIFF_FOR_COMMENT)
|
||||
#uses: peter-evans/create-or-update-comment@v4
|
||||
#with:
|
||||
#comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
#issue-number: ${{ github.event.pull_request.number }}
|
||||
#body: |
|
||||
### 🔎 FLASH Analysis
|
||||
#<details>
|
||||
#<summary>px4_fmu-v5x [Total VM Diff: ${{ env.V5X-SUMMARY-MAP-ABS }} byte (${{ env.V5X-SUMMARY-MAP-PERC}} %)]</summary>
|
||||
- name: Create or update comment
|
||||
# This can't be moved to the job-level conditions, as GH actions don't allow a job-level if condition to access the env.
|
||||
if: |
|
||||
steps.fc.outputs.comment-id != '' ||
|
||||
env.V5X-SUMMARY-MAP-ABS >= fromJSON(env.MIN_FLASH_POS_DIFF_FOR_COMMENT) ||
|
||||
env.V5X-SUMMARY-MAP-ABS <= fromJSON(env.MIN_FLASH_NEG_DIFF_FOR_COMMENT) ||
|
||||
env.V6X-SUMMARY-MAP-ABS >= fromJSON(env.MIN_FLASH_POS_DIFF_FOR_COMMENT) ||
|
||||
env.V6X-SUMMARY-MAP-ABS <= fromJSON(env.MIN_FLASH_NEG_DIFF_FOR_COMMENT)
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
## 🔎 FLASH Analysis
|
||||
<details>
|
||||
<summary>px4_fmu-v5x [Total VM Diff: ${{ env.V5X-SUMMARY-MAP-ABS }} byte (${{ env.V5X-SUMMARY-MAP-PERC}} %)]</summary>
|
||||
|
||||
#```
|
||||
#${{ needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-output }}
|
||||
#```
|
||||
#</details>
|
||||
```
|
||||
${{ needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-output }}
|
||||
```
|
||||
</details>
|
||||
|
||||
#<details>
|
||||
#<summary>px4_fmu-v6x [Total VM Diff: ${{ env.V6X-SUMMARY-MAP-ABS }} byte (${{ env.V6X-SUMMARY-MAP-PERC }} %)]</summary>
|
||||
<details>
|
||||
<summary>px4_fmu-v6x [Total VM Diff: ${{ env.V6X-SUMMARY-MAP-ABS }} byte (${{ env.V6X-SUMMARY-MAP-PERC }} %)]</summary>
|
||||
|
||||
#```
|
||||
#${{ needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-output }}
|
||||
#```
|
||||
#</details>
|
||||
```
|
||||
${{ needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-output }}
|
||||
```
|
||||
</details>
|
||||
|
||||
#**Updated: _${{ steps.bt.outputs.timestamp }}_**
|
||||
#edit-mode: replace
|
||||
**Updated: _${{ steps.bt.outputs.timestamp }}_**
|
||||
edit-mode: replace
|
||||
|
||||
@@ -127,7 +127,7 @@ jobs:
|
||||
path: |
|
||||
logs/**/**/**/*.log
|
||||
logs/**/**/**/*.ulg
|
||||
build/px4_sitl_default/tmp_mavsdk_tests/rootfs/*.ulg
|
||||
build/px4_sitl_default/tmp_mavsdk_tests/rootfs/log/**/*.ulg
|
||||
|
||||
- name: Look at Core files
|
||||
if: failure() && ${{ hashFiles('px4.core') != '' }}
|
||||
|
||||
@@ -35,8 +35,11 @@ add_subdirectory(airframes)
|
||||
|
||||
px4_add_romfs_files(
|
||||
px4-rc.mavlink
|
||||
px4-rc.params
|
||||
px4-rc.simulator
|
||||
px4-rc.gzsim
|
||||
px4-rc.jmavsim
|
||||
px4-rc.mavlinksim
|
||||
px4-rc.sihsim
|
||||
rc.replay
|
||||
rcS
|
||||
)
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
echo "INFO [init] Gazebo simulator"
|
||||
|
||||
# Enforce minimum gz version as Harmonic (gz-sim8)
|
||||
MIN_GZ_VERSION="8.0.0"
|
||||
GZ_SIM_VERSION=$(gz sim --versions 2>/dev/null | head -n 1 | tr -d ' ')
|
||||
|
||||
if [ -z "$GZ_SIM_VERSION" ]; then
|
||||
echo "ERROR [init] Gazebo gz sim not found. Please install gz-harmonic"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use sort compare, check that MIN_GZ_VERSION is ordered last
|
||||
if [ "$(printf '%s\n' "$GZ_SIM_VERSION" "$MIN_GZ_VERSION" | sort -V | head -n1)" = "$MIN_GZ_VERSION" ]; then
|
||||
gz_command="gz"
|
||||
gz_sub_command="sim"
|
||||
|
||||
# Specify render engine if `GZ_SIM_RENDER_ENGINE` is set
|
||||
# (for example, if you want to use Ogre 1.x instead of Ogre 2.x):
|
||||
if [ -n "${PX4_GZ_SIM_RENDER_ENGINE}" ]; then
|
||||
echo "INFO [init] Setting Gazebo render engine to '${PX4_GZ_SIM_RENDER_ENGINE}'!"
|
||||
gz_sub_command="${gz_sub_command} --render-engine ${PX4_GZ_SIM_RENDER_ENGINE}"
|
||||
fi
|
||||
else
|
||||
echo "ERROR [init] Gazebo gz sim version is too old ($GZ_SIM_VERSION). Minimum required version is $MIN_GZ_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If not standalone
|
||||
if [ -z "${PX4_GZ_STANDALONE}" ]; then
|
||||
|
||||
# Look for an already running world
|
||||
gz_world=$( ${gz_command} topic -l | grep -m 1 -e "^/world/.*/clock" | sed 's/\/world\///g; s/\/clock//g' )
|
||||
|
||||
# shellcheck disable=SC2153
|
||||
if [ -z "${gz_world}" ] && [ -n "${PX4_GZ_WORLD}" ]; then
|
||||
|
||||
# Setup gz environment variables
|
||||
if [ -f ./gz_env.sh ]; then
|
||||
. ./gz_env.sh
|
||||
|
||||
elif [ -f ../gz_env.sh ]; then
|
||||
. ../gz_env.sh
|
||||
fi
|
||||
|
||||
echo "INFO [init] Starting gazebo with world: ${PX4_GZ_WORLDS}/${PX4_GZ_WORLD}.sdf"
|
||||
|
||||
${gz_command} ${gz_sub_command} --verbose=${GZ_VERBOSE:=1} -r -s "${PX4_GZ_WORLDS}/${PX4_GZ_WORLD}.sdf" &
|
||||
|
||||
if [ -z "${HEADLESS}" ]; then
|
||||
echo "INFO [init] Starting gz gui"
|
||||
${gz_command} ${gz_sub_command} -g > /dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
else
|
||||
# Gazebo is already running
|
||||
echo "INFO [init] gazebo already running world: ${gz_world}"
|
||||
PX4_GZ_WORLD=${gz_world}
|
||||
fi
|
||||
|
||||
else
|
||||
echo "INFO [init] Standalone PX4 launch, waiting for Gazebo"
|
||||
fi
|
||||
|
||||
# Wait for Gazebo world to be ready before proceeding
|
||||
check_scene_info() {
|
||||
SERVICE_INFO=$(${gz_command} service -i --service "/world/${PX4_GZ_WORLD}/scene/info" 2>&1)
|
||||
if echo "$SERVICE_INFO" | grep -q "Service providers"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
ATTEMPTS=30
|
||||
while [ $ATTEMPTS -gt 0 ]; do
|
||||
if check_scene_info; then
|
||||
echo "INFO [init] Gazebo world is ready"
|
||||
break
|
||||
fi
|
||||
ATTEMPTS=$((ATTEMPTS-1))
|
||||
if [ $ATTEMPTS -eq 0 ]; then
|
||||
echo "ERROR [init] Timed out waiting for Gazebo world"
|
||||
exit 1
|
||||
fi
|
||||
echo "INFO [init] Waiting for Gazebo world..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Start gz_bridge - either spawn a model or connect to existing one
|
||||
if [ -n "${PX4_SIM_MODEL#*gz_}" ] && [ -z "${PX4_GZ_MODEL_NAME}" ]; then
|
||||
# Spawn a model
|
||||
MODEL_NAME="${PX4_SIM_MODEL#*gz_}"
|
||||
MODEL_NAME_INSTANCE="${MODEL_NAME}_${px4_instance}"
|
||||
|
||||
POSE_ARG=""
|
||||
if [ -n "${PX4_GZ_MODEL_POSE}" ]; then
|
||||
pos_x=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $1}')
|
||||
pos_y=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $2}')
|
||||
pos_z=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $3}')
|
||||
pos_x=${pos_x:-0}
|
||||
pos_y=${pos_y:-0}
|
||||
pos_z=${pos_z:-0}
|
||||
|
||||
POSE_ARG=", pose: { position: { x: ${pos_x}, y: ${pos_y}, z: ${pos_z} } }"
|
||||
echo "INFO [init] Spawning model at position: ${pos_x} ${pos_y} ${pos_z}"
|
||||
fi
|
||||
|
||||
echo "INFO [init] Spawning model"
|
||||
|
||||
# Spawn model
|
||||
${gz_command} service -s "/world/${PX4_GZ_WORLD}/create" --reqtype gz.msgs.EntityFactory \
|
||||
--reptype gz.msgs.Boolean --timeout 5000 \
|
||||
--req "sdf_filename: \"${PX4_GZ_MODELS}/${MODEL_NAME}/model.sdf\", name: \"${MODEL_NAME_INSTANCE}\", allow_renaming: false${POSE_ARG}" > /dev/null 2>&1
|
||||
|
||||
# Wait for model to spawn
|
||||
sleep 1
|
||||
|
||||
# Start gz_bridge
|
||||
if ! gz_bridge start -w "${PX4_GZ_WORLD}" -n "${MODEL_NAME_INSTANCE}"; then
|
||||
echo "ERROR [init] gz_bridge failed to start and spawn model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set physics parameters for faster-than-realtime simulation if needed
|
||||
if [ -n "${PX4_SIM_SPEED_FACTOR}" ]; then
|
||||
echo "INFO [init] Setting simulation speed factor: ${PX4_SIM_SPEED_FACTOR}"
|
||||
${gz_command} service -s "/world/${PX4_GZ_WORLD}/set_physics" --reqtype gz.msgs.Physics \
|
||||
--reptype gz.msgs.Boolean --timeout 5000 \
|
||||
--req "real_time_factor: ${PX4_SIM_SPEED_FACTOR}" > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Set up camera to follow the model if requested
|
||||
if [ -n "${PX4_GZ_FOLLOW}" ]; then
|
||||
|
||||
echo "INFO [init] Setting camera to follow ${MODEL_NAME_INSTANCE}"
|
||||
|
||||
# Set camera to follow the model
|
||||
${gz_command} service -s "/gui/follow" --reqtype gz.msgs.StringMsg \
|
||||
--reptype gz.msgs.Boolean --timeout 5000 \
|
||||
--req "data: \"${MODEL_NAME_INSTANCE}\"" > /dev/null 2>&1
|
||||
|
||||
# Set default camera offset if not specified
|
||||
follow_x=${PX4_GZ_FOLLOW_OFFSET_X:--2.0}
|
||||
follow_y=${PX4_GZ_FOLLOW_OFFSET_Y:--2.0}
|
||||
follow_z=${PX4_GZ_FOLLOW_OFFSET_Z:-2.0}
|
||||
|
||||
# Set camera offset
|
||||
${gz_command} service -s "/gui/follow/offset" --reqtype gz.msgs.Vector3d \
|
||||
--reptype gz.msgs.Boolean --timeout 5000 \
|
||||
--req "x: ${follow_x}, y: ${follow_y}, z: ${follow_z}" > /dev/null 2>&1
|
||||
|
||||
echo "INFO [init] Camera follow offset set to ${follow_x}, ${follow_y}, ${follow_z}"
|
||||
fi
|
||||
|
||||
elif [ -n "${PX4_GZ_MODEL_NAME}" ]; then
|
||||
# Connect to existing model
|
||||
echo "INFO [init] PX4_GZ_MODEL_NAME set, PX4 will attach to existing model"
|
||||
if ! gz_bridge start -w "${PX4_GZ_WORLD}" -n "${PX4_GZ_MODEL_NAME}"; then
|
||||
echo "ERROR [init] gz_bridge failed to start and attach to existing model"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "ERROR [init] failed to pass either PX4_GZ_MODEL_NAME or PX4_SIM_MODEL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# NOTE: Only for rover_mecanum and spacecraft_2d. All other models have
|
||||
# the magnetometer sensor in the model.sdf.
|
||||
if param compare -s SENS_EN_MAGSIM 1
|
||||
then
|
||||
sensor_mag_sim start
|
||||
fi
|
||||
# NOTE: new gz has airspeed sensor, remove once added
|
||||
if param compare -s SENS_EN_ARSPDSIM 1
|
||||
then
|
||||
sensor_airspeed_sim start
|
||||
fi
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
echo "INFO [init] jMAVSim simulator"
|
||||
|
||||
if jps | grep -i jmavsim; then
|
||||
kill "$(jps | grep -i jmavsim | awk '{print $1}')" || true
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
param set IMU_INTEG_RATE 250
|
||||
./jmavsim_run.sh -l -r 250 &
|
||||
|
||||
simulator_mavlink start -h localhost $((4560+px4_instance))
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
# EKF2 specifics
|
||||
param set-default EKF2_GPS_DELAY 10
|
||||
param set-default EKF2_MULTI_IMU 3
|
||||
param set-default SENS_IMU_MODE 0
|
||||
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
|
||||
# Check if PX4_SIM_HOSTNAME environment variable is empty
|
||||
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty
|
||||
# If both are empty use localhost for simulator
|
||||
if [ -z "${PX4_SIM_HOSTNAME}" ]; then
|
||||
|
||||
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then
|
||||
echo "INFO [init] PX4_SIM_HOSTNAME: localhost"
|
||||
simulator_mavlink start -c $simulator_tcp_port
|
||||
else
|
||||
echo "INFO [init] PX4_SIM_HOSTNAME: ${PX4_SIM_HOST_ADDR}"
|
||||
simulator_mavlink start -t "${PX4_SIM_HOST_ADDR}" "${simulator_tcp_port}"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "INFO [init] PX4_SIM_HOSTNAME: ${PX4_SIM_HOSTNAME}"
|
||||
simulator_mavlink start -h "${PX4_SIM_HOSTNAME}" "${simulator_tcp_port}"
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
#param set-default MAV_SYS_ID $((px4_instance+1))
|
||||
#param set-default IMU_INTEG_RATE 250
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "INFO [init] SIH simulator"
|
||||
|
||||
if [ -n "${PX4_HOME_LAT}" ]; then
|
||||
param set SIH_LOC_LAT0 ${PX4_HOME_LAT}
|
||||
fi
|
||||
|
||||
if [ -n "${PX4_HOME_LON}" ]; then
|
||||
param set SIH_LOC_LON0 ${PX4_HOME_LON}
|
||||
fi
|
||||
if [ -n "${PX4_HOME_ALT}" ]; then
|
||||
param set SIH_LOC_H0 ${PX4_HOME_ALT}
|
||||
fi
|
||||
|
||||
if simulator_sih start; then
|
||||
|
||||
if param compare -s SENS_EN_BAROSIM 1
|
||||
then
|
||||
sensor_baro_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_GPSSIM 1
|
||||
then
|
||||
sensor_gps_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_MAGSIM 1
|
||||
then
|
||||
sensor_mag_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_AGPSIM 1
|
||||
then
|
||||
sensor_agp_sim start
|
||||
fi
|
||||
|
||||
else
|
||||
echo "ERROR [init] simulator_sih failed to start"
|
||||
exit 1
|
||||
fi
|
||||
@@ -8,268 +8,18 @@ param set-default IMU_INTEG_RATE 250
|
||||
param set-default COM_MODE_ARM_CHK 1
|
||||
|
||||
if [ "$PX4_SIMULATOR" = "sihsim" ] || [ "$(param show -q SYS_AUTOSTART)" -eq "0" ]; then
|
||||
|
||||
echo "INFO [init] SIH simulator"
|
||||
|
||||
if [ -n "${PX4_HOME_LAT}" ]; then
|
||||
param set SIH_LOC_LAT0 ${PX4_HOME_LAT}
|
||||
fi
|
||||
|
||||
if [ -n "${PX4_HOME_LON}" ]; then
|
||||
param set SIH_LOC_LON0 ${PX4_HOME_LON}
|
||||
fi
|
||||
if [ -n "${PX4_HOME_ALT}" ]; then
|
||||
param set SIH_LOC_H0 ${PX4_HOME_ALT}
|
||||
fi
|
||||
|
||||
if simulator_sih start; then
|
||||
|
||||
if param compare -s SENS_EN_BAROSIM 1
|
||||
then
|
||||
sensor_baro_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_GPSSIM 1
|
||||
then
|
||||
sensor_gps_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_MAGSIM 1
|
||||
then
|
||||
sensor_mag_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_AGPSIM 1
|
||||
then
|
||||
sensor_agp_sim start
|
||||
fi
|
||||
|
||||
else
|
||||
echo "ERROR [init] simulator_sih failed to start"
|
||||
exit 1
|
||||
fi
|
||||
# Run SIH
|
||||
. px4-rc.sihsim
|
||||
|
||||
elif [ "$PX4_SIMULATOR" = "gz" ] || [ "$(param show -q SIM_GZ_EN)" = "1" ]; then
|
||||
# Use Gazebo
|
||||
|
||||
echo "INFO [init] Gazebo simulator"
|
||||
|
||||
# Only start up Gazebo if PX4_GZ_STANDALONE is not set.
|
||||
if [ -z "${PX4_GZ_STANDALONE}" ]; then
|
||||
|
||||
# "gz sim" only available in Garden and later
|
||||
GZ_SIM_VERSIONS=$(gz sim --versions 2>&1)
|
||||
if [ $? -eq 0 ] && [ "${GZ_SIM_VERSIONS}" != "" ]
|
||||
then
|
||||
# "gz sim" from Garden on
|
||||
gz_command="gz"
|
||||
gz_sub_command="sim"
|
||||
|
||||
# Specify render engine if `GZ_SIM_RENDER_ENGINE` is set
|
||||
# (for example, if you want to use Ogre 1.x instead of Ogre 2.x):
|
||||
if [ -n "${PX4_GZ_SIM_RENDER_ENGINE}" ]; then
|
||||
echo "INFO [init] Setting Gazebo render engine to '${PX4_GZ_SIM_RENDER_ENGINE}'!"
|
||||
gz_sub_command="${gz_sub_command} --render-engine ${PX4_GZ_SIM_RENDER_ENGINE}"
|
||||
fi
|
||||
else
|
||||
echo "ERROR [init] Gazebo gz please install gz-garden"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Look for an already running world
|
||||
gz_world=$( ${gz_command} topic -l | grep -m 1 -e "^/world/.*/clock" | sed 's/\/world\///g; s/\/clock//g' )
|
||||
|
||||
# shellcheck disable=SC2153
|
||||
if [ -z "${gz_world}" ] && [ -n "${PX4_GZ_WORLD}" ]; then
|
||||
|
||||
# Setup gz environment variables
|
||||
if [ -f ./gz_env.sh ]; then
|
||||
. ./gz_env.sh
|
||||
|
||||
elif [ -f ../gz_env.sh ]; then
|
||||
. ../gz_env.sh
|
||||
fi
|
||||
|
||||
echo "INFO [init] Starting gazebo with world: ${PX4_GZ_WORLDS}/${PX4_GZ_WORLD}.sdf"
|
||||
|
||||
${gz_command} ${gz_sub_command} --verbose=${GZ_VERBOSE:=1} -r -s "${PX4_GZ_WORLDS}/${PX4_GZ_WORLD}.sdf" &
|
||||
|
||||
if [ -z "${HEADLESS}" ]; then
|
||||
echo "INFO [init] Starting gz gui"
|
||||
${gz_command} ${gz_sub_command} -g > /dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
# Wait for Gazebo world to be ready before proceeding
|
||||
check_scene_info() {
|
||||
SERVICE_INFO=$(${gz_command} service -i --service "/world/${PX4_GZ_WORLD}/scene/info" 2>&1)
|
||||
if echo "$SERVICE_INFO" | grep -q "Service providers"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
ATTEMPTS=30
|
||||
while [ $ATTEMPTS -gt 0 ]; do
|
||||
if check_scene_info; then
|
||||
echo "INFO [init] Gazebo world is ready"
|
||||
break
|
||||
fi
|
||||
ATTEMPTS=$((ATTEMPTS-1))
|
||||
if [ $ATTEMPTS -eq 0 ]; then
|
||||
echo "ERROR [init] Timed out waiting for Gazebo world"
|
||||
exit 1
|
||||
fi
|
||||
echo "INFO [init] Waiting for Gazebo world..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
else
|
||||
# Gazebo is already running
|
||||
echo "INFO [init] gazebo already running world: ${gz_world}"
|
||||
PX4_GZ_WORLD=${gz_world}
|
||||
fi
|
||||
|
||||
else
|
||||
echo "INFO [init] Standalone PX4 launch, waiting for Gazebo"
|
||||
fi
|
||||
|
||||
# Start gz_bridge - either spawn a model or connect to existing one
|
||||
if [ -n "${PX4_SIM_MODEL#*gz_}" ] && [ -z "${PX4_GZ_MODEL_NAME}" ]; then
|
||||
# Spawn a model
|
||||
MODEL_NAME="${PX4_SIM_MODEL#*gz_}"
|
||||
MODEL_NAME_INSTANCE="${MODEL_NAME}_${px4_instance}"
|
||||
|
||||
POSE_ARG=""
|
||||
if [ -n "${PX4_GZ_MODEL_POSE}" ]; then
|
||||
pos_x=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $1}')
|
||||
pos_y=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $2}')
|
||||
pos_z=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $3}')
|
||||
pos_x=${pos_x:-0}
|
||||
pos_y=${pos_y:-0}
|
||||
pos_z=${pos_z:-0}
|
||||
|
||||
POSE_ARG=", pose: { position: { x: ${pos_x}, y: ${pos_y}, z: ${pos_z} } }"
|
||||
echo "INFO [init] Spawning model at position: ${pos_x} ${pos_y} ${pos_z}"
|
||||
fi
|
||||
|
||||
echo "INFO [init] Spawning model"
|
||||
|
||||
# Spawn model
|
||||
${gz_command} service -s "/world/${PX4_GZ_WORLD}/create" --reqtype gz.msgs.EntityFactory \
|
||||
--reptype gz.msgs.Boolean --timeout 5000 \
|
||||
--req "sdf_filename: \"${PX4_GZ_MODELS}/${MODEL_NAME}/model.sdf\", name: \"${MODEL_NAME_INSTANCE}\", allow_renaming: false${POSE_ARG}" > /dev/null 2>&1
|
||||
|
||||
# Wait for model to spawn
|
||||
sleep 1
|
||||
|
||||
# Start gz_bridge
|
||||
if ! gz_bridge start -w "${PX4_GZ_WORLD}" -n "${MODEL_NAME_INSTANCE}"; then
|
||||
echo "ERROR [init] gz_bridge failed to start and spawn model"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set physics parameters for faster-than-realtime simulation if needed
|
||||
if [ -n "${PX4_SIM_SPEED_FACTOR}" ]; then
|
||||
echo "INFO [init] Setting simulation speed factor: ${PX4_SIM_SPEED_FACTOR}"
|
||||
${gz_command} service -s "/world/${PX4_GZ_WORLD}/set_physics" --reqtype gz.msgs.Physics \
|
||||
--reptype gz.msgs.Boolean --timeout 5000 \
|
||||
--req "real_time_factor: ${PX4_SIM_SPEED_FACTOR}" > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Set up camera to follow the model if requested
|
||||
if [ -n "${PX4_GZ_FOLLOW}" ]; then
|
||||
|
||||
echo "INFO [init] Setting camera to follow ${MODEL_NAME_INSTANCE}"
|
||||
|
||||
# Set camera to follow the model
|
||||
${gz_command} service -s "/gui/follow" --reqtype gz.msgs.StringMsg \
|
||||
--reptype gz.msgs.Boolean --timeout 5000 \
|
||||
--req "data: \"${MODEL_NAME_INSTANCE}\"" > /dev/null 2>&1
|
||||
|
||||
# Set default camera offset if not specified
|
||||
follow_x=${PX4_GZ_FOLLOW_OFFSET_X:--2.0}
|
||||
follow_y=${PX4_GZ_FOLLOW_OFFSET_Y:--2.0}
|
||||
follow_z=${PX4_GZ_FOLLOW_OFFSET_Z:-2.0}
|
||||
|
||||
# Set camera offset
|
||||
${gz_command} service -s "/gui/follow/offset" --reqtype gz.msgs.Vector3d \
|
||||
--reptype gz.msgs.Boolean --timeout 5000 \
|
||||
--req "x: ${follow_x}, y: ${follow_y}, z: ${follow_z}" > /dev/null 2>&1
|
||||
|
||||
echo "INFO [init] Camera follow offset set to ${follow_x}, ${follow_y}, ${follow_z}"
|
||||
fi
|
||||
|
||||
elif [ -n "${PX4_GZ_MODEL_NAME}" ]; then
|
||||
# Connect to existing model
|
||||
echo "INFO [init] PX4_GZ_MODEL_NAME set, PX4 will attach to existing model"
|
||||
if ! gz_bridge start -w "${PX4_GZ_WORLD}" -n "${PX4_GZ_MODEL_NAME}"; then
|
||||
echo "ERROR [init] gz_bridge failed to start and attach to existing model"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "ERROR [init] failed to pass either PX4_GZ_MODEL_NAME or PX4_SIM_MODEL"
|
||||
exit 1
|
||||
fi
|
||||
# Start the sensor simulator modules
|
||||
if param compare -s SENS_EN_BAROSIM 1
|
||||
then
|
||||
sensor_baro_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_GPSSIM 1
|
||||
then
|
||||
sensor_gps_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_MAGSIM 1
|
||||
then
|
||||
sensor_mag_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_ARSPDSIM 1
|
||||
then
|
||||
sensor_airspeed_sim start
|
||||
fi
|
||||
if param compare -s SENS_EN_AGPSIM 1
|
||||
then
|
||||
sensor_agp_sim start
|
||||
fi
|
||||
# Run Gazebo (gz)
|
||||
. px4-rc.gzsim
|
||||
|
||||
elif [ "$PX4_SIM_MODEL" = "jmavsim_iris" ] || [ "$(param show -q SYS_AUTOSTART)" -eq "10017" ]; then
|
||||
|
||||
echo "INFO [init] jMAVSim simulator"
|
||||
|
||||
if jps | grep -i jmavsim; then
|
||||
kill "$(jps | grep -i jmavsim | awk '{print $1}')" || true
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
param set IMU_INTEG_RATE 250
|
||||
./jmavsim_run.sh -l -r 250 &
|
||||
|
||||
simulator_mavlink start -h localhost $((4560+px4_instance))
|
||||
# Run jMAVSim
|
||||
. px4-rc.jmavsim
|
||||
|
||||
else
|
||||
# otherwise start simulator (mavlink) module
|
||||
|
||||
# EKF2 specifics
|
||||
param set-default EKF2_GPS_DELAY 10
|
||||
param set-default EKF2_MULTI_IMU 3
|
||||
param set-default SENS_IMU_MODE 0
|
||||
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
|
||||
# Check if PX4_SIM_HOSTNAME environment variable is empty
|
||||
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty
|
||||
# If both are empty use localhost for simulator
|
||||
if [ -z "${PX4_SIM_HOSTNAME}" ]; then
|
||||
|
||||
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then
|
||||
echo "INFO [init] PX4_SIM_HOSTNAME: localhost"
|
||||
simulator_mavlink start -c $simulator_tcp_port
|
||||
else
|
||||
echo "INFO [init] PX4_SIM_HOSTNAME: ${PX4_SIM_HOST_ADDR}"
|
||||
simulator_mavlink start -t "${PX4_SIM_HOST_ADDR}" "${simulator_tcp_port}"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "INFO [init] PX4_SIM_HOSTNAME: ${PX4_SIM_HOSTNAME}"
|
||||
simulator_mavlink start -h "${PX4_SIM_HOSTNAME}" "${simulator_tcp_port}"
|
||||
fi
|
||||
|
||||
# Run simulator_mavlink module for interface with gazebo-classic
|
||||
. px4-rc.mavlinksim
|
||||
fi
|
||||
|
||||
@@ -227,9 +227,6 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#user defined params for instances can be in PATH
|
||||
. px4-rc.params
|
||||
|
||||
dataman start
|
||||
|
||||
# only start the simulator if not in replay mode, as both control the lockstep time
|
||||
|
||||
+3
-3
@@ -59,7 +59,7 @@ from sys import platform as _platform
|
||||
|
||||
def get_version():
|
||||
"""
|
||||
Get PX4 Firmware latest Git tag.
|
||||
Get PX4-Autopilot Latest Git Tag.
|
||||
"""
|
||||
px4_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@@ -74,7 +74,7 @@ def get_version():
|
||||
exit(1)
|
||||
else:
|
||||
# Else, get it from remote repo tags (requires network access)
|
||||
cmd = "git ls-remote --tags git://github.com/PX4/Firmware.git | cut -d/ -f3- | sort -n -t. -k1,1 -k2,2 -k3,3 | awk '/^v[^{]*$/{version=$1}END{print version}'"
|
||||
cmd = "git ls-remote --tags git@github.com:PX4/PX4-Autopilot.git | cut -d/ -f3- | sort -n -t. -k1,1 -k2,2 -k3,3 | awk '/^v[^{]*$/{version=$1}END{print version}'"
|
||||
|
||||
try:
|
||||
version = subprocess.check_output(
|
||||
@@ -94,7 +94,7 @@ else:
|
||||
|
||||
|
||||
def main():
|
||||
print("PX4 release", get_version())
|
||||
print("PX4 Release", get_version())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
+1
-1
Submodule Tools/simulation/gz updated: 6c18846a4c...6caa6d54fa
@@ -70,7 +70,7 @@ export JSBSIM_AIRCRAFT_MODEL="$MODEL_NAME"
|
||||
if [[ -n "$HEADLESS" ]]; then
|
||||
echo "not running flightgear gui"
|
||||
else
|
||||
export FG_AIRCRAFT="${SRC_DIR}/Tools/simulation/jsbsim/jsbsim_bridge/models"
|
||||
export FG_AIRCRAFT="${src_path}/Tools/simulation/jsbsim/jsbsim_bridge/models"
|
||||
|
||||
$FG_BINARY --fdm=null \
|
||||
--native-fdm=socket,in,60,,5550,udp \
|
||||
|
||||
@@ -15,6 +15,7 @@ CONFIG_BOARD_UAVCAN_INTERFACES=1
|
||||
CONFIG_DRIVERS_UAVCANNODE=y
|
||||
CONFIG_UAVCANNODE_FLOW_MEASUREMENT=y
|
||||
CONFIG_UAVCANNODE_RANGE_SENSOR_MEASUREMENT=y
|
||||
CONFIG_UAVCANNODE_RAW_IMU=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
# CONFIG_SENSORS_VEHICLE_AIRSPEED is not set
|
||||
|
||||
@@ -20,6 +20,7 @@ CONFIG_UAVCANNODE_MAGNETIC_FIELD_STRENGTH=y
|
||||
CONFIG_UAVCANNODE_SAFETY_BUTTON=y
|
||||
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
|
||||
CONFIG_UAVCANNODE_RAW_IMU=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
|
||||
@@ -21,6 +21,7 @@ CONFIG_UAVCANNODE_RTK_DATA=y
|
||||
CONFIG_UAVCANNODE_SAFETY_BUTTON=y
|
||||
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
|
||||
CONFIG_UAVCANNODE_RAW_IMU=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
|
||||
@@ -36,6 +36,7 @@ CONFIG_UAVCANNODE_LIGHTS_COMMAND=y
|
||||
CONFIG_UAVCANNODE_MAGNETIC_FIELD_STRENGTH=y
|
||||
CONFIG_UAVCANNODE_RANGE_SENSOR_MEASUREMENT=y
|
||||
CONFIG_UAVCANNODE_RAW_AIR_DATA=y
|
||||
CONFIG_UAVCANNODE_RAW_IMU=y
|
||||
CONFIG_UAVCANNODE_RTK_DATA=y
|
||||
CONFIG_UAVCANNODE_SERVO_ARRAY_COMMAND=y
|
||||
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
|
||||
@@ -66,6 +66,7 @@ CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
|
||||
@@ -17,6 +17,7 @@ CONFIG_UAVCANNODE_GNSS_FIX=y
|
||||
CONFIG_UAVCANNODE_LIGHTS_COMMAND=y
|
||||
CONFIG_UAVCANNODE_MAGNETIC_FIELD_STRENGTH=y
|
||||
CONFIG_UAVCANNODE_RTK_DATA=y
|
||||
CONFIG_UAVCANNODE_RAW_IMU=y
|
||||
CONFIG_UAVCANNODE_SAFETY_BUTTON=y
|
||||
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
#define BOARD_ARMED_STATE_LED LED_BLUE
|
||||
|
||||
#define FLASH_BASED_PARAMS
|
||||
#define RAM_BASED_MISSIONS
|
||||
|
||||
// Hacks for MAVLink RC button input
|
||||
#define ATL_MANTIS_RC_INPUT_HACKS
|
||||
|
||||
@@ -65,6 +65,7 @@ CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
|
||||
@@ -66,6 +66,7 @@ CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
|
||||
@@ -63,6 +63,7 @@ CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
|
||||
@@ -63,6 +63,7 @@ CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
|
||||
@@ -63,6 +63,7 @@ CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
|
||||
@@ -152,16 +152,11 @@ void task_main(int argc, char *argv[])
|
||||
newbytes = read(uart_fd, &rx_buf[0], sizeof(rx_buf));
|
||||
#endif
|
||||
|
||||
uint8_t protocol_version = rx_buf[1] & 0x0F;
|
||||
|
||||
if (newbytes <= 0) {
|
||||
if (print_msg) { PX4_INFO("Spektrum RC: Read no bytes from UART"); }
|
||||
|
||||
} else if (((newbytes != DSM_FRAME_SIZE) ||
|
||||
((protocol_version != 0x02) && (protocol_version != 0x01))) &&
|
||||
(! first_correct_frame_received)) {
|
||||
PX4_ERR("Spektrum RC: Invalid DSM frame. %d bytes. Protocol byte 0x%.2x",
|
||||
newbytes, rx_buf[1]);
|
||||
} else if ((newbytes != DSM_FRAME_SIZE) && (! first_correct_frame_received)) {
|
||||
PX4_ERR("Invalid DSM frame size: %d bytes", newbytes);
|
||||
|
||||
} else {
|
||||
if (print_msg) { PX4_INFO("Spektrum RC: Read %d bytes from UART", newbytes); }
|
||||
|
||||
@@ -12,6 +12,7 @@ CONFIG_MODULES_CONTROL_ALLOCATOR=y
|
||||
CONFIG_MODULES_DATAMAN=y
|
||||
CONFIG_MODULES_EKF2=y
|
||||
CONFIG_MODULES_MAVLINK=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_SYSTEMCMDS_I2CDETECT=y
|
||||
CONFIG_SYSTEMCMDS_LED_CONTROL=y
|
||||
|
||||
@@ -64,6 +64,7 @@ CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
|
||||
@@ -65,6 +65,7 @@ CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
|
||||
@@ -76,6 +76,7 @@ CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
|
||||
@@ -77,6 +77,7 @@ CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
|
||||
@@ -41,6 +41,7 @@ CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=10000
|
||||
CONFIG_MODULES_PAYLOAD_DELIVERER=y
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_REPLAY=y
|
||||
|
||||
@@ -18,7 +18,7 @@ export default defineConfig({
|
||||
"ja/**/*.md",
|
||||
"ru/**/*.md",
|
||||
"tr/**/*.md",
|
||||
//"kr/**/*.md",
|
||||
//"ko/**/*.md",
|
||||
//"zh/**/*.md",
|
||||
//"uk/**/*.md",
|
||||
"**/_*.md", //Remove source docs that start with "_" (included/not rendered)
|
||||
@@ -156,26 +156,13 @@ export default defineConfig({
|
||||
|
||||
nav: [
|
||||
{
|
||||
text: "PX4",
|
||||
text: "Dronecode",
|
||||
items: [
|
||||
{
|
||||
text: "Website",
|
||||
text: "PX4",
|
||||
link: "https://px4.io/",
|
||||
ariaLabel: "PX4 website link",
|
||||
},
|
||||
{
|
||||
text: "Autopilot Source Code",
|
||||
link: "https://github.com/PX4/PX4-Autopilot",
|
||||
},
|
||||
{
|
||||
text: "Docs Source Code",
|
||||
link: "https://github.com/PX4/PX4-Autopilot/docs/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Dronecode",
|
||||
items: [
|
||||
{
|
||||
text: "QGroundControl",
|
||||
link: "http://qgroundcontrol.com/",
|
||||
@@ -206,7 +193,7 @@ export default defineConfig({
|
||||
text: "Version",
|
||||
items: [
|
||||
{ text: "main", link: "https://docs.px4.io/main/en/" },
|
||||
{ text: "v1.15", link: "https://docs.px4.io/v1.15/en/" },
|
||||
{ text: "v1.15 (stable)", link: "https://docs.px4.io/v1.15/en/" },
|
||||
{ text: "v1.14", link: "https://docs.px4.io/v1.14/en/" },
|
||||
{ text: "v1.13", link: "https://docs.px4.io/v1.13/en/" },
|
||||
{ text: "v1.12", link: "https://docs.px4.io/v1.12/en/" },
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"files": [
|
||||
{
|
||||
"source": "docs/en/**/*.md",
|
||||
"ignore": ["/docs/en/_sidebar.md"],
|
||||
"translation": "docs/%two_letters_code%/**/%original_file_name%"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -15215,7 +15215,7 @@ Reboot | minValue | maxValue | increment | default | unit
|
||||
|
||||
### COM_QC_ACT (`INT32`) {#COM_QC_ACT}
|
||||
|
||||
Set command after a quadchute.
|
||||
Set action after a quadchute.
|
||||
|
||||
**Values:**
|
||||
|
||||
@@ -37406,7 +37406,7 @@ Reboot | minValue | maxValue | increment | default | unit
|
||||
|
||||
Airspeed-less front transition time (open loop).
|
||||
|
||||
The duration of the front transition when there is no airspeed feedback available.
|
||||
The duration of the front transition when there is no airspeed feedback available. When airspeed is used, transition timeout is declared if airspeed does not reach VT_ARSP_BLEND after this time.
|
||||
|
||||
Reboot | minValue | maxValue | increment | default | unit
|
||||
--- | --- | --- | --- | --- | ---
|
||||
@@ -37518,7 +37518,7 @@ Reboot | minValue | maxValue | increment | default | unit
|
||||
|
||||
Front transition timeout.
|
||||
|
||||
Time in seconds after which transition will be cancelled. Disabled if set to 0.
|
||||
Time in seconds after which transition will be cancelled.
|
||||
|
||||
Reboot | minValue | maxValue | increment | default | unit
|
||||
--- | --- | --- | --- | --- | ---
|
||||
|
||||
+24
-16
@@ -40,13 +40,13 @@ To make sure the vehicle is stable enough for auto-tuning:
|
||||
|
||||
1. Perform a normal preflight safety checklist to ensure the flight zone is clear and has enough space.
|
||||
|
||||
1. Take off and <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">hover at 1m above ground in [Altitude mode](../flight_modes_mc/altitude.md) or [Stabilized mode](../flight_modes_mc/manual_stabilized.md)</div><div style="display: inline;" v-else-if="$frontmatter.frame === 'Plane'">fly at cruise speed in [Position mode](../flight_modes_fw/position.md) or [Altitude mode](../flight_modes_fw/altitude.md)</div>.
|
||||
2. Take off and <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">hover at 1m above ground in [Altitude mode](../flight_modes_mc/altitude.md) or [Stabilized mode](../flight_modes_mc/manual_stabilized.md)</div><div style="display: inline;" v-else-if="$frontmatter.frame === 'Plane'">fly at cruise speed in [Position mode](../flight_modes_fw/position.md) or [Altitude mode](../flight_modes_fw/altitude.md)</div>.
|
||||
|
||||
1. Use the RC transmitter roll stick to perform the following maneuver, tilting the vehicle just a few degrees: _roll left > roll right > center_ (The whole maneuver should take about 3 seconds).
|
||||
3. Use the RC transmitter roll stick to perform the following maneuver, tilting the vehicle just a few degrees: _roll left > roll right > center_ (The whole maneuver should take about 3 seconds).
|
||||
The vehicle should stabilise itself within 2 oscillations.
|
||||
1. Repeat the maneuver, tilting with larger amplitudes at each attempt.
|
||||
4. Repeat the maneuver, tilting with larger amplitudes at each attempt.
|
||||
If the vehicle can stabilise itself within 2 oscillations at ~20 degrees move to the next step.
|
||||
1. Repeat the same maneuvers but on the pitch axis.
|
||||
5. Repeat the same maneuvers but on the pitch axis.
|
||||
As above, start with small angles and confirm that the vehicle can stabilise itself within 2 oscillations before increasing the tilt.
|
||||
|
||||
If the drone can stabilize itself within 2 oscillations it is ready for the [auto-tuning procedure](#auto-tuning-procedure).
|
||||
@@ -69,12 +69,12 @@ The test steps are:
|
||||
|
||||
1. Perform the [pre-tuning test](#pre-tuning-test).
|
||||
|
||||
1. Takeoff using RC control <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">in [Altitude mode](../flight_modes_mc/altitude.md).
|
||||
2. Takeoff using RC control <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">in [Altitude mode](../flight_modes_mc/altitude.md).
|
||||
Hover the vehicle at a safe distance and at a few meters above ground (between 4 and 20m).</div><div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
Once flying at cruise speed, activate [Hold mode](../flight_modes_fw/hold.md).
|
||||
This will guide the plane to fly in circle at constant altitude and speed.</div>
|
||||
|
||||
1. Enable autotune.
|
||||
3. Enable autotune.
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Plane'">
|
||||
<div class="tip custom-block"><p class="custom-block-title">TIP</p>
|
||||
@@ -87,15 +87,24 @@ The test steps are:
|
||||
|
||||

|
||||
|
||||
1. Select either the _Rate Controller_ or _Attitude Controller_ tabs.
|
||||
1. Ensure that the **Autotune enabled** button is enabled (this will display the **Autotune** button and remove the manual tuning selectors).
|
||||
1. Read the warning popup and click on **OK** to start tuning.
|
||||
2. Select either the _Rate Controller_ or _Attitude Controller_ tabs.
|
||||
3. Ensure that the **Autotune enabled** button is enabled (this will display the **Autotune** button and remove the manual tuning selectors).
|
||||
4. Read the warning popup and click on **OK** to start tuning.
|
||||
|
||||
1. The drone will first start to perform quick roll motions followed by pitch and yaw motions.
|
||||
4. The drone will first start to perform quick roll motions followed by pitch and yaw motions.
|
||||
The progress is shown in the progress bar, next to the _Autotune_ button.
|
||||
1. <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">Manually land and disarm to apply the new tuning parameters.
|
||||
Takeoff carefully and manually test that the vehicle is stable.</div><div v-else-if="$frontmatter.frame === 'Plane'">The tuning will be immediately/automatically be applied and tested in flight (by default).
|
||||
PX4 will then run a 4 second test and revert the new tuning if a problem is detected.</div>
|
||||
|
||||
<div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">
|
||||
|
||||
5. Manually land and disarm to apply the new tuning parameters.
|
||||
Takeoff carefully and manually test that the vehicle is stable.
|
||||
|
||||
</div><div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
5. The tuning will be immediately/automatically be applied and tested in flight (by default).
|
||||
PX4 will then run a 4 second test and revert the new tuning if a problem is detected.
|
||||
|
||||
</div>
|
||||
|
||||
::: warning
|
||||
If any strong oscillations occur, land immediately and follow the instructions in the [Troubleshooting](#troubleshooting) section below.
|
||||
@@ -164,7 +173,6 @@ Attempt manual tuning using the guides listed in [See also](#see-also) below.
|
||||
|
||||
### Apply Tuning when In-Air/Landed
|
||||
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Multicopter'">
|
||||
|
||||
By multicopters land before parameters are applied.
|
||||
@@ -196,8 +204,8 @@ A remote control switch can be configured to enable/disable autotune (in any mod
|
||||
To map a switch:
|
||||
|
||||
1. Select an RC channel on your controller to use for the autotune enable/disable switch.
|
||||
1. Set [RC_MAP_AUX1](../advanced_config/parameter_reference.md#RC_MAP_AUX1) to match the RC channel for your switch (you can use any of `RC_MAP_AUX1` to `RC_MAP_AUX6`).
|
||||
1. Set [FW_AT_MAN_AUX](../advanced_config/parameter_reference.md#FW_AT_MAN_AUX) to the selected channel (i.e. `1: Aux 1` if you mapped `RC_MAP_AUX1`).
|
||||
2. Set [RC_MAP_AUX1](../advanced_config/parameter_reference.md#RC_MAP_AUX1) to match the RC channel for your switch (you can use any of `RC_MAP_AUX1` to `RC_MAP_AUX6`).
|
||||
3. Set [FW_AT_MAN_AUX](../advanced_config/parameter_reference.md#FW_AT_MAN_AUX) to the selected channel (i.e. `1: Aux 1` if you mapped `RC_MAP_AUX1`).
|
||||
|
||||
The auto tuner will be disabled when the switch is below `0.5` (on the manual control setpoint range of of `[-1, 1]`) and enabled when the switch channel is above `0.5`.
|
||||
|
||||
|
||||
@@ -83,6 +83,20 @@ This is the airspeed which, when reached, will trigger the transition out of mul
|
||||
It is critical that you have properly calibrated your airspeed sensor.
|
||||
It is also important that you pick an airspeed that is comfortably above your airframes stall speed (check `FW_AIRSPD_MIN`) as this is currently not checked.
|
||||
|
||||
#### Openloop Transition Time
|
||||
Parameter: [VT_F_TR_OL_TM](../advanced_config/parameter_reference.md#VT_F_TR_OL_TM)
|
||||
|
||||
This specifies the duration of the front transition in seconds when no airspeed feedback is available (e.g. no airspeed sensor present).
|
||||
It should be set to a value which ensures that the vehicle reaches a high enough airspeed to complete the transition, e.g. airspeed should exceed [VT_ARSP_TRANS](../advanced_config/parameter_reference.md#VT_ARSP_TRANS).
|
||||
|
||||
#### Transition Timeout
|
||||
[VT_TRANS_TIMEOUT](../advanced_config/parameter_reference.md#VT_TRANS_TIMEOUT)
|
||||
|
||||
This specifies the upper limit for the duration of the front transition. If the vehicle has not reached the transition airspeed after this time, then the transition will be aborted and a [Quadchute](../config/safety.md#quad-chute-failsafe) event will be triggered.
|
||||
:::note
|
||||
Additionally, if an airspeed sensor is present, the transition will also be aborted if the airspeed has not reached [VT_ARSP_BLEND](../advanced_config/parameter_reference.md#VT_ARSP_BLEND) after the openloop transition time [VT_F_TR_OL_TM](../advanced_config/parameter_reference.md#VT_F_TR_OL_TM) has elapsed. This checks is used to avoid a scenario where the vehicle gains excessive speed when the airspeed sensor is faulty.
|
||||
:::
|
||||
|
||||
### Transitioning Tips
|
||||
|
||||
As already mentioned make sure you have a well tuned multirotor mode.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ARK Pi6X Flow
|
||||
|
||||
The [ARK Pi6X Flow](<(https://arkelectron.gitbook.io/ark-documentation/flight-controllers/ark-pi6x-flow)>) integrates a Raspberry Pi Compute Module 4 (CM4) Carrier, [ARKV6X Flight Controller](../flight_controller/ark_v6x.md), [ARK Flow sensors](../dronecan/ark_flow.md) , [ARK PAB Power Module](../power_module/ark_pab_power_module.md), and a 4-in-1 ESC, all mounted onto one compact board.
|
||||
The [ARK Pi6X Flow](https://arkelectron.gitbook.io/ark-documentation/flight-controllers/ark-pi6x-flow) integrates a Raspberry Pi Compute Module 4 (CM4) Carrier, [ARKV6X Flight Controller](../flight_controller/ark_v6x.md), [ARK Flow sensors](../dronecan/ark_flow.md) , [ARK PAB Power Module](../power_module/ark_pab_power_module.md), and a 4-in-1 ESC, all mounted onto one compact board.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
# Flight Log Analysis
|
||||
|
||||
This topic provide an overview of the tools and methods that can be used to analyze PX4 flight logs (more detailed topics are linked below in some cases).
|
||||
|
||||
::: info INFO
|
||||
[Flight Reporting](../getting_started/flight_reporting.md) explains how to download a log and report/discuss issues about a flight with the development team.
|
||||
:::
|
||||
|
||||
## Structured Analysis
|
||||
|
||||
Before analyzing a flight log it is important to establish its context:
|
||||
|
||||
- If the analysis is done after a malfunction, did the log capture the crash or did it stop mid-air?
|
||||
- Did all controllers track their references?
|
||||
The easiest way to establish this is to compare attitude roll and pitch rates to their set points.
|
||||
- Does the sensor data look valid? Was there very strong vibration (a reasonable threshold for strong vibration is anything with a peak-to-peak of more than 2-3 m/s/s).
|
||||
- If the root cause is not specific to the vehicle make sure to report it with a link to the log file (and video if one exists) on the [PX4 issue tracker](https://github.com/PX4/PX4-Autopilot/issues/new).
|
||||
|
||||
## Ruling Out Power Failures
|
||||
|
||||
If a log file ends mid-air, two main causes are possible: a power failure _or_ a hard fault of the operating system.
|
||||
|
||||
On autopilots based on the [STM32 series](http://www.st.com/en/microcontrollers/stm32-32-bit-arm-cortex-mcus.html), hard faults are logged to the SD card.
|
||||
These are located on the top level of the SD card and named _fault_date.log_, e.g. **fault_2017_04_03_00_26_05.log**.
|
||||
You should check for the presence of this file if a flight log ends abruptly.
|
||||
|
||||
## Analysis Tools
|
||||
|
||||
### Flight Review (Online Tool)
|
||||
|
||||
[Flight Review](http://logs.px4.io) is the successor of _Log Muncher_.
|
||||
It is used in combination with the new [ULog](../dev_log/ulog_file_format.md) logging format.
|
||||
|
||||
Key features:
|
||||
|
||||
- Web based, great for end-users.
|
||||
- Users can upload logs through the web interface, and then share report with others (bulk upload is supported using the [upload_log.py](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/upload_log.py) script)
|
||||
- Interactive plots.
|
||||
|
||||

|
||||
|
||||
See [Log Analysis using Flight Review](../log/flight_review.md) for an introduction.
|
||||
|
||||
### PlotJuggler
|
||||
|
||||
[PlotJuggler](https://github.com/facontidavide/PlotJuggler) is a desktop application that allows users to easily visualize and analyze data expressed in the form of time series.
|
||||
This is one of the best ULog analysis tools as it exposes all information in the log ([Flight Review](#flight-review-online-tool), by comparison, only shows a small subset of the data).
|
||||
|
||||
It supports ULog files (.ulg) since version 2.1.4.
|
||||
|
||||
Key features:
|
||||
|
||||
- Intuitive drag & drop interface.
|
||||
- Arrange your data in multiple plots, tabs or windows.
|
||||
- All uORB topics are shown and can be graphed.
|
||||
- Once you arranged your data, save it into a "Layout" file and reload it multiple times.
|
||||
- Process your data inside _PlotJuggler_ itself, using custom "data transformations".
|
||||
|
||||
Source code and downloads are available on [Github](https://github.com/facontidavide/PlotJuggler).
|
||||
|
||||

|
||||
|
||||
See [Log Analysis using Plot Juggler](../log/plotjuggler_log_analysis.md) for an introduction.
|
||||
|
||||
### pyulog
|
||||
|
||||
[pyulog](https://github.com/PX4/pyulog) is a python package to parse ULog files, along with a set of command-line scripts to extract/display ULog information and convert them to other file formats.
|
||||
|
||||
Key features:
|
||||
|
||||
- Python library for parsing ULog files. Base library used by a number of other ULog analysis and visualisation tools.
|
||||
- Scripts to extract/display ULog information:
|
||||
- _ulog_info_: display information from an ULog file.
|
||||
- _ulog_messages_: display logged messages from an ULog file.
|
||||
- _ulog_params_: extract parameters from an ULog file.
|
||||
- Scripts to convert ULog files to other formats:
|
||||
- _ulog2csv_: convert ULog to (several) CSV files.
|
||||
- _ulog2kml_: convert ULog to (several) KML files.
|
||||
|
||||
All scripts are installed as system-wide applications (i.e. they be called on the command line - provided Python is installed), and support the `-h` flag for getting usage instructions. For example:
|
||||
|
||||
```sh
|
||||
$ ulog_info -h
|
||||
usage: ulog_info [-h] [-v] file.ulg
|
||||
|
||||
Display information from an ULog file
|
||||
|
||||
positional arguments:
|
||||
file.ulg ULog input file
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-v, --verbose Verbose output
|
||||
```
|
||||
|
||||
Below we see the kind of information exported from a sample file using _ulog_info_.
|
||||
|
||||
```sh
|
||||
$ ulog_info sample.ulg
|
||||
Logging start time: 0:01:52, duration: 0:01:08
|
||||
Dropouts: count: 4, total duration: 0.1 s, max: 62 ms, mean: 29 ms
|
||||
Info Messages:
|
||||
sys_name: PX4
|
||||
time_ref_utc: 0
|
||||
ver_hw: AUAV_X21
|
||||
ver_sw: fd483321a5cf50ead91164356d15aa474643aa73
|
||||
|
||||
Name (multi id, message size in bytes) number of data points, total bytes
|
||||
actuator_controls_0 (0, 48) 3269 156912
|
||||
actuator_outputs (0, 76) 1311 99636
|
||||
commander_state (0, 9) 678 6102
|
||||
control_state (0, 122) 3268 398696
|
||||
cpuload (0, 16) 69 1104
|
||||
ekf2_innovations (0, 140) 3271 457940
|
||||
estimator_status (0, 309) 1311 405099
|
||||
sensor_combined (0, 72) 17070 1229040
|
||||
sensor_preflight (0, 16) 17072 273152
|
||||
telemetry_status (0, 36) 70 2520
|
||||
vehicle_attitude (0, 36) 6461 232596
|
||||
vehicle_attitude_setpoint (0, 55) 3272 179960
|
||||
vehicle_local_position (0, 123) 678 83394
|
||||
vehicle_rates_setpoint (0, 24) 6448 154752
|
||||
vehicle_status (0, 45) 294 13230
|
||||
```
|
||||
|
||||
### FlightPlot
|
||||
|
||||
[FlightPlot](https://github.com/PX4/FlightPlot) is a desktop based tool for log analysis. It can be downloaded from [FlightPlot Downloads](https://github.com/PX4/FlightPlot/releases) (Linux, MacOS, Windows).
|
||||
|
||||
Key features:
|
||||
|
||||
- Java based, cross-platform.
|
||||
- Intuitive GUI, no programming knowledge required.
|
||||
- Supports both new and old PX4 log formats (.ulg, .px4log, .bin)
|
||||
- Allows saving plots as images.
|
||||
|
||||

|
||||
|
||||
### PX4Tools
|
||||
|
||||
[PX4Tools](https://github.com/dronecrew/px4tools) is a log analysis toolbox for the PX4 autopilot written in Python.
|
||||
The recommended installation procedure is to use [anaconda3](https://conda.io/docs/index.html). See [px4tools github page](https://github.com/dronecrew/px4tools) for details.
|
||||
|
||||
Key features:
|
||||
|
||||
- Easy to share, users can view notebooks on Github (e.g. [15-09-30 Kabir Log.ipynb](https://github.com/jgoppert/lpe-analysis/blob/master/15-09-30%20Kabir%20Log.ipynb))
|
||||
- Python based, cross platform, works with anaconda 2 and anaconda3
|
||||
- iPython/ jupyter notebooks can be used to share analysis easily
|
||||
- Advanced plotting capabilities to allow detailed analysis
|
||||
|
||||

|
||||
|
||||
### MAVGCL
|
||||
|
||||
[MAVGCL](https://github.com/ecmnet/MAVGCL) is an in-flight log analyzer for PX4.
|
||||
It can also be used in offline mode with downloaded uLog files.
|
||||
|
||||
Key features:
|
||||
|
||||
- Realtime data acquisition (50ms sampling, 100ms rolling display) based on MAVLink messages or ULOG data over MAVLink
|
||||
- Timechart annotated by messages (MAVLink and ULog) and parameter changes (MAVLink only)
|
||||
- XY Analysis for selected key-figures
|
||||
- 3D View (vehicle and observer perspective)
|
||||
- MAVLink inspector (reporting raw MAVLink messages)
|
||||
- Offline-mode: Import of key-figures from PX4Log/ULog (file or last log from device via WiFi)
|
||||
- Java based. Known to work on macOS and Ubuntu.
|
||||
- And many more ...
|
||||
|
||||

|
||||
|
||||
### Data Comets
|
||||
|
||||
[Data Comets](https://github.com/dsaffo/DataComets) is a interactive PX4 flight log analysis tool that allows you to encode flight data onto the flight path, filter and brush the data by time - and much more!
|
||||
|
||||
You can use the online version of the tool for small log files (< 32Mb), or run it locally in order to analyze longer flights.
|
||||
|
||||

|
||||
@@ -0,0 +1,441 @@
|
||||
# Log Analysis using Flight Review
|
||||
|
||||
The [Flight Review](http://logs.px4.io) plots for a flight can be used to analyze general vehicle condition.
|
||||
|
||||
The plots are meant to be self-explanatory, but it takes some experience to know what ranges are acceptable and what a plot should look like.
|
||||
This page explains how to interpret the plots and identify common problems.
|
||||
|
||||
## General Usage
|
||||
|
||||
Features that are common to many plots:
|
||||
|
||||
- Plot background color is used to indicate flight mode during recording (where graphs depend on mode):
|
||||

|
||||
- **Flight mode:** Background colour on the body of the plot indicates flight mode.
|
||||
Hovering with the mouse over a plot shows the flight mode labels.
|
||||
- **VTOL flight mode:** VTOL vehicles additionally show the VTOL mode as background colour in the bottom part of the plot (blue for multicopter, yellow for fixed-wing, and red for transition).
|
||||
- Mouse scrolling on a particular plot axis zooms that axis (horizontally or vertically).
|
||||
- Mouse scrolling inside the plot zooms both axes.
|
||||
|
||||
<a id="tracking"></a>
|
||||
|
||||
## PID Tracking Performance
|
||||
|
||||
Depending on the flight mode, the vehicle controllers may attempt to track position, velocity, altitude or rate setpoints (the tracked setpoints depend on the mode, e.g.: in Stabilized mode there is no velocity setpoint).
|
||||
|
||||
The **Estimated** line (red) should closely match with the **Setpoint** (green).
|
||||
If they do not, in most cases the PID gains of that controller need to be tuned.
|
||||
|
||||
The [Multicopter PID Tuning Guide](../config_mc/pid_tuning_guide_multicopter.md) contains example plots and information about analysing tracking performance.
|
||||
|
||||
:::tip
|
||||
For the rate controller in particular, it is useful to enable the high-rate logging profile ([SDLOG_PROFILE](../advanced_config/parameter_reference.md#SDLOG_PROFILE)) to get more details when zooming in.
|
||||
:::
|
||||
|
||||
## Vibration
|
||||
|
||||
Vibration is one of the most common problems for multirotor vehicles.
|
||||
High vibration levels can lead to:
|
||||
- less efficient flight and reduced flight time
|
||||
- the motors can heat up
|
||||
- increased material wearout
|
||||
- inability to tune the vehicle tightly, resulting in degraded flight performance.
|
||||
- sensor clipping
|
||||
- position estimation failures, potentially resulting in fly-aways.
|
||||
|
||||
It is therefore important to keep an eye on the vibration levels and improve the setup if needed.
|
||||
|
||||
There is a point where vibration levels are clearly too high, and generally lower vibration levels are better.
|
||||
However there is a broad range between 'everything is ok' and 'the levels are too high'.
|
||||
This range depends on a number of factors, including vehicle size - as larger vehicles have higher inertia, allowing for more software filtering (at the same time the vibrations on larger vehicles are of lower frequency).
|
||||
|
||||
The following paragraphs and sections provide information about what plots to use for checking vibration levels, and how to analyse them.
|
||||
|
||||
:::tip
|
||||
It is worth looking at multiple charts when analyzing vibration (different charts can better highlight some issues).
|
||||
:::
|
||||
|
||||
### Actuator Controls FFT
|
||||
|
||||
::: info
|
||||
You need to enable the high-rate logging profile ([SDLOG_PROFILE](../advanced_config/parameter_reference.md#SDLOG_PROFILE)) to see this plot.
|
||||
:::
|
||||
|
||||
This graph shows a frequency plot for the roll, pitch and yaw axis based on the actuator controls signal (the PID output from the rate controller).
|
||||
It helps to identify frequency peaks and configuring the software filters.
|
||||
There should only be a single peak at the lowest end (below around 20 Hz), the rest should be low and flat.
|
||||
|
||||
Note that the y-axis scaling is different for different vehicles, but logs from the same vehicle can be directly compared to each other.
|
||||
|
||||
#### Examples: Good Vibration
|
||||
|
||||
[QAV-R 5" Racer](../frames_multicopter/qav_r_5_kiss_esc_racer.md) frame (excellent vibration).
|
||||
|
||||

|
||||
|
||||
::: info
|
||||
The excellent vibration characteristics of the above frame mean that we can considerably increase the cutoff frequency of the [software filters](../config_mc/filter_tuning.md) (reducing control latency).
|
||||
:::
|
||||
|
||||
DJI F450 frame (good vibration).
|
||||
|
||||

|
||||
|
||||
S500 frame:
|
||||
|
||||

|
||||
|
||||
::: info
|
||||
While the plot above looks good, the [Raw Acceleration graph for the same flight](#raw_acc_s500) shows that the vibration levels are a bit high for x and y.
|
||||
This is a good example of why it is worth checking several graphs!
|
||||
:::
|
||||
|
||||
#### Examples: Bad Vibration
|
||||
|
||||
This example shows a peak in frequency close to 50 Hz (in this case due to "loose" landing gear).
|
||||
|
||||

|
||||
|
||||
|
||||
### Acceleration Power Spectral Density
|
||||
|
||||
This is a 2D frequency plot showing the frequency response of the raw accelerometer data over time (it displays the sum for the x, y and z axis).
|
||||
The more yellow an area is, the higher the frequency response at that time and frequency.
|
||||
|
||||
Ideally only the lowest part up to a few Hz is yellow, and the rest is mostly green or blue.
|
||||
|
||||
|
||||
#### Examples: Good Vibration
|
||||
|
||||
[QAV-R 5" Racer](../frames_multicopter/qav_r_5_kiss_esc_racer.md) frame (excellent vibration).
|
||||
|
||||

|
||||
<!-- https://logs.px4.io/plot_app?log=cd88b091-ec89-457c-85f6-e63e4fa0f51d -->
|
||||
|
||||
DJI F450 frame (good vibration).
|
||||

|
||||
|
||||
::: info
|
||||
Above you can see the blade passing frequency of the propellers at around 100 Hz.
|
||||
:::
|
||||
|
||||
S500 frame:
|
||||

|
||||
|
||||
|
||||
#### Examples: Bad Vibration
|
||||
|
||||
The strong yellow lines at around 100Hz indicate a potential issue that requires further investigation (starting with a review of the other charts).
|
||||
|
||||

|
||||
|
||||
This plot below shows a peak in frequency close to 50 Hz (in this case due to "loose" landing gear).
|
||||
|
||||
:::tip
|
||||
This indicates a possible problem because it is a strong single low frequency that is close to the vehicle dynamics.
|
||||
With the default filter settings of 80 Hz vibrations at 50 Hz will not be filtered.
|
||||
:::
|
||||
|
||||

|
||||
|
||||
|
||||
Extremely high (unsafe) vibration! Note that the graph is almost completely yellow.
|
||||
|
||||
:::warning
|
||||
You should not fly with such high vibration levels.
|
||||
:::
|
||||
|
||||

|
||||
|
||||
|
||||
### Raw Acceleration
|
||||
|
||||
This graph shows the raw accelerometer measurements for the x, y and z axis.
|
||||
Ideally each line is thin and clearly shows the vehicle's accelerations.
|
||||
|
||||
As a rule of thumb if the z-axis graph is touching the x/y-axis graph during hover or slow flight, the vibration levels are too high.
|
||||
|
||||
:::tip
|
||||
The best way to use this graph is to zoom in a bit to a part where the vehicle is hovering.
|
||||
:::
|
||||
|
||||
#### Examples: Good Vibration
|
||||
|
||||
[QAV-R 5" Racer](../frames_multicopter/qav_r_5_kiss_esc_racer.md) frame (excellent vibration).
|
||||
|
||||

|
||||
|
||||
DJI F450 frame (good vibration).
|
||||

|
||||
|
||||
<!-- https://logs.px4.io/plot_app?log=cd88b091-ec89-457c-85f6-e63e4fa0f51d -->
|
||||
|
||||
|
||||
#### Examples: Bad Vibration
|
||||
|
||||
<a id="raw_acc_s500"></a>
|
||||
S500 frame. Borderline vibration levels - a bit high for x and y (which is typical for an S500 airframe).
|
||||
This is at the limit where it starts to negatively affect flight performance.
|
||||
|
||||

|
||||
|
||||
|
||||
Vibration too high. Note how the graph of the z-axis overlaps with the x/y-axis graph:
|
||||
|
||||

|
||||
|
||||
|
||||
Vibration levels are too high. Note how the graph of the z-axis overlaps with the x/y-axis graph:
|
||||
|
||||

|
||||
|
||||
|
||||
Very high (unsafe) vibration levels.
|
||||
|
||||
:::warning
|
||||
You should not fly with such high vibration levels.
|
||||
:::
|
||||
|
||||

|
||||
|
||||
|
||||
<a id="fifo_logging"></a>
|
||||
|
||||
### Raw High-rate IMU Data Plots
|
||||
|
||||
For an in-depth analysis there is an option to log the raw IMU data at full rate (several kHz, depending on the IMU).
|
||||
This allows inspection of much higher frequencies than with normal logging, which can help when selecting vibration mounts or configuring low-pass and notch filters appropriately.
|
||||
|
||||
To use it, some parameters need to be changed:
|
||||
- Set [IMU_GYRO_RATEMAX](../advanced_config/parameter_reference.md#IMU_GYRO_RATEMAX) to 400.
|
||||
This ensures that the raw sensor data is more efficiently packed when sent from the sensor to the rest of the system, and reduces the log size (without reducing useful data).
|
||||
<!-- Explanation in https://github.com/PX4/PX4-user_guide/pull/751/files#r440509688
|
||||
Data is sent in a fixed size array that will largely empty if sent at higher rate. The "empty data" is also logged.-->
|
||||
- Use a good SD card, as the IMU data requires a high logging bandwidth (Flight Review will show dropouts if the logging rate gets too high).
|
||||
|
||||
:::tip
|
||||
See [Logging > SD Cards](../dev_log/logging.md#sd-cards) for a comparison of popular SD card.
|
||||
:::
|
||||
|
||||
- Enable either the gyro or accel high-rate FIFO profile in [SDLOG_PROFILE](../advanced_config/parameter_reference.md#SDLOG_PROFILE) and disable the rest of the entries.
|
||||
If you are using a really good SD card (seeing few/no dropouts), you can:
|
||||
- either enable both accel and gyro profiles
|
||||
- or enable accel/gyro plus the default logging profile
|
||||
|
||||
Example plot:
|
||||
|
||||

|
||||
|
||||
::: info
|
||||
Data of the first IMU is logged, which is not necessarily the same as the one used for flying.
|
||||
This is mostly only important in cases where IMU's are mounted differently (e.g. hard-mounted vs. soft-mounted).
|
||||
:::
|
||||
|
||||
::: info
|
||||
Do not forget to restore the parameters after testing.
|
||||
:::
|
||||
|
||||
<a id="solutions"></a>
|
||||
|
||||
### Fixing Vibration Problems
|
||||
|
||||
Often a source of vibration (or combination of multiple sources) cannot be identified from logs alone.
|
||||
|
||||
In this case the vehicle should be inspected.
|
||||
[Vibration Isolation](../assembly/vibration_isolation.md) explains some basic things you can check (and do) to reduce vibration levels.
|
||||
|
||||
|
||||
|
||||
## Actuator Outputs
|
||||
|
||||
The *Actuator Outputs* graph shows the signals that are sent to the individual actuators (motors/servos).
|
||||
Generally it is in the range between the minimum and maximum configured PWM values (e.g. from 1000 to 2000).
|
||||
|
||||
This is an example for a quadrotor where everything is OK (all of the signals are within the range, approximately overlap each other, and are not too noisy):
|
||||

|
||||
|
||||
The plot can help to identify different problems:
|
||||
- If one or more of the signals is at the maximum over a longer time, it means the controller runs into **saturation**.
|
||||
It is not necessarily a problem, for example when flying at full throttle this is expected.
|
||||
But if it happens for example during a mission, it's an indication that the vehicle is overweight for the amount of thrust that it can provide.
|
||||
- For a multicopter the plot can be a good indication if the vehicle is **imbalanced**.
|
||||
It shows in the plot that one or more neighboring motors (two in case of a quadrotor) need to run at higher thrust on average.
|
||||
Note that this can also be the case if some motors provide more thrust than others or the ESCs are not calibrated.
|
||||
An imbalanced vehicle is generally not a big problem as the autopilot will automatically account for it.
|
||||
However it reduces the maximum achievable thrust and puts more strain on some motors, so it is better to balance the vehicle.
|
||||
- An imbalance can also come from the yaw axis.
|
||||
The plot will look similar as in the previous case, but opposite motors will run higher or lower respectively.
|
||||
The cause is likely that one or more motors are tilted.
|
||||
|
||||
This is an example from a hexarotor: motors 1, 3 and 6 run at higher thrust:
|
||||

|
||||
<!-- https://logs.px4.io/plot_app?log=9eca6934-b657-4976-a32f-b2e56535f05f -->
|
||||
- If the signals look very **noisy** (with high amplitudes), it can have two causes: sensor noise or vibrations passing through the controller (this shows up in other plots as well, see previous section) or too high PID gains.
|
||||
This is an extreme example:
|
||||

|
||||
|
||||
|
||||
## GPS Uncertainty
|
||||
|
||||
The *GPS Uncertainty* plot shows information from the GPS device:
|
||||
- Number of used satellites (should be around 12 or higher)
|
||||
- Horizontal position accuracy (should be below 1 meter)
|
||||
- Vertical position accuracy (should be below 2 meters)
|
||||
- GPS fix: this is 3 for a 3D GPS fix, 4 for GPS + Dead Reckoning, 5 for RTK float and 6 for RTK fixed type
|
||||
|
||||
|
||||
## GPS Noise & Jamming
|
||||
|
||||
The GPS Noise & Jamming plot is useful to check for GPS signal interferences and jamming.
|
||||
The GPS signal is very weak and thus it can easily be disturbed/jammed by components transmitting (via cable) or radiating in a frequency used by the GPS.
|
||||
|
||||
:::tip
|
||||
USB 3 is [known to be](https://www.usb.org/sites/default/files/327216.pdf) an effective GPS jamming source.
|
||||
:::
|
||||
|
||||
The **jamming indicator** should be around or below 40.
|
||||
Values around 80 or higher are too high and the setup must be inspected.
|
||||
Signal interference is also noticeable as reduced accuracy and lower number of satellites up to the point where no GPS fix is possible.
|
||||
|
||||
This is an example without any interference:
|
||||
|
||||

|
||||
|
||||
|
||||
## Thrust and Magnetic Field
|
||||
|
||||
The *Thrust and Magnetic Field* plot shows the thrust and the norm of the magnetic sensor measurement vector.
|
||||
|
||||
The norm should be constant over the whole flight and uncorrelated with the thrust.
|
||||
This is a good example where the norm is very close to constant:
|
||||

|
||||
|
||||
*If it is correlated*, it means that the current drawn by the motors (or other consumers) is influencing the magnetic field.
|
||||
This must be avoided as it leads to incorrect yaw estimation.
|
||||
The following plot shows a strong correlation between the thrust and the norm of the magnetometer:
|
||||

|
||||
|
||||
Solutions to this are:
|
||||
- Use an external magnetometer (avoid using the internal magnetometer)
|
||||
- If using an external magnetometer, move it further away from strong currents (i.e. by using a (longer) GPS mast).
|
||||
|
||||
If the norm is uncorrelated but not constant, most likely it is not properly calibrated.
|
||||
However it could also be due to external disturbances (for example when flying close to metal constructs).
|
||||
|
||||
This example shows that the norm is non-constant, but it does not correlate with the thrust:
|
||||

|
||||
|
||||
|
||||
## Estimator Watchdog
|
||||
|
||||
The *Estimator Watchdog* plot shows the health report of the estimator.
|
||||
It should be constant zero.
|
||||
|
||||
This is what it should look like if there are no problems:
|
||||

|
||||
|
||||
If one of the flags is non-zero, the estimator detected a problem that needs to be further investigated.
|
||||
Most of the time it is an issue with a sensor, for example magnetometer interferences.
|
||||
It usually helps to look at the plots of the corresponding sensor.
|
||||
<!-- TODO: separate page for estimator issues? -->
|
||||
|
||||
Here is an example with magnetometer problems:
|
||||

|
||||
|
||||
|
||||
## Sampling Regularity of Sensor Data
|
||||
|
||||
The sampling regularity plot provides insights into problems with the logging system and scheduling.
|
||||
|
||||
The amount of **logging dropouts** start to increase if the log buffer is too small, the logging rate is too high or a low-quality SD card is used.
|
||||
|
||||
::: info
|
||||
Occasional dropouts can be expected on medium quality cards.
|
||||
:::
|
||||
|
||||
The **delta t** shows the time difference between two logged IMU samples.
|
||||
It should be close to 4 ms because the data publishing rate is 250Hz.
|
||||
If there are spikes that are a multiple of that (and the estimator time slip does not increase), it means the logger skipped some samples.
|
||||
Occasionally this can happen because the logger runs at lower priority.
|
||||
If there are spikes that are not a multiple, it indicates an irregular sensor driver scheduling, which needs to be investigated.
|
||||
|
||||
The **estimator timeslip** shows the difference between the current time and the time of the integrated sensor intervals up to that time.
|
||||
If it changes it means either the estimator missed sensor data or the driver publishes incorrect integration intervals.
|
||||
It should stay at zero, but it can increase slightly for in-flight parameter changes, which is generally not an issue.
|
||||
|
||||
This is a good example:
|
||||

|
||||
|
||||
The following example contains too many dropouts, the quality of the used SD card was too low in that case
|
||||
(see [here](../dev_log/logging.md#sd-cards) for good SD cards):
|
||||
|
||||

|
||||
|
||||
## Logged Messages
|
||||
|
||||
This is a table with system error and warning messages.
|
||||
For example they show when a task becomes low on stack size.
|
||||
|
||||
The messages need to be examined individually, and not all of them indicate a problem.
|
||||
For example the following shows a kill-switch test:
|
||||

|
||||
|
||||
|
||||
## Flight/Frame Log Review Examples
|
||||
|
||||
It is often worth looking at multiple charts for a particular flight when analyzing vehicle condition (different charts can better highlight some issues).
|
||||
This is particularly important when reviewing for possible vibration problems.
|
||||
|
||||
The section below groups a few (previously presented) charts by flight/vehicle.
|
||||
|
||||
### QAV-R 5" Racer
|
||||
|
||||
These charts are all from the same flight of a [QAV-R 5" Racer](../frames_multicopter/qav_r_5_kiss_esc_racer.md).
|
||||
<!-- https://logs.px4.io/plot_app?log=cd88b091-ec89-457c-85f6-e63e4fa0f51d -->
|
||||
|
||||
They show a vehicle that has very low vibration:
|
||||
- Actuator Controls FFT shows only a single peak at the lowest end, with the rest low and flat.
|
||||
- Spectral density is mostly green, with only a little yellow at the low frequencies.
|
||||
- Raw Acceleration has z-axis trace well separated from the x/y-axis traces.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
### DJI F450
|
||||
|
||||
These charts are all from the same flight of a *DJI F450*.
|
||||
<!-- https://logs.px4.io/plot_app?log=cd88b091-ec89-457c-85f6-e63e4fa0f51d -->
|
||||
|
||||
They show a vehicle that has low vibration (but not as low as the QAV-R above!):
|
||||
- Actuator Controls FFT shows a peak at the lowest end.
|
||||
Most of the rest is flat, except for a bump at around 100Hz (this is the blade passing frequency of the propellers).
|
||||
- Spectral density is mostly green. The blade passing frequency is again visible.
|
||||
- Raw Acceleration has z-axis trace well separated from the x/y-axis traces.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
### S500
|
||||
|
||||
These charts are all from the same flight of an S500.
|
||||
|
||||
They show a vehicle that has borderline-acceptable vibration:
|
||||
- Actuator Controls FFT shows a peak at the lowest end.
|
||||
Most of the rest is flat, except for a bump at around 100Hz.
|
||||
- Spectral density is mostly green, but more yellow than for the DJI F450 at 100Hz.
|
||||
- Raw Acceleration has z-axis trace fairly close to the x/y-axis traces.
|
||||
This is at the limit where it starts to negatively affect flight performance.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
@@ -0,0 +1,120 @@
|
||||
# Log Analysis using PlotJuggler
|
||||
|
||||
[PlotJuggler](https://github.com/facontidavide/PlotJuggler) can be used to analyze ULogs for in-depth, development purposes.
|
||||
It is incredibly useful as every uORB topic is exposed / can be graphed, as well as having custom functions to modify the data (e.g. from Quaternion values to Roll / Pitch / Yaw).
|
||||
|
||||
## Installation
|
||||
|
||||
You can find the latest releases of the Plot Juggler [here](https://github.com/facontidavide/PlotJuggler/releases).
|
||||
|
||||
#### Notes on Windows distribution
|
||||
|
||||
The latest version of PlotJuggler for Windows may not work.
|
||||
In this case fallback to [v2.8.4 here](https://github.com/facontidavide/PlotJuggler/releases/tag/2.8.4) (this is known to work with Windows).
|
||||
|
||||
#### Notes on AppImage for Linux distributions
|
||||
|
||||
If the downloaded AppImage does not open, you may need to change its access settings.
|
||||
This is done in the terminal using the following command:
|
||||
|
||||
```sh
|
||||
chmod 777 <Path-To-PlotJuggler-AppImage>
|
||||
```
|
||||
|
||||
## General Usage
|
||||
|
||||
Two most common tasks are "Searching" for the logged uORB topic, and "Drag and Dropping" a field in a specific topic onto the graph view.
|
||||
These are demonstrated in the diagram below.
|
||||
|
||||

|
||||
|
||||
### Splitting Horizontally / Vertically : Multi Panel
|
||||
|
||||
One of the most powerful feature is splitting the screen in either horizontal/vertical orientation and displaying different graphs at the same time ( with a synchronized time-bar on top, as you move the time cursor in the bottom).
|
||||
|
||||
This is demonstrated in an animation below:
|
||||
|
||||

|
||||
|
||||
In this example, `vehicle_local_position` topic's `ax`, `ay` and `az` (Acceleration estimate) components were graphed first by splitting the screen in 3 sections.
|
||||
Then, the `vz` (Velocity estimate) component was added under right pane, and finally `battery_status` topic's `current_a` (Battery current) was graphed in the lower-mid pane.
|
||||
|
||||
Although not obvious in the beginning you can observe that whenever the vehicle starts moving (battery current value goes high), the acceleration and velocity values start to move around as well.
|
||||
This is because all the data is displayed as a time-series, which shows each value at on a specific timestamp.
|
||||
|
||||
This is useful for providing a broad view of what happened and why.
|
||||
It is often hard to troubleshoot a problem just by looking at one graph, but by having multiple graphs displayed, it is much easier to figure out what was going on in the system.
|
||||
|
||||
### Displaying Data in 2D
|
||||
|
||||
Another powerful feature is the ability to display 2D data on a XY plane (each data on X, Y axis) in a scatter-plot manner.
|
||||
This is done by selecting two data points by holding `Ctrl` key while selecting each of them (e.g. `vehicle_local_position` topic's `x` and `y` components), and drag & dropping it with the `Right mouse cursor` pressed.
|
||||
|
||||

|
||||
|
||||
In this example, the estimated vehicle's position in local coordinate frame is graphed onto a XY-plane which shows a 2D view of the estimated position, and the `vx` and `vy` components (Velocity estimate) are graphed on the right, with the `vz` (Vertical velocity estimate) graphed underneath it in a split view.
|
||||
|
||||
This in turn shows the relationship between position and the velocity of the vehicle intuitively.
|
||||
For example, note how when the vehicle moves in the X-axis direction, the `vx` value goes high, and as the vehicle turns to the Y-axis direction, the `vy` value starts to change as well.
|
||||
|
||||
#### Using the 'Play' button
|
||||
|
||||
Here the **Play** button is used to play the recorded data in real time (speed factor can be adjusted in the lower-right corner).
|
||||
This shows the position / velocity relationship described above in detail.
|
||||
|
||||

|
||||
|
||||
::: info
|
||||
Try out the boat testing log analysis yourself by downloading the ULog and Layout file used above!
|
||||
- [Boat testing ULog](https://github.com/PX4/PX4-user_guide/raw/main/assets/flight_log_analysis/plot_juggler/sample_log_boat_testing_2022-7-28-13-31-16.ulg)
|
||||
- [Boat testing Analysis Layout](https://raw.githubusercontent.com/PX4/PX4-user_guide/main/assets/flight_log_analysis/plot_juggler/sample_log_boat_testing_layout.xml)
|
||||
:::
|
||||
|
||||
### Layout Templates
|
||||
|
||||
There are a number of PlotJuggler layout files shared by PX4 Developers.
|
||||
Each can be used for a specific purpose (Multicopter tuning, VTOL tuning, Boat debugging, etc.):
|
||||
|
||||
* [Sample View layout](https://github.com/PX4/PX4-user_guide/blob/main/assets/flight_log_analysis/plot_juggler/plotjuggler_sample_view.xml) : Template used in the [Multi-panel example](#splitting-horizontally-vertically-multi-panel) above.
|
||||
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
### Creating custom time series using LUA script
|
||||
|
||||
Plot Juggler supports having LUA scripts to process and display data.
|
||||
This is a powerful feature that can do things like integrating the curve, averaging two curves, removing offsets, etc.
|
||||
|
||||
#### Calculating Roll/Pitch/Yaw from Quaternion
|
||||
|
||||

|
||||
|
||||
To know vehicle's attitude, PX4 logs the estimated attitude's quaternion in the `vehicle_attitude` topic in an array of floating point values (q[4]).
|
||||
Since these values don't give contextual information (e.g. `roll`), it needs a transformation involving trigonometric functions.
|
||||
|
||||
1. Search for `vehicle_attitude` topic in Timeseries List panel on the left
|
||||
2. Select 4 quaternion members (`q.00, q.01, q.02, q.03`) by clicking `q.00` first, then holding Shift + clicking `q.03`. They should all be selected
|
||||
3. Click the '+' symbol in the lower-left 'Custom Series' section to create new series
|
||||
4. Select 4 quaternion members again, and drag them to 'Input timeseries + Additional source timeseries' tab on upper-left corner
|
||||
5. Double click on the `quat_to_roll` from the Function Library. Now you should have the plot on upper section
|
||||
6. Assign the name for the plot (e.g. `roll`) in the text box in upper-right corner
|
||||
7. Click 'Create New Timeseries'. You should now have the plot in 'Custom Series'
|
||||
|
||||
Here the custom series `Roll` is displayed along with other timeseries, including it's original form in Quaternion on the right, which is not human-readable (using PlotJuggler 3.5.0):
|
||||
|
||||

|
||||
|
||||
The `quat_to_roll` function looks like this:
|
||||
```lua
|
||||
w = value
|
||||
x = v1
|
||||
y = v2
|
||||
z = v3
|
||||
|
||||
dcm21 = 2 * (w * x + y * z)
|
||||
dcm22 = w*w - x*x - y*y + z*z
|
||||
|
||||
roll = math.atan(dcm21, dcm22)
|
||||
|
||||
return roll
|
||||
```
|
||||
@@ -10,4 +10,4 @@ This section contains topics about the core actuators used for flight control (E
|
||||
|
||||
## See Also
|
||||
|
||||
- [Peripherals](../peripherals/index.md) - includes non-core actuators such as grippers, parachutes, etc.
|
||||
- [Peripherals](../peripherals/index.md) - includes non-core actuators such as grippers, parachutes, etc.
|
||||
@@ -129,7 +129,7 @@ The on-screen gimbal control can be used to move/test a connected MAVLink camera
|
||||
|
||||
2. Open QGroundControl and enable the on-screen camera control (Application settings).
|
||||
|
||||

|
||||

|
||||
|
||||
3. Make sure the vehicle is armed and flying, e.g. by entering with `commander takeoff`.
|
||||
|
||||
|
||||
@@ -128,21 +128,21 @@ You add some "boilerplate" code to regularly listen for changes in the [uORB Top
|
||||
|
||||
- **px4_platform_common/module_params.h** to get the `DEFINE_PARAMETERS` macro:
|
||||
|
||||
```cpp
|
||||
#include <px4_platform_common/module_params.h>
|
||||
```
|
||||
```cpp
|
||||
#include <px4_platform_common/module_params.h>
|
||||
```
|
||||
|
||||
- **parameter_update.h** to access the uORB `parameter_update` message:
|
||||
|
||||
```cpp
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
```
|
||||
```cpp
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
```
|
||||
|
||||
- **Subscription.hpp** for the uORB C++ subscription 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()
|
||||
- `_parameter_update_sub.updated()` tells us if there is _any_ update to the `param_update` uORB message (but not what parameter is affected).
|
||||
- If there has been "some" parameter updated, we copy the update into a `parameter_update_s` (`param_update`), to clear the pending 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.
|
||||
|
||||
The parameter attributes (`_sys_autostart` and `_att_bias_max` in this case) can then be used to represent the parameters, and will be updated whenever the parameter value changes.
|
||||
|
||||
@@ -267,12 +267,12 @@ YAML meta data is intended as a full replacement for the **.c** definitions.
|
||||
- An example of YAML definitions being used can be found in the MAVLink parameter definitions: [/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
|
||||
```
|
||||
|
||||
to the `px4_add_module` section of the `CMakeLists.txt` file of that module.
|
||||
to the `px4_add_module` section of the `CMakeLists.txt` file of that module.
|
||||
|
||||
#### 다중 인스턴스(템플릿) YAML 메타 데이터
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ On Windows, one option is to use _Melody Master_ within _Dosbox_.
|
||||
7. 음악을 저장할 준비가 끝나면:
|
||||
- Press **F2** to give the tune a name and save it in the _/Music_ sub folder of your Melody Master installation.
|
||||
- Press **F7**, the scroll down the list of output formats on the right to get to ANSI.
|
||||
The file will be exported to the _root_ of the Melody Master directory (with the same name and a file-type specific extension).
|
||||
The file will be exported to the _root_ of the Melody Master directory (with the same name and a file-type specific extension).
|
||||
|
||||
8. 파일을 여십시오.
|
||||
출력 내용은 다음과 같습니다:
|
||||
|
||||
@@ -23,7 +23,7 @@ You can locate the parameters in QGroundControl as shown below:
|
||||
1. Open QGroundControl menu: **Settings > Parameters > Sensor Calibration**.
|
||||
2. The parameters as located in the section as shown below (or you can search for them):
|
||||
|
||||

|
||||

|
||||
|
||||
## Parameter Summary
|
||||
|
||||
|
||||
@@ -52,81 +52,81 @@ The following steps explain how you can "manually" update the bootloader using a
|
||||
1. Get a binary containing the bootloader (either from dev team or [build it yourself](#building-the-px4-bootloader)).
|
||||
|
||||
2. Get a [Debug Probe](../debug/swd_debug.md#debug-probes-for-px4-hardware).
|
||||
Connect the probe your PC via USB and setup the `gdbserver`.
|
||||
Connect the probe your PC via USB and setup the `gdbserver`.
|
||||
|
||||
3. Go into the directory containing the binary and run the command for your target bootloader in the terminal:
|
||||
|
||||
- FMUv6X
|
||||
- FMUv6X
|
||||
|
||||
```sh
|
||||
arm-none-eabi-gdb px4_fmu-v6x_bootloader.elf
|
||||
```
|
||||
```sh
|
||||
arm-none-eabi-gdb px4_fmu-v6x_bootloader.elf
|
||||
```
|
||||
|
||||
- FMUv6X-RT
|
||||
- FMUv6X-RT
|
||||
|
||||
```sh
|
||||
arm-none-eabi-gdb px4_fmu-v6xrt_bootloader.elf
|
||||
```
|
||||
```sh
|
||||
arm-none-eabi-gdb px4_fmu-v6xrt_bootloader.elf
|
||||
```
|
||||
|
||||
- FMUv5
|
||||
- FMUv5
|
||||
|
||||
```sh
|
||||
arm-none-eabi-gdb px4fmuv5_bl.elf
|
||||
```
|
||||
```sh
|
||||
arm-none-eabi-gdb px4fmuv5_bl.elf
|
||||
```
|
||||
|
||||
::: info
|
||||
H7 Bootloaders from [PX4/PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) are named with pattern `*._bootloader.elf`.
|
||||
Bootloaders from [PX4/PX4-Bootloader](https://github.com/PX4/PX4-Bootloader) are named with the pattern `*_bl.elf`.
|
||||
::: info
|
||||
H7 Bootloaders from [PX4/PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) are named with pattern `*._bootloader.elf`.
|
||||
Bootloaders from [PX4/PX4-Bootloader](https://github.com/PX4/PX4-Bootloader) are named with the pattern `*_bl.elf`.
|
||||
|
||||
:::
|
||||
|
||||
4. The _gdb terminal_ appears and it should display the following output:
|
||||
|
||||
```sh
|
||||
GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
Type "show copying" and "show warranty" for details.
|
||||
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
|
||||
Type "show configuration" for configuration details.
|
||||
For bug reporting instructions, please see:
|
||||
<http://www.gnu.org/software/gdb/bugs/>.
|
||||
Find the GDB manual and other documentation resources online at:
|
||||
<http://www.gnu.org/software/gdb/documentation/>.
|
||||
For help, type "help".
|
||||
Type "apropos word" to search for commands related to "word"...
|
||||
Reading symbols from px4fmuv5_bl.elf...done.
|
||||
```
|
||||
```sh
|
||||
GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
Type "show copying" and "show warranty" for details.
|
||||
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
|
||||
Type "show configuration" for configuration details.
|
||||
For bug reporting instructions, please see:
|
||||
<http://www.gnu.org/software/gdb/bugs/>.
|
||||
Find the GDB manual and other documentation resources online at:
|
||||
<http://www.gnu.org/software/gdb/documentation/>.
|
||||
For help, type "help".
|
||||
Type "apropos word" to search for commands related to "word"...
|
||||
Reading symbols from px4fmuv5_bl.elf...done.
|
||||
```
|
||||
|
||||
5. Find your `<dronecode-probe-id>` by running an `ls` command in the **/dev/serial/by-id** directory.
|
||||
|
||||
6. Now connect to the debug probe with the following command:
|
||||
|
||||
```sh
|
||||
tar ext /dev/serial/by-id/<dronecode-probe-id>
|
||||
```
|
||||
```sh
|
||||
tar ext /dev/serial/by-id/<dronecode-probe-id>
|
||||
```
|
||||
|
||||
7. Power on the Pixhawk with another USB cable and connect the probe to the `FMU-DEBUG` port.
|
||||
|
||||
::: info
|
||||
If using a Dronecode probe you may need to remove the case in order to connect to the `FMU-DEBUG` port (e.g. on Pixhawk 4 you would do this using a T6 Torx screwdriver).
|
||||
::: info
|
||||
If using a Dronecode probe you may need to remove the case in order to connect to the `FMU-DEBUG` port (e.g. on Pixhawk 4 you would do this using a T6 Torx screwdriver).
|
||||
|
||||
:::
|
||||
|
||||
8. Use the following command to scan for the Pixhawk\`s SWD and connect to it:
|
||||
|
||||
```sh
|
||||
(gdb) mon swdp_scan
|
||||
(gdb) attach 1
|
||||
```
|
||||
```sh
|
||||
(gdb) mon swdp_scan
|
||||
(gdb) attach 1
|
||||
```
|
||||
|
||||
9. 이제 바이너리를 픽스호크에 로드하십시오:
|
||||
|
||||
```sh
|
||||
(gdb) load
|
||||
```
|
||||
```sh
|
||||
(gdb) load
|
||||
```
|
||||
|
||||
After the bootloader has updated you can [Load PX4 Firmware](../config/firmware.md) using _QGroundControl_.
|
||||
|
||||
@@ -147,8 +147,8 @@ Currently only FMUv2 and some custom firmware includes the desired bootloader.
|
||||
|
||||
2. [Update the Firmware](../config/firmware.md#custom) with an image containing the new/desired bootloader.
|
||||
|
||||
::: info
|
||||
The updated bootloader might be supplied in custom firmware (i.e. from the dev team), or it or may be included in the latest main branch.
|
||||
::: info
|
||||
The updated bootloader might be supplied in custom firmware (i.e. from the dev team), or it or may be included in the latest main branch.
|
||||
|
||||
:::
|
||||
|
||||
@@ -157,7 +157,7 @@ Currently only FMUv2 and some custom firmware includes the desired bootloader.
|
||||
4. [Find and enable](../advanced_config/parameters.md) the parameter [SYS_BL_UPDATE](../advanced_config/parameter_reference.md#SYS_BL_UPDATE).
|
||||
|
||||
5. 재부팅하십시오 (보드의 연결을 끊고 다시 연결하십시오.).
|
||||
부트로더 업데이트는 수초내에 완료됩니다.
|
||||
부트로더 업데이트는 수초내에 완료됩니다.
|
||||
|
||||
Generally at this point you may then want to [update the firmware](../config/firmware.md) again using the correct/newly installed bootloader.
|
||||
|
||||
@@ -177,25 +177,25 @@ To update the bootloader:
|
||||
1. SD카드를 삽입합니다 (발생 가능한 문제들의 디버깅을 위한 부트 로그 기록을 가능하게 합니다.)
|
||||
|
||||
2. [Update the Firmware](../config/firmware.md) to PX4 _master_ version (when updating the firmware, check **Advanced settings** and then select **Developer Build (master)** from the dropdown list).
|
||||
_QGroundControl_ will automatically detect that the hardware supports FMUv2 and install the appropriate Firmware.
|
||||
_QGroundControl_ will automatically detect that the hardware supports FMUv2 and install the appropriate Firmware.
|
||||
|
||||

|
||||

|
||||
|
||||
기체가 재부팅될 때까지 기다리십시오.
|
||||
기체가 재부팅될 때까지 기다리십시오.
|
||||
|
||||
3. [Find and enable](../advanced_config/parameters.md) the parameter [SYS_BL_UPDATE](../advanced_config/parameter_reference.md#SYS_BL_UPDATE).
|
||||
|
||||
4. 재부팅하십시오 (보드의 연결을 끊고 다시 연결하십시오.).
|
||||
부트로더 업데이트는 수초내에 완료됩니다.
|
||||
부트로더 업데이트는 수초내에 완료됩니다.
|
||||
|
||||
5. Then [Update the Firmware](../config/firmware.md) again.
|
||||
This time _QGroundControl_ should autodetect the hardware as FMUv3 and update the Firmware appropriately.
|
||||
This time _QGroundControl_ should autodetect the hardware as FMUv3 and update the Firmware appropriately.
|
||||
|
||||

|
||||

|
||||
|
||||
::: info
|
||||
If the hardware has the [Silicon Errata](../flight_controller/silicon_errata.md#fmuv2-pixhawk-silicon-errata) it will still be detected as FMUv2 and you will see that FMUv2 was re-installed (in console).
|
||||
In this case you will not be able to install FMUv3 hardware.
|
||||
::: info
|
||||
If the hardware has the [Silicon Errata](../flight_controller/silicon_errata.md#fmuv2-pixhawk-silicon-errata) it will still be detected as FMUv2 and you will see that FMUv2 was re-installed (in console).
|
||||
In this case you will not be able to install FMUv3 hardware.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ The process is demonstrated for a multicopter, but is equally valid for other ve
|
||||
- 기체에 시동을 걸고 스로틀을 천천히 최대로 올립니다.
|
||||
- 스로틀을 천천히 0까지 낮춥니다.
|
||||
- 기체 시동을 끄십시오.
|
||||
> <strong x-id="1">참고</strong> 진동을 면밀히 관찰하고, 신중하게 테스트를 진행하십시오.
|
||||
> <strong x-id="1">참고</strong> 진동을 면밀히 관찰하고, 신중하게 테스트를 진행하십시오.
|
||||
|
||||
::: info
|
||||
Perform the test carefully and closely monitor the vibrations.
|
||||
|
||||
@@ -94,29 +94,29 @@ ESC를 보정하려면 :
|
||||
|
||||
- The minimum value for a motor (default: `1100us`) should make the motor spin slowly but reliably, and also spin up reliably after it was stopped.
|
||||
|
||||
You can confirm that a motor spins at minimum (still without propellers) in [Actuator Testing](../config/actuators.md#actuator-testing), by enabling the sliders, and then moving the test output slider for the motor to the first snap position from the bottom.
|
||||
The correct value should make the motor spin immediately and reliably as you move the slider from disarmed to minimum.
|
||||
You can confirm that a motor spins at minimum (still without propellers) in [Actuator Testing](../config/actuators.md#actuator-testing), by enabling the sliders, and then moving the test output slider for the motor to the first snap position from the bottom.
|
||||
The correct value should make the motor spin immediately and reliably as you move the slider from disarmed to minimum.
|
||||
|
||||
To find the "optimal" minimum value, move the slider to the bottom (disarmed).
|
||||
Then increase the PWM output's `disarmed` setting in small increments (e.g. 1025us, 1050us, etc), until the motor starts to spin reliably (it is better to be a little too high than a little too low).
|
||||
Enter this value into the `minimum` setting for all the motor PWM outputs, and restore the `disarmed` output to `1100us`.
|
||||
To find the "optimal" minimum value, move the slider to the bottom (disarmed).
|
||||
Then increase the PWM output's `disarmed` setting in small increments (e.g. 1025us, 1050us, etc), until the motor starts to spin reliably (it is better to be a little too high than a little too low).
|
||||
Enter this value into the `minimum` setting for all the motor PWM outputs, and restore the `disarmed` output to `1100us`.
|
||||
|
||||
- The maximum value for a motor (default: `1900us`) should be chosen such that increasing the value doesn't make the motor spin any faster.
|
||||
|
||||
You can confirm that the motor spins quickly at the maximum setting in [Actuator Testing](../config/actuators.md#actuator-testing), by moving the associated test output slider to the top position.
|
||||
You can confirm that the motor spins quickly at the maximum setting in [Actuator Testing](../config/actuators.md#actuator-testing), by moving the associated test output slider to the top position.
|
||||
|
||||
To find the "optimal" maximum value, first move the slider to the bottom (disarmed).
|
||||
Then increase the PWM output's `disarmed` setting to near the default maximum (`1900`) - the motors should spin up.
|
||||
Listen to the tone of the motor as you increase the PWM maximum value for the output in increments (e.g. 1925us, 1950us, etc).
|
||||
The optimal value is found at the point when the sound of the motors does not change as you increase the value of the output.
|
||||
Enter this value into the `maximum` setting for all the motor PWM outputs, and restore the `disarmed` output to `1100us`.
|
||||
To find the "optimal" maximum value, first move the slider to the bottom (disarmed).
|
||||
Then increase the PWM output's `disarmed` setting to near the default maximum (`1900`) - the motors should spin up.
|
||||
Listen to the tone of the motor as you increase the PWM maximum value for the output in increments (e.g. 1925us, 1950us, etc).
|
||||
The optimal value is found at the point when the sound of the motors does not change as you increase the value of the output.
|
||||
Enter this value into the `maximum` setting for all the motor PWM outputs, and restore the `disarmed` output to `1100us`.
|
||||
|
||||
- The disarmed value for a motor (default: `1000us`) should make the motor stop and stay stopped.
|
||||
|
||||
You can confirm this in [Actuator Testing](../config/actuators.md#actuator-testing) by moving the test output slider to the snap position at the bottom of the slider and observing that the motor does not spin.
|
||||
You can confirm this in [Actuator Testing](../config/actuators.md#actuator-testing) by moving the test output slider to the snap position at the bottom of the slider and observing that the motor does not spin.
|
||||
|
||||
If the ESC spins with the default value of 1000us then the ESC is not properly calibrated.
|
||||
If using an ESC that can't be calibrated, you should reduce the PWM output value for the output to below where the motor does not spin anymore (such as 950us or 900us).
|
||||
If the ESC spins with the default value of 1000us then the ESC is not properly calibrated.
|
||||
If using an ESC that can't be calibrated, you should reduce the PWM output value for the output to below where the motor does not spin anymore (such as 950us or 900us).
|
||||
|
||||
::: info
|
||||
VTOL and fixed-wing motors do not need any special PWM configuration.
|
||||
|
||||
@@ -87,14 +87,14 @@ To set the above "example" configuration using the _QGroundControl_:
|
||||
|
||||
3. Enter commands "like" the ones below into the _MAVLink Console_ (to write the values to the configuration file):
|
||||
|
||||
```sh
|
||||
echo DEVICE=eth0 > /fs/microsd/net.cfg
|
||||
echo BOOTPROTO=fallback >> /fs/microsd/net.cfg
|
||||
echo IPADDR=10.41.10.2 >> /fs/microsd/net.cfg
|
||||
echo NETMASK=255.255.255.0 >>/fs/microsd/net.cfg
|
||||
echo ROUTER=10.41.10.254 >>/fs/microsd/net.cfg
|
||||
echo DNS=10.41.10.254 >>/fs/microsd/net.cfg
|
||||
```
|
||||
```sh
|
||||
echo DEVICE=eth0 > /fs/microsd/net.cfg
|
||||
echo BOOTPROTO=fallback >> /fs/microsd/net.cfg
|
||||
echo IPADDR=10.41.10.2 >> /fs/microsd/net.cfg
|
||||
echo NETMASK=255.255.255.0 >>/fs/microsd/net.cfg
|
||||
echo ROUTER=10.41.10.254 >>/fs/microsd/net.cfg
|
||||
echo DNS=10.41.10.254 >>/fs/microsd/net.cfg
|
||||
```
|
||||
|
||||
4. Once the network configuration has been set you can disconnect the USB cable.
|
||||
|
||||
@@ -113,36 +113,36 @@ Note that there are many more [examples](https://netplan.io/examples/) and instr
|
||||
To setup the Ubuntu Computer:
|
||||
|
||||
1. In a terminal, create and open a `netplan` configuration file: `/etc/netplan/01-network-manager-all.yaml`
|
||||
Below we do this using the _nano_ text editor.
|
||||
Below we do this using the _nano_ text editor.
|
||||
|
||||
```
|
||||
sudo nano /etc/netplan/01-network-manager-all.yaml
|
||||
```
|
||||
```
|
||||
sudo nano /etc/netplan/01-network-manager-all.yaml
|
||||
```
|
||||
|
||||
2. Copy and paste the following configuration information into the file (note: the indentations are important!):
|
||||
|
||||
```
|
||||
network:
|
||||
version: 2
|
||||
renderer: NetworkManager
|
||||
ethernets:
|
||||
enp2s0:
|
||||
addresses:
|
||||
- 10.41.10.1/24
|
||||
nameservers:
|
||||
addresses: [10.41.10.1]
|
||||
routes:
|
||||
- to: 10.41.10.1
|
||||
via: 10.41.10.1
|
||||
```
|
||||
```
|
||||
network:
|
||||
version: 2
|
||||
renderer: NetworkManager
|
||||
ethernets:
|
||||
enp2s0:
|
||||
addresses:
|
||||
- 10.41.10.1/24
|
||||
nameservers:
|
||||
addresses: [10.41.10.1]
|
||||
routes:
|
||||
- to: 10.41.10.1
|
||||
via: 10.41.10.1
|
||||
```
|
||||
|
||||
Save and exit the editor.
|
||||
Save and exit the editor.
|
||||
|
||||
3. Apply the _netplan_ configuration by entering the following command into the Ubuntu terminal.
|
||||
|
||||
```
|
||||
sudo netplan apply
|
||||
```
|
||||
```
|
||||
sudo netplan apply
|
||||
```
|
||||
|
||||
### Companion Computer Ethernet Network Setup
|
||||
|
||||
@@ -189,9 +189,9 @@ To connect QGroundControl to PX4 over Ethernet:
|
||||
|
||||
3. Start QGroundControl and [define a comm link](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/settings_view/settings_view.html) (**Application Settings > Comm Links**) specifying the _server address_ and port as the IP address and port assigned in PX4, respectively.
|
||||
|
||||
Assuming that the values are set as described in the rest of this topic the setup will look like this:
|
||||
Assuming that the values are set as described in the rest of this topic the setup will look like this:
|
||||
|
||||

|
||||

|
||||
|
||||
4. QGroundControl should then connect if you select this link.
|
||||
|
||||
@@ -205,14 +205,14 @@ To setup MAVSDK-Python running on a companion computer:
|
||||
|
||||
1. [Set up the Ethernet Network](#setting-up-the-ethernet-network) so your companion computer and PX4 run on the same network.
|
||||
2. Modify the [PX4 Ethernet Port Configuration](#px4-ethernet-network-setup) to connect to a companion computer.
|
||||
You might change the parameters [MAV_2_REMOTE_PRT](../advanced_config/parameter_reference.md#MAV_2_REMOTE_PRT) and [MAV_2_UDP_PRT](../advanced_config/parameter_reference.md#MAV_2_UDP_PRT) to `14540`, and [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) to `2` (Onboard).
|
||||
You might change the parameters [MAV_2_REMOTE_PRT](../advanced_config/parameter_reference.md#MAV_2_REMOTE_PRT) and [MAV_2_UDP_PRT](../advanced_config/parameter_reference.md#MAV_2_UDP_PRT) to `14540`, and [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) to `2` (Onboard).
|
||||
3. Follow the instructions in [MAVSDK-python](https://github.com/mavlink/MAVSDK-Python) to install and use MAVSDK.
|
||||
|
||||
For example, your code will connect to the PX4 using:
|
||||
For example, your code will connect to the PX4 using:
|
||||
|
||||
```python
|
||||
await drone.connect(system_address="udp://10.41.10.2:14540")
|
||||
```
|
||||
```python
|
||||
await drone.connect(system_address="udp://10.41.10.2:14540")
|
||||
```
|
||||
|
||||
:::info
|
||||
MAVSDK can connect to the PX4 on port `14550` if you don't modify the PX4 Ethernet port configuration.
|
||||
@@ -235,38 +235,38 @@ To set up ROS 2:
|
||||
1. Connect your flight controller and companion computer via Ethernet.
|
||||
|
||||
2. [Start the uXRCE-DDS client on PX4](../middleware/uxrce_dds.md#starting-the-client), either manually or by customizing the system startup script.
|
||||
Note that you must use the IP address of the companion computer and the UDP port on which the agent is listening (the example configuration above sets the companion IP address to `10.41.10.1`, and the agent UDP port is set to `8888` in the next step).
|
||||
Note that you must use the IP address of the companion computer and the UDP port on which the agent is listening (the example configuration above sets the companion IP address to `10.41.10.1`, and the agent UDP port is set to `8888` in the next step).
|
||||
|
||||
3. [Start the micro XRCE-DDS agent on the companion computer](../middleware/uxrce_dds.md#starting-the-agent).
|
||||
For example, enter the following command in a terminal to start the agent listening on UDP port `8888`.
|
||||
For example, enter the following command in a terminal to start the agent listening on UDP port `8888`.
|
||||
|
||||
```sh
|
||||
MicroXRCEAgent udp4 -p 8888
|
||||
```
|
||||
```sh
|
||||
MicroXRCEAgent udp4 -p 8888
|
||||
```
|
||||
|
||||
4. Run a [listener node](../ros2/user_guide.md#running-the-example) in a new terminal to confirm the connection is established:
|
||||
|
||||
```sh
|
||||
source ~/ws_sensor_combined/install/setup.bash
|
||||
ros2 launch px4_ros_com sensor_combined_listener.launch.py
|
||||
```
|
||||
```sh
|
||||
source ~/ws_sensor_combined/install/setup.bash
|
||||
ros2 launch px4_ros_com sensor_combined_listener.launch.py
|
||||
```
|
||||
|
||||
If everything is setup correctly, the following output should be displayed in the terminal:
|
||||
If everything is setup correctly, the following output should be displayed in the terminal:
|
||||
|
||||
```sh
|
||||
RECEIVED SENSOR COMBINED DATA
|
||||
=============================
|
||||
ts: 855801598
|
||||
gyro_rad[0]: -0.00339938
|
||||
gyro_rad[1]: 0.00440091
|
||||
gyro_rad[2]: 0.00513893
|
||||
gyro_integral_dt: 4997
|
||||
accelerometer_timestamp_relative: 0
|
||||
accelerometer_m_s2[0]: -0.0324082
|
||||
accelerometer_m_s2[1]: 0.0392213
|
||||
accelerometer_m_s2[2]: -9.77914
|
||||
accelerometer_integral_dt: 4997
|
||||
```
|
||||
```sh
|
||||
RECEIVED SENSOR COMBINED DATA
|
||||
=============================
|
||||
ts: 855801598
|
||||
gyro_rad[0]: -0.00339938
|
||||
gyro_rad[1]: 0.00440091
|
||||
gyro_rad[2]: 0.00513893
|
||||
gyro_integral_dt: 4997
|
||||
accelerometer_timestamp_relative: 0
|
||||
accelerometer_m_s2[0]: -0.0324082
|
||||
accelerometer_m_s2[1]: 0.0392213
|
||||
accelerometer_m_s2[2]: -9.77914
|
||||
accelerometer_integral_dt: 4997
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
|
||||
@@ -153,15 +153,15 @@ It corresponds to: [COM_PREARM_MODE=1](#COM_PREARM_MODE) (safety switch) and [CB
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시동 걸기 불가능
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시동 걸기 불가능
|
||||
2. 안전 스위치 누름
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
3. 시동 명령 인가
|
||||
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### COM_PREARM_MODE = Disabled and Safety Switch
|
||||
|
||||
@@ -171,15 +171,15 @@ This corresponds to [COM_PREARM_MODE=0](#COM_PREARM_MODE) (Disabled) and [CBRK_I
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시동 걸기 불가능
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시동 걸기 불가능
|
||||
2. 안전 스위치 누름
|
||||
- _All actuators stay locked into disarmed position (same as disarmed)._
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- _All actuators stay locked into disarmed position (same as disarmed)._
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
3. 시동 명령 인가
|
||||
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### COM_PREARM_MODE = Always and Safety Switch
|
||||
|
||||
@@ -190,13 +190,13 @@ This corresponds to [COM_PREARM_MODE=2](#COM_PREARM_MODE) (Always) and [CBRK_IO_
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시동 걸기 불가능
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시동 걸기 불가능
|
||||
2. 안전 스위치 누름
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
3. 시동 명령 인가
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### COM_PREARM_MODE = Safety or Disabled and No Safety Switch
|
||||
|
||||
@@ -206,11 +206,11 @@ This corresponds to [COM_PREARM_MODE=0 or 1](#COM_PREARM_MODE) (Disabled/Safety
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
2. 시동 명령 인가
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### COM_PREARM_MODE = Always and No Safety Switch
|
||||
|
||||
@@ -220,11 +220,11 @@ This corresponds to [COM_PREARM_MODE=2](#COM_PREARM_MODE) (Always) and [CBRK_IO_
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
2. 시동 명령 인가
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### 매개변수
|
||||
|
||||
|
||||
@@ -102,11 +102,11 @@ PX4는 두 가지 보정 절차를 지원합니다.
|
||||
|
||||
9. Open a terminal window in the **Firmware/Tools** directory and run the python calibration script:
|
||||
|
||||
```sh
|
||||
python process_sensor_caldata.py <full path name to .ulog file>
|
||||
```
|
||||
```sh
|
||||
python process_sensor_caldata.py <full path name to .ulog file>
|
||||
```
|
||||
|
||||
This will generate a **.pdf** file showing the measured data and curve fits for each sensor, and a **.params** file containing the calibration parameters.
|
||||
This will generate a **.pdf** file showing the measured data and curve fits for each sensor, and a **.params** file containing the calibration parameters.
|
||||
|
||||
10. Power the board, connect _QGroundControl_ and load the parameter from the generated **.params** file onto the board using _QGroundControl_. 매개변수의 갯수가 많이지므로, 로드 시간이 길어질 수 있습니다.
|
||||
|
||||
|
||||
@@ -158,29 +158,29 @@ Three axis body fixed magnetometer data at a minimum rate of 5Hz is required to
|
||||
Magnetometer data fusion can be configured using [EKF2_MAG_TYPE](../advanced_config/parameter_reference.md#EKF2_MAG_TYPE):
|
||||
|
||||
0. Automatic:
|
||||
- The magnetometer readings only affect the heading estimate before arming, and the whole attitude after arming.
|
||||
- Heading and tilt errors are compensated when using this method.
|
||||
- Incorrect magnetic field measurements can degrade the tilt estimate.
|
||||
- The magnetometer biases are estimated whenever observable.
|
||||
- The magnetometer readings only affect the heading estimate before arming, and the whole attitude after arming.
|
||||
- Heading and tilt errors are compensated when using this method.
|
||||
- Incorrect magnetic field measurements can degrade the tilt estimate.
|
||||
- The magnetometer biases are estimated whenever observable.
|
||||
1. Magnetic heading:
|
||||
- Only the heading is corrected.
|
||||
The tilt estimate is never affected by incorrect magnetic field measurements.
|
||||
- Tilt errors that could arise when flying without velocity/position aiding are not corrected when using this method.
|
||||
- The magnetometer biases are estimated whenever observable.
|
||||
- Only the heading is corrected.
|
||||
The tilt estimate is never affected by incorrect magnetic field measurements.
|
||||
- Tilt errors that could arise when flying without velocity/position aiding are not corrected when using this method.
|
||||
- The magnetometer biases are estimated whenever observable.
|
||||
2. Deprecated
|
||||
3. Deprecated
|
||||
4. Deprecated
|
||||
5. None:
|
||||
- Magnetometer data is never used.
|
||||
This is useful when the data can never be trusted (e.g.: high current close to the sensor, external anomalies).
|
||||
- The estimator will use other sources of heading: [GPS heading](#yaw-measurements) or external vision.
|
||||
- When using GPS measurements without another source of heading, the heading can only be initialized after sufficient horizontal acceleration.
|
||||
See [Estimate yaw from vehicle movement](#yaw-from-gps-velocity) below.
|
||||
- Magnetometer data is never used.
|
||||
This is useful when the data can never be trusted (e.g.: high current close to the sensor, external anomalies).
|
||||
- The estimator will use other sources of heading: [GPS heading](#yaw-measurements) or external vision.
|
||||
- When using GPS measurements without another source of heading, the heading can only be initialized after sufficient horizontal acceleration.
|
||||
See [Estimate yaw from vehicle movement](#yaw-from-gps-velocity) below.
|
||||
6. Init only:
|
||||
- Magnetometer data is only used to initialize the heading estimate.
|
||||
This is useful when the data can be used before arming but not afterwards (e.g.: high current after the vehicle is armed).
|
||||
- After initialization, the heading is constrained using other observations.
|
||||
- Unlike mag type `None`, when combined with GPS measurements, this method allows position controlled modes to run directly during takeoff.
|
||||
- Magnetometer data is only used to initialize the heading estimate.
|
||||
This is useful when the data can be used before arming but not afterwards (e.g.: high current after the vehicle is armed).
|
||||
- After initialization, the heading is constrained using other observations.
|
||||
- Unlike mag type `None`, when combined with GPS measurements, this method allows position controlled modes to run directly during takeoff.
|
||||
|
||||
The following selection tree can be used to select the right option:
|
||||
|
||||
@@ -242,8 +242,8 @@ A good tuning is obtained as follows:
|
||||
|
||||
2. Extract the `.ulg` log file using, for example, [QGroundControl: Analyze > Log Download](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/log_download.html)
|
||||
|
||||
::: info
|
||||
The same log file can be used to tune the [multirotor wind estimator](#mc_wind_estimation_using_drag).
|
||||
::: info
|
||||
The same log file can be used to tune the [multirotor wind estimator](#mc_wind_estimation_using_drag).
|
||||
|
||||
:::
|
||||
|
||||
@@ -461,8 +461,8 @@ A good tuning is obtained as follows:
|
||||
|
||||
1. Fly once in [Position mode](../flight_modes_mc/position.md) repeatedly forwards/backwards/left/right/up/down between rest and maximum speed (best results are obtained when this testing is conducted in still conditions).
|
||||
2. Extract the **.ulg** log file using, for example, [QGroundControl: Analyze > Log Download](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/log_download.html)
|
||||
::: info
|
||||
The same **.ulg** log file can also be used to tune the [static pressure position error coefficients](#correction-for-static-pressure-position-error).
|
||||
::: info
|
||||
The same **.ulg** log file can also be used to tune the [static pressure position error coefficients](#correction-for-static-pressure-position-error).
|
||||
|
||||
:::
|
||||
3. Use the log with the [mc_wind_estimator_tuning.py](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/ekf2/EKF/python/tuning_tools/mc_wind_estimator) Python script to obtain the optimal set of parameters.
|
||||
|
||||
@@ -38,14 +38,14 @@ If it is not visible the vehicle immediately performs a _normal_ landing at the
|
||||
정밀 착륙에는 세 단계가 있습니다.
|
||||
|
||||
1. **Horizontal approach:** The vehicle approaches the target horizontally while keeping its current altitude.
|
||||
Once the position of the target relative to the vehicle is below a threshold ([PLD_HACC_RAD](../advanced_config/parameter_reference.md#PLD_HACC_RAD)), the next phase is entered.
|
||||
If the target is lost during this phase (not visible for longer than [PLD_BTOUT](../advanced_config/parameter_reference.md#PLD_BTOUT)), a search procedure is initiated (during a required precision landing) or the vehicle does a normal landing (during an opportunistic precision landing).
|
||||
Once the position of the target relative to the vehicle is below a threshold ([PLD_HACC_RAD](../advanced_config/parameter_reference.md#PLD_HACC_RAD)), the next phase is entered.
|
||||
If the target is lost during this phase (not visible for longer than [PLD_BTOUT](../advanced_config/parameter_reference.md#PLD_BTOUT)), a search procedure is initiated (during a required precision landing) or the vehicle does a normal landing (during an opportunistic precision landing).
|
||||
|
||||
2. **Descent over target:** The vehicle descends, while remaining centered over the target.
|
||||
If the target is lost during this phase (not visible for longer than `PLD_BTOUT`), a search procedure is initiated (during a required precision landing) or the vehicle does a normal landing (during an opportunistic precision landing).
|
||||
If the target is lost during this phase (not visible for longer than `PLD_BTOUT`), a search procedure is initiated (during a required precision landing) or the vehicle does a normal landing (during an opportunistic precision landing).
|
||||
|
||||
3. **Final approach:** When the vehicle is close to the ground (closer than [PLD_FAPPR_ALT](../advanced_config/parameter_reference.md#PLD_FAPPR_ALT)), it descends while remaining centered over the target.
|
||||
만약 목표물이 이 단계에서 잡히지 않는다면, 기체는 정밀 착륙의 모드와 무관하게 계속 하강합니다.
|
||||
만약 목표물이 이 단계에서 잡히지 않는다면, 기체는 정밀 착륙의 모드와 무관하게 계속 하강합니다.
|
||||
|
||||
Search procedures are initiated in the first and second steps, and will run at most [PLD_MAX_SRCH](../advanced_config/parameter_reference.md#PLD_MAX_SRCH) times.
|
||||
착륙 단계 흐름도
|
||||
|
||||
@@ -54,19 +54,19 @@ To [switch between the two antennas modes](https://docs.rockblock.rock7.com/docs
|
||||
모듈의 기본 보드 속도는 19200입니다. However, the PX4 _iridiumsbd_ driver requires a baud rate of 115200 so it needs to be changed using the [AT commands](https://www.groundcontrol.com/en/wp-content/uploads/2022/02/IRDM_ISU_ATCommandReferenceMAN0009_Rev2.0_ATCOMM_Oct2012.pdf).
|
||||
|
||||
1. Connect to the module with using a 19200/8-N-1 setting and check if the communication is working using the command: `AT`.
|
||||
The response should be: `OK`.
|
||||
The response should be: `OK`.
|
||||
|
||||
2. baudrate 속도를 변경합니다.
|
||||
|
||||
```
|
||||
AT+IPR=9
|
||||
```
|
||||
```
|
||||
AT+IPR=9
|
||||
```
|
||||
|
||||
3. 이제 115200/8-N-1 설정을 사용하여 모델에 다시 연결하고 다음을 사용하여 설정을 저장합니다.
|
||||
|
||||
```
|
||||
AT&W0
|
||||
```
|
||||
```
|
||||
AT&W0
|
||||
```
|
||||
|
||||
이제 이 모듈을 PX4에서 사용할 수 있습니다.
|
||||
|
||||
@@ -102,55 +102,55 @@ Log in to the [account](https://rockblock.rock7.com/Operations) and register the
|
||||
|
||||
1. 메시지 릴레이로 작동하는 서버에는 고정 IP 주소와 열린 TCP 포트 2개가 있어야 합니다.
|
||||
|
||||
- `5672` for the _RabbitMQ_ message broker (can be changed in the _rabbitmq_ settings)
|
||||
- `45679` for the HTTP POST interface (can be changed in the **relay.cfg** file)
|
||||
- `5672` for the _RabbitMQ_ message broker (can be changed in the _rabbitmq_ settings)
|
||||
- `45679` for the HTTP POST interface (can be changed in the **relay.cfg** file)
|
||||
|
||||
2. 필요한 Python 모듈을 설치합니다.
|
||||
|
||||
```sh
|
||||
sudo pip install pika tornado future
|
||||
```
|
||||
```sh
|
||||
sudo pip install pika tornado future
|
||||
```
|
||||
|
||||
3. Install the `rabbitmq` message broker:
|
||||
|
||||
```sh
|
||||
sudo apt install rabbitmq-server
|
||||
```
|
||||
```sh
|
||||
sudo apt install rabbitmq-server
|
||||
```
|
||||
|
||||
4. 브로커 자격 증명을 구성합니다(암호를 PWD로 변경).
|
||||
|
||||
```sh
|
||||
sudo rabbitmqctl add_user iridiumsbd PWD
|
||||
sudo rabbitmqctl set_permissions iridiumsbd ".*" ".*" ".*"
|
||||
```
|
||||
```sh
|
||||
sudo rabbitmqctl add_user iridiumsbd PWD
|
||||
sudo rabbitmqctl set_permissions iridiumsbd ".*" ".*" ".*"
|
||||
```
|
||||
|
||||
5. Clone the [SatComInfrastructure](https://github.com/acfloria/SatComInfrastructure.git) repository:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/acfloria/SatComInfrastructure.git
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/acfloria/SatComInfrastructure.git
|
||||
```
|
||||
|
||||
6. Go to the location of the _SatComInfrastructure_ repo and configure the broker's queues:
|
||||
|
||||
```sh
|
||||
./setup_rabbit.py localhost iridiumsbd PWD
|
||||
```
|
||||
```sh
|
||||
./setup_rabbit.py localhost iridiumsbd PWD
|
||||
```
|
||||
|
||||
7. 설정을 확인합니다.
|
||||
|
||||
```sh
|
||||
sudo rabbitmqctl list_queues
|
||||
```
|
||||
```sh
|
||||
sudo rabbitmqctl list_queues
|
||||
```
|
||||
|
||||
This should give you a list of 4 queues: `MO`, `MO_LOG`, `MT`, `MT_LOG`
|
||||
This should give you a list of 4 queues: `MO`, `MO_LOG`, `MT`, `MT_LOG`
|
||||
|
||||
8. Edit the `relay.cfg` configuration file to reflect your settings.
|
||||
|
||||
9. 분리 모드에서 릴레이 스크립트를 실행합니다.
|
||||
|
||||
```sh
|
||||
screen -dm bash -c 'cd SatcomInfrastructure/; ./relay.py
|
||||
```
|
||||
```sh
|
||||
screen -dm bash -c 'cd SatcomInfrastructure/; ./relay.py
|
||||
```
|
||||
|
||||
기타 지침은 다음과 같습니다.
|
||||
|
||||
@@ -178,15 +178,15 @@ Log in to the [account](https://rockblock.rock7.com/Operations) and register the
|
||||
|
||||
1. 필요한 Python 모듈을 설치합니다.
|
||||
|
||||
```sh
|
||||
sudo pip install pika tornado future
|
||||
```
|
||||
```sh
|
||||
sudo pip install pika tornado future
|
||||
```
|
||||
|
||||
2. SatComInfrarastructure 저장소 복제:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/acfloria/SatComInfrastructure.git
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/acfloria/SatComInfrastructure.git
|
||||
```
|
||||
|
||||
3. Edit the **udp2rabbit.cfg** configuration file to reflect your settings.
|
||||
|
||||
@@ -194,20 +194,20 @@ Log in to the [account](https://rockblock.rock7.com/Operations) and register the
|
||||
|
||||
5. 다음 매개 변수를 사용하여 QGC에서 UDP 연결을 추가합니다.
|
||||
|
||||
- 접속 포트: 10000
|
||||
- 대상 호스트: 127.0.0.1:10001
|
||||
- 높은 지연 시간: 확인됨
|
||||
- 접속 포트: 10000
|
||||
- 대상 호스트: 127.0.0.1:10001
|
||||
- 높은 지연 시간: 확인됨
|
||||
|
||||

|
||||

|
||||
|
||||
### 검증
|
||||
|
||||
1. Open a terminal on the ground station computer and change to the location of the _SatComInfrastructure_ repository.
|
||||
Then start the **udp2rabbit.py** script:
|
||||
Then start the **udp2rabbit.py** script:
|
||||
|
||||
```sh
|
||||
./udp2rabbit.py
|
||||
```
|
||||
```sh
|
||||
./udp2rabbit.py
|
||||
```
|
||||
|
||||
2. Send a test message from [RockBlock Account](https://rockblock.rock7.com/Operations) to the created delivery group in the `Test Delivery Groups` tab.
|
||||
|
||||
@@ -218,36 +218,36 @@ If in the terminal where the `udp2rabbit.py` script is running within a couple o
|
||||
## 시스템 실행
|
||||
|
||||
1. Start _QGroundControl_.
|
||||
먼저 높은 지연 시간 링크를 수동으로 연결한 다음, 일반 텔레메트리 링크를 연결합니다.
|
||||
먼저 높은 지연 시간 링크를 수동으로 연결한 다음, 일반 텔레메트리 링크를 연결합니다.
|
||||
|
||||

|
||||

|
||||
|
||||
2. Open a terminal on the ground station computer and change to the location of the _SatComInfrastructure_ repository.
|
||||
Then start the **udp2rabbit.py** script:
|
||||
Then start the **udp2rabbit.py** script:
|
||||
|
||||
```sh
|
||||
./udp2rabbit.py
|
||||
```
|
||||
```sh
|
||||
./udp2rabbit.py
|
||||
```
|
||||
|
||||
3. 기체의 전원을 켭니다.
|
||||
|
||||
4. Wait until the first `HIGH_LATENCY2` message is received on QGC.
|
||||
This can be checked either using the _MAVLink Inspector_ widget or on the toolbar with the _LinkIndicator_.
|
||||
If more than one link is connected to the active vehicle the _LinkIndicator_ shows all of them by clicking on the name of the shown link:
|
||||
This can be checked either using the _MAVLink Inspector_ widget or on the toolbar with the _LinkIndicator_.
|
||||
If more than one link is connected to the active vehicle the _LinkIndicator_ shows all of them by clicking on the name of the shown link:
|
||||
|
||||

|
||||

|
||||
|
||||
링크 표시기는 항상 우선 순위 링크의 이름을 표시합니다.
|
||||
링크 표시기는 항상 우선 순위 링크의 이름을 표시합니다.
|
||||
|
||||
5. 이제 위성 통신 시스템을 사용할 준비가 되었습니다.우선 순위 링크(명령 전송 링크)는 다음 방법으로 결정됩니다.
|
||||
|
||||
- 사용자가 링크를 명령하지 않으면, 지연 시간이 큰 링크보다 일반적인 텔레메트리 링크가 선호됩니다.
|
||||
- 기체가 시동을 켜고 텔레메트리 링크가 끊어지면(특정 시간 동안 MAVLink 메시지가 수신되지 않을 경우), 오토파일럿과 QGC는 일반 텔레메트리에서 긴 대기 시간 링크로 되돌아갑니다.
|
||||
텔레메트리 링크가 복구되는 즉시 QGC와 자동 조종기가 다시 이 링크로 전환됩니다.
|
||||
- The user can select a priority link over the `LinkIndicator` on the toolbar.
|
||||
이 링크가 활성화되어 있거나 사용자가 다른 우선 순위 링크를 선택하면 이 링크는 우선 순위 링크로 유지됩니다.
|
||||
- 사용자가 링크를 명령하지 않으면, 지연 시간이 큰 링크보다 일반적인 텔레메트리 링크가 선호됩니다.
|
||||
- 기체가 시동을 켜고 텔레메트리 링크가 끊어지면(특정 시간 동안 MAVLink 메시지가 수신되지 않을 경우), 오토파일럿과 QGC는 일반 텔레메트리에서 긴 대기 시간 링크로 되돌아갑니다.
|
||||
텔레메트리 링크가 복구되는 즉시 QGC와 자동 조종기가 다시 이 링크로 전환됩니다.
|
||||
- The user can select a priority link over the `LinkIndicator` on the toolbar.
|
||||
이 링크가 활성화되어 있거나 사용자가 다른 우선 순위 링크를 선택하면 이 링크는 우선 순위 링크로 유지됩니다.
|
||||
|
||||

|
||||

|
||||
|
||||
## 문제 해결
|
||||
|
||||
|
||||
@@ -514,7 +514,7 @@ div.frame_variant td, div.frame_variant th {
|
||||
</table>
|
||||
</div>
|
||||
|
||||
## 고정익
|
||||
## Plane
|
||||
|
||||
### 플라잉 윙
|
||||
|
||||
@@ -801,3 +801,4 @@ div.frame_variant td, div.frame_variant th {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
frame: 고정익
|
||||
frame: Plane
|
||||
title: Assembling a Fixed-Wing
|
||||
newEditLink: en/assembly/_assembly.md
|
||||
---
|
||||
|
||||
@@ -4,4 +4,4 @@ frame: 수직이착륙기(VTOL)
|
||||
newEditLink: en/assembly/_assembly.md
|
||||
---
|
||||
|
||||
<!--@include: _assembly.md-->
|
||||
<!--@include: _assembly.md-->
|
||||
@@ -3,4 +3,4 @@ frame: General
|
||||
newEditLink: en/assembly/_assembly.md
|
||||
---
|
||||
|
||||
<!--@include: _assembly.md-->
|
||||
<!--@include: _assembly.md-->
|
||||
@@ -49,7 +49,7 @@ The GPS/compass should be [mounted on the frame](../assembly/mount_gps_compass.m
|
||||

|
||||
|
||||
:::info
|
||||
Pixhawk V6X<sup>&reg;</sup> is not compatible with NEO V2 GPS built-in buzzer: you should use [NEO3/NEO 3Pro](https://store.cuav.net/shop/neo-3/) instead.
|
||||
Pixhawk V6X<sup>®</sup> is not compatible with NEO V2 GPS built-in buzzer: you should use [NEO3/NEO 3Pro](https://store.cuav.net/shop/neo-3/) instead.
|
||||
The GPS module's integrated safety switch is enabled _by default_ (when enabled, PX4 will not let you arm the vehicle).
|
||||
비활성화하려면 안전 스위치를 1초간 길게 누르십시오.
|
||||
안전 스위치를 다시 눌러 안전 장치를 활성화하고 기체 시동을 끌 수 있습니다.
|
||||
|
||||
@@ -32,4 +32,4 @@
|
||||
유용한 참고사항들입니다.
|
||||
|
||||
- [An Introduction to Shock & Vibration Response Spectra, Tom Irvine](http://www.vibrationdata.com/tutorials2/srs_intr.pdf) (free paper)
|
||||
- [Structural Dynamics and Vibration in Practice - An Engineering Handbook, Douglas Thorby](https://books.google.ch/books?id=PwzDuWDc8AgC\&printsec=frontcover) (preview).
|
||||
- Structural Dynamics and Vibration in Practice - An Engineering Handbook, Douglas Thorby (preview).
|
||||
|
||||
@@ -188,16 +188,16 @@ The following sections are out of date and need retesting.
|
||||
|
||||
1. On the PX4 console:
|
||||
|
||||
```shell
|
||||
camera_trigger test
|
||||
```
|
||||
```shell
|
||||
camera_trigger test
|
||||
```
|
||||
|
||||
2. From _QGroundControl_:
|
||||
|
||||
Click on **Trigger Camera** in the main instrument panel.
|
||||
These shots are not logged or counted for geotagging.
|
||||
Click on **Trigger Camera** in the main instrument panel.
|
||||
These shots are not logged or counted for geotagging.
|
||||
|
||||

|
||||

|
||||
|
||||
## Sony QX-1 example (Photogrammetry)
|
||||
|
||||
|
||||
@@ -17,4 +17,4 @@ If a camera does not support this prototol, a [camera manager](../camera/mavlink
|
||||
## See Also
|
||||
|
||||
- [Gimbal (Camera Mount)](../advanced/gimbal_control.md)
|
||||
- [Camera Integration/Architecture](../camera/camera_architecture.md) (PX4 Developers)
|
||||
- [Camera Integration/Architecture](../camera/camera_architecture.md) (PX4 Developers)
|
||||
@@ -86,7 +86,7 @@ The document explains how, but in summary:
|
||||
|
||||
1. Modify an unused `MAV_n_CONFIG` parameter, such as [MAV_2_CONFIG](../advanced_config/parameter_reference.md#MAV_2_CONFIG), so that it is assigned to port to which your camera is connected.
|
||||
2. Set the corresponding [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) to `2` (Onboard).
|
||||
This ensures that the right set of MAVLink messages are emitted and forwarded.
|
||||
This ensures that the right set of MAVLink messages are emitted and forwarded.
|
||||
3. You may need to set some of the other parameters, depending on your connection - such as the baud rate.
|
||||
|
||||
Then connect and configure the camera as recommended in its user guide.
|
||||
|
||||
@@ -112,7 +112,7 @@ The linked document explains how, but in summary:
|
||||
|
||||
1. Modify an unused `MAV_n_CONFIG` parameter, such as [MAV_2_CONFIG](../advanced_config/parameter_reference.md#MAV_2_CONFIG), so that it is assigned to port to which you connected the camera/companion computer.
|
||||
2. Set the corresponding [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) to `2` (Onboard).
|
||||
This ensures that the right set of MAVLink messages are emitted for a companion computer (or camera).
|
||||
This ensures that the right set of MAVLink messages are emitted for a companion computer (or camera).
|
||||
3. Set [MAV_2_FORWARD](../advanced_config/parameter_reference.md#MAV_2_FORWARD) to enable forwarding of communications from the port to other ports, such as the one that is connected to the ground station.
|
||||
4. You may need to set some of the other parameters, depending on your connection type and any particular requirements of the camera on the expected baud rate, and so on.
|
||||
|
||||
|
||||
@@ -69,15 +69,15 @@ To install the RPi CM4 companion computer:
|
||||
|
||||
1. Disconnect the `FAN` wiring.
|
||||
|
||||

|
||||

|
||||
|
||||
2. Remove these 4 screws on the back side of the baseboard.
|
||||
|
||||

|
||||

|
||||
|
||||
3. Remove the baseboard case, install the CM4, and use the 4 screws to attach it (as shown):
|
||||
|
||||

|
||||

|
||||
|
||||
4. Reattach the cover.
|
||||
|
||||
@@ -115,29 +115,29 @@ To flash a RPi image onto EMMC.
|
||||
|
||||
1. Switch Dip-Switch to `RPI`.
|
||||
|
||||

|
||||

|
||||
|
||||
2. Connect computer to USB-C _CM4 Slave_ port used to power & flash the RPi.
|
||||
|
||||

|
||||

|
||||
|
||||
3. Get `usbboot`, build it and run it.
|
||||
|
||||
```sh
|
||||
sudo apt install libusb-1.0-0-dev
|
||||
git clone --depth=1 https://github.com/raspberrypi/usbboot
|
||||
cd usbboot
|
||||
make
|
||||
sudo ./rpiboot
|
||||
```
|
||||
```sh
|
||||
sudo apt install libusb-1.0-0-dev
|
||||
git clone --depth=1 https://github.com/raspberrypi/usbboot
|
||||
cd usbboot
|
||||
make
|
||||
sudo ./rpiboot
|
||||
```
|
||||
|
||||
4. You can now install your preferred Linux distro using The `rpi-imager`.
|
||||
Make sure you add WiFi and SSH settings (hidden behind the gear/advanced symbol).
|
||||
Make sure you add WiFi and SSH settings (hidden behind the gear/advanced symbol).
|
||||
|
||||
```sh
|
||||
sudo apt install rpi-imager
|
||||
rpi-imager
|
||||
```
|
||||
```sh
|
||||
sudo apt install rpi-imager
|
||||
rpi-imager
|
||||
```
|
||||
|
||||
5. Once done, unplugging USB-C CM4 Slave (this will unmount the volumes, and power off the CM4).
|
||||
|
||||
@@ -146,8 +146,8 @@ To flash a RPi image onto EMMC.
|
||||
7. Power on CM4 by providing power to USB-C CM4 Slave port.
|
||||
|
||||
8. To check if it's booting/working you can either:
|
||||
- Check there is HDMI output
|
||||
- Connect via SSH (if set up in rpi-imager, and WiFi is available).
|
||||
- Check there is HDMI output
|
||||
- Connect via SSH (if set up in rpi-imager, and WiFi is available).
|
||||
|
||||
## Configure PX4 to CM4 MAVLink Serial Connection
|
||||
|
||||
@@ -167,13 +167,13 @@ To enable this MAVLink instance on the FC:
|
||||
|
||||
1. Connect a computer running QGroundControl via USB Type C port on the baseboard labeled `FC`
|
||||
|
||||

|
||||

|
||||
|
||||
2. [Set the parameters](../advanced_config/parameters.md):
|
||||
|
||||
- `MAV_1_CONFIG` = `102`
|
||||
- `MAV_1_MODE = 2`
|
||||
- `SER_TEL2_BAUD` = `921600`
|
||||
- `MAV_1_CONFIG` = `102`
|
||||
- `MAV_1_MODE = 2`
|
||||
- `SER_TEL2_BAUD` = `921600`
|
||||
|
||||
3. Reboot the FC.
|
||||
|
||||
@@ -185,13 +185,13 @@ On the RPi side:
|
||||
|
||||
2. Enable the RPi serial port by running `RPi-config`
|
||||
|
||||
- Go to `3 Interface Options`, then `I6 Serial Port`.
|
||||
Then choose:
|
||||
- `login shell accessible over serial → No`
|
||||
- `serial port hardware enabled` → `Yes`
|
||||
- Go to `3 Interface Options`, then `I6 Serial Port`.
|
||||
Then choose:
|
||||
- `login shell accessible over serial → No`
|
||||
- `serial port hardware enabled` → `Yes`
|
||||
|
||||
3. Finish, and reboot.
|
||||
This will add `enable_uart=1` to `/boot/config.txt`, and remove `console=serial0,115200` from `/boot/cmdline.txt`.
|
||||
This will add `enable_uart=1` to `/boot/config.txt`, and remove `console=serial0,115200` from `/boot/cmdline.txt`.
|
||||
|
||||
4. Now MAVLink traffic should be available on `/dev/serial0` at a baudrate of 921600.
|
||||
|
||||
@@ -201,9 +201,9 @@ On the RPi side:
|
||||
|
||||
2. Install MAVSDK Python:
|
||||
|
||||
```sh
|
||||
python3 -m pip install mavsdk
|
||||
```
|
||||
```sh
|
||||
python3 -m pip install mavsdk
|
||||
```
|
||||
|
||||
3. Copy an example from the [MAVSDK-Python examples](https://github.com/mavlink/MAVSDK-Python/tree/main/examples).
|
||||
|
||||
@@ -247,7 +247,7 @@ Note that we could have used WiFi for the link, but by setting up a dedicated ro
|
||||
|
||||
To set up a local ethernet connection between CM4 and the flight computer, the two Ethernet ports need to be connected using the provided 8 pin to 4 pin connector.
|
||||
|
||||

|
||||

|
||||
|
||||
The pinout of the cable is:
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ In most cases the accessible hardware serial ports already have some function (m
|
||||
A safe and easy to set up option is to use an FTDI Chip USB-to-serial adapter board to connect from `TELEM2` on the Pixhawk to the USB port on the companion computer.
|
||||
The `TELEM2` to FTDI wiring map is shown below.
|
||||
|
||||
| TELEM2 | | FTDI | &nbsp; |
|
||||
| TELEM2 | | FTDI | |
|
||||
| ------ | --------------------------- | ---- | ------------------------------------------------------- |
|
||||
| 1 | +5V (적) | | 연결 금지! |
|
||||
| 2 | TX (출력) | 5 | FTDI RX (황) (입력) |
|
||||
|
||||
@@ -132,50 +132,50 @@ Enter the following commands (in sequence) a terminal to configure Ubuntu for RP
|
||||
|
||||
1. Install `raspi-config`:
|
||||
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
sudo apt-get install raspi-config
|
||||
```
|
||||
```sh
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
sudo apt-get install raspi-config
|
||||
```
|
||||
|
||||
2. Open `raspi-config`:
|
||||
|
||||
```sh
|
||||
sudo raspi-config
|
||||
```
|
||||
```sh
|
||||
sudo raspi-config
|
||||
```
|
||||
|
||||
3. Go to the **Interface Option** and then click **Serial Port**.
|
||||
|
||||
- Select **No** to disable serial login shell.
|
||||
- Select **Yes** to enable the serial interface.
|
||||
- Click **Finish** and restart the RPi.
|
||||
- Select **No** to disable serial login shell.
|
||||
- Select **Yes** to enable the serial interface.
|
||||
- Click **Finish** and restart the RPi.
|
||||
|
||||
4. Open the firmware boot configuration file in the `nano` editor on RPi:
|
||||
|
||||
```sh
|
||||
sudo nano /boot/firmware/config.txt
|
||||
```
|
||||
```sh
|
||||
sudo nano /boot/firmware/config.txt
|
||||
```
|
||||
|
||||
5. Append the following text to the end of the file (after the last line):
|
||||
|
||||
```sh
|
||||
enable_uart=1
|
||||
dtoverlay=disable-bt
|
||||
```
|
||||
```sh
|
||||
enable_uart=1
|
||||
dtoverlay=disable-bt
|
||||
```
|
||||
|
||||
6. Then save the file and restart the RPi.
|
||||
|
||||
- In `nano` you can save the file using the following sequence of keyboard shortcuts: **ctrl+x**, **ctrl+y**, **Enter**.
|
||||
- In `nano` you can save the file using the following sequence of keyboard shortcuts: **ctrl+x**, **ctrl+y**, **Enter**.
|
||||
|
||||
7. Check that the serial port is available.
|
||||
In this case we use the following terminal commands to list the serial devices:
|
||||
In this case we use the following terminal commands to list the serial devices:
|
||||
|
||||
```sh
|
||||
cd /
|
||||
ls /dev/ttyAMA0
|
||||
```
|
||||
```sh
|
||||
cd /
|
||||
ls /dev/ttyAMA0
|
||||
```
|
||||
|
||||
The result of the command should include the RX/TX connection `/dev/ttyAMA0` (note that this serial port is also available as `/dev/serial0`).
|
||||
The result of the command should include the RX/TX connection `/dev/ttyAMA0` (note that this serial port is also available as `/dev/serial0`).
|
||||
|
||||
The RPi is now setup to work with RPi and communicate using the `/dev/ttyAMA0` serial port.
|
||||
Note that we'll install more software in the following sections to work with MAVLink and ROS 2.
|
||||
@@ -199,39 +199,39 @@ First check the Pixhawk `TELEM 2` configuration:
|
||||
2. Open QGroundControl (the vehicle should connect).
|
||||
3. [Check/change the following parameters](../advanced_config/parameters.md) in QGroundControl:
|
||||
|
||||
```ini
|
||||
MAV_1_CONFIG = TELEM2
|
||||
UXRCE_DDS_CFG = 0 (Disabled)
|
||||
SER_TEL2_BAUD = 57600
|
||||
```
|
||||
```ini
|
||||
MAV_1_CONFIG = TELEM2
|
||||
UXRCE_DDS_CFG = 0 (Disabled)
|
||||
SER_TEL2_BAUD = 57600
|
||||
```
|
||||
|
||||
Note that the parameters may already be set appropriately.
|
||||
For information about how serial ports and MAVLink configuration work see [Serial Port Configuration](../peripherals/serial_configuration.md) and [MAVLink Peripherals](../peripherals/mavlink_peripherals.md).
|
||||
Note that the parameters may already be set appropriately.
|
||||
For information about how serial ports and MAVLink configuration work see [Serial Port Configuration](../peripherals/serial_configuration.md) and [MAVLink Peripherals](../peripherals/mavlink_peripherals.md).
|
||||
|
||||
Then install setup MAVProxy on the RPi using the following terminal commands:
|
||||
|
||||
1. Install MAVProxy:
|
||||
|
||||
```sh
|
||||
sudo apt install python3-pip
|
||||
sudo pip3 install mavproxy
|
||||
sudo apt remove modemmanager
|
||||
```
|
||||
```sh
|
||||
sudo apt install python3-pip
|
||||
sudo pip3 install mavproxy
|
||||
sudo apt remove modemmanager
|
||||
```
|
||||
|
||||
2. Run MAVProxy, setting the port to connect to `/dev/ttyAMA0` and the baud rate to match the PX4:
|
||||
|
||||
```sh
|
||||
sudo mavproxy.py --master=/dev/serial0 --baudrate 57600
|
||||
```
|
||||
```sh
|
||||
sudo mavproxy.py --master=/dev/serial0 --baudrate 57600
|
||||
```
|
||||
|
||||
::: info
|
||||
Note that above we used `/dev/serial0`, but we could equally well have used `/dev/ttyAMA0`.
|
||||
If we were connecting via USB then we would instead set the port as `/dev/ttyACM0`:
|
||||
::: info
|
||||
Note that above we used `/dev/serial0`, but we could equally well have used `/dev/ttyAMA0`.
|
||||
If we were connecting via USB then we would instead set the port as `/dev/ttyACM0`:
|
||||
|
||||
```sh
|
||||
sudo chmod a+rw /dev/ttyACM0
|
||||
sudo mavproxy.py --master=/dev/ttyACM0 --baudrate 57600
|
||||
```
|
||||
```sh
|
||||
sudo chmod a+rw /dev/ttyACM0
|
||||
sudo mavproxy.py --master=/dev/ttyACM0 --baudrate 57600
|
||||
```
|
||||
|
||||
|
||||
:::
|
||||
@@ -259,27 +259,27 @@ The configuration steps are:
|
||||
|
||||
2. [Check/change the following parameters](../advanced_config/parameters.md) in QGroundControl:
|
||||
|
||||
```ini
|
||||
MAV_1_CONFIG = 0 (Disabled)
|
||||
UXRCE_DDS_CFG = 102 (TELEM2)
|
||||
SER_TEL2_BAUD = 921600
|
||||
```
|
||||
```ini
|
||||
MAV_1_CONFIG = 0 (Disabled)
|
||||
UXRCE_DDS_CFG = 102 (TELEM2)
|
||||
SER_TEL2_BAUD = 921600
|
||||
```
|
||||
|
||||
[MAV_1_CONFIG=0](../advanced_config/parameter_reference.md#MAV_1_CONFIG) and [UXRCE_DDS_CFG=102](../advanced_config/parameter_reference.md#UXRCE_DDS_CFG) disable MAVLink on TELEM2 and enable the uXRCE-DDS client on TELEM2, respectively.
|
||||
The `SER_TEL2_BAUD` rate sets the comms link data rate.\
|
||||
You could similarly configure a connection to `TELEM1` using either `MAV_1_CONFIG` or `MAV_0_CONFIG`.
|
||||
[MAV_1_CONFIG=0](../advanced_config/parameter_reference.md#MAV_1_CONFIG) and [UXRCE_DDS_CFG=102](../advanced_config/parameter_reference.md#UXRCE_DDS_CFG) disable MAVLink on TELEM2 and enable the uXRCE-DDS client on TELEM2, respectively.
|
||||
The `SER_TEL2_BAUD` rate sets the comms link data rate.\
|
||||
You could similarly configure a connection to `TELEM1` using either `MAV_1_CONFIG` or `MAV_0_CONFIG`.
|
||||
|
||||
::: info
|
||||
You will need to reboot the flight controller to apply any changes to these parameters.
|
||||
::: info
|
||||
You will need to reboot the flight controller to apply any changes to these parameters.
|
||||
|
||||
:::
|
||||
|
||||
3. Check that the [uxrce_dds_client](../modules/modules_system.md#uxrce-dds-client) module is now running.
|
||||
YOu can do this by running the following command in the QGroundControl [MAVLink Console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html):
|
||||
YOu can do this by running the following command in the QGroundControl [MAVLink Console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html):
|
||||
|
||||
```sh
|
||||
uxrce_dds_client status
|
||||
```
|
||||
```sh
|
||||
uxrce_dds_client status
|
||||
```
|
||||
|
||||
:::info
|
||||
If the client module is not running you can start it manually in the MAVLink console:
|
||||
@@ -300,32 +300,32 @@ The steps to setup ROS 2 and the Micro XRCE-DDS Agent on the RPi are:
|
||||
|
||||
2. Install the git using the RPi terminal:
|
||||
|
||||
```sh
|
||||
sudo apt install git
|
||||
```
|
||||
```sh
|
||||
sudo apt install git
|
||||
```
|
||||
|
||||
3. Install the uXRCE_DDS agent:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
|
||||
cd Micro-XRCE-DDS-Agent
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
sudo ldconfig /usr/local/lib/
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
|
||||
cd Micro-XRCE-DDS-Agent
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
sudo ldconfig /usr/local/lib/
|
||||
```
|
||||
|
||||
See [uXRCE-DDS > Micro XRCE-DDS Agent Installation](../middleware/uxrce_dds.md#micro-xrce-dds-agent-installation) for alternative ways of installing the agent.
|
||||
See [uXRCE-DDS > Micro XRCE-DDS Agent Installation](../middleware/uxrce_dds.md#micro-xrce-dds-agent-installation) for alternative ways of installing the agent.
|
||||
|
||||
4. Start the agent in the RPi terminal:
|
||||
|
||||
```sh
|
||||
sudo MicroXRCEAgent serial --dev /dev/serial0 -b 921600
|
||||
```
|
||||
```sh
|
||||
sudo MicroXRCEAgent serial --dev /dev/serial0 -b 921600
|
||||
```
|
||||
|
||||
Note how we use the serial port set up earlier and the same baud rate as for PX4.
|
||||
Note how we use the serial port set up earlier and the same baud rate as for PX4.
|
||||
|
||||
Now that both the agent and client are running, you should see activity on both the MAVLink console and the RPi terminal.
|
||||
You can view the available topics using the following command on the RPi:
|
||||
|
||||
@@ -82,18 +82,18 @@ If you use a special "very" high power cards from Taobao/Aliexpress then you MUS
|
||||
5. Setup camera pipeline. Open `/etc/systemd/system/fpv-camera.service` and uncomment pipeline according to your camera (PI camera or Logitech camera)
|
||||
6. Open `/etc/wifibroadcast.cfg` and configure WiFi channel according to your antenna setup (or use default #165 for 5.8GHz)
|
||||
7. Configure PX4 to output telemetry stream at speed 1500 Kbps (other UART speeds doesn't match well to RPi frequency dividers).
|
||||
Connect Pixhawk UART to Raspberry Pi UART.
|
||||
In `/etc/wifibroadcast.cfg` uncomment `peer = 'serial:ttyS0:1500000'` in `[drone_mavlink]` section.
|
||||
Connect Pixhawk UART to Raspberry Pi UART.
|
||||
In `/etc/wifibroadcast.cfg` uncomment `peer = 'serial:ttyS0:1500000'` in `[drone_mavlink]` section.
|
||||
|
||||
### Using a Linux Laptop as GCS (Harder than using a RPi)
|
||||
|
||||
1. On **ground** Linux development computer:
|
||||
|
||||
```sh
|
||||
sudo apt install libpcap-dev libsodium-dev python3-all python3-twisted
|
||||
git clone -b stable https://github.com/svpcom/wfb-ng.git
|
||||
cd wfb-ng && make deb && sudo apt install ./deb_dist/wfb-ng*.deb
|
||||
```
|
||||
```sh
|
||||
sudo apt install libpcap-dev libsodium-dev python3-all python3-twisted
|
||||
git clone -b stable https://github.com/svpcom/wfb-ng.git
|
||||
cd wfb-ng && make deb && sudo apt install ./deb_dist/wfb-ng*.deb
|
||||
```
|
||||
|
||||
2. Follow the [Setup HOWTO](https://github.com/svpcom/wfb-ng/wiki/Setup-HOWTO) to complete installation
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/betafpv_beta75x" />
|
||||
<Redirect to="../complete_vehicles_mc/betafpv_beta75x" />
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/crazyflie2" />
|
||||
<Redirect to="../complete_vehicles_mc/crazyflie2" />
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/crazyflie21" />
|
||||
<Redirect to="../complete_vehicles_mc/crazyflie21" />
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/holybro_kops2" />
|
||||
<Redirect to="../complete_vehicles_mc/holybro_kops2" />
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/intel_aero" />
|
||||
<Redirect to="../complete_vehicles_mc/intel_aero" />
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/mindracer210" />
|
||||
<Redirect to="../complete_vehicles_mc/mindracer210" />
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/mindracer_BNF_RTF" />
|
||||
<Redirect to="../complete_vehicles_mc/mindracer_BNF_RTF" />
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/modalai_starling" />
|
||||
<Redirect to="../complete_vehicles_mc/modalai_starling" />
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/nanomind110" />
|
||||
<Redirect to="../complete_vehicles_mc/nanomind110" />
|
||||
@@ -1 +1 @@
|
||||
<Redirect to="../complete_vehicles_mc/px4_vision_kit" />
|
||||
<Redirect to="../complete_vehicles_mc/px4_vision_kit" />
|
||||
@@ -51,54 +51,54 @@ After setting up the PX4 development environment, follow these steps to install
|
||||
|
||||
1. Download the source code of the PX4 Bootloader:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/Bootloader.git
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/PX4/Bootloader.git
|
||||
```
|
||||
|
||||
2. Navigate into the top directory of the source code and compile it using:
|
||||
|
||||
```sh
|
||||
make crazyflie_bl
|
||||
```
|
||||
```sh
|
||||
make crazyflie_bl
|
||||
```
|
||||
|
||||
3. Put the Crazyflie 2.0 into DFU mode by following these steps:
|
||||
- Ensure it is initially unpowered.
|
||||
- Hold down the reset button (see figure below...).
|
||||

|
||||
- Plug into computer's USB port.
|
||||
- After a second, the blue LED should start blinking and after 5 seconds should start blinking faster.
|
||||
- Release button.
|
||||
- Ensure it is initially unpowered.
|
||||
- Hold down the reset button (see figure below...).
|
||||

|
||||
- Plug into computer's USB port.
|
||||
- After a second, the blue LED should start blinking and after 5 seconds should start blinking faster.
|
||||
- Release button.
|
||||
|
||||
4. Install _dfu-util_:
|
||||
|
||||
```sh
|
||||
sudo apt-get update
|
||||
sudo apt-get install dfu-util
|
||||
```
|
||||
```sh
|
||||
sudo apt-get update
|
||||
sudo apt-get install dfu-util
|
||||
```
|
||||
|
||||
5. Flash bootloader using _dfu-util_ and unplug Crazyflie 2.0 when done:
|
||||
|
||||
```sh
|
||||
sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D ./build/crazyflie_bl/crazyflie_bl.bin
|
||||
```
|
||||
```sh
|
||||
sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D ./build/crazyflie_bl/crazyflie_bl.bin
|
||||
```
|
||||
|
||||
When powering on the Crazyflie 2.0 the yellow LED should blink.
|
||||
When powering on the Crazyflie 2.0 the yellow LED should blink.
|
||||
|
||||
6. Download the source code of the PX4 autopilot:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git
|
||||
```
|
||||
|
||||
7. Navigate into the top directory of the source code and compile it using:
|
||||
|
||||
```sh
|
||||
make bitcraze_crazyflie_default upload
|
||||
```
|
||||
```sh
|
||||
make bitcraze_crazyflie_default upload
|
||||
```
|
||||
|
||||
8. When prompted to plug in device, plug in Crazyflie 2.0.
|
||||
The yellow LED should start blinking indicating bootloader mode.
|
||||
Then the red LED should turn on indicating that the flashing process has started.
|
||||
The yellow LED should start blinking indicating bootloader mode.
|
||||
Then the red LED should turn on indicating that the flashing process has started.
|
||||
|
||||
9. Wait for completion.
|
||||
|
||||
|
||||
@@ -64,56 +64,56 @@ After setting up the PX4 development environment, follow these steps to install
|
||||
|
||||
1. Download the source code of the PX4 Bootloader:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/Bootloader.git --recurse-submodules
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/PX4/Bootloader.git --recurse-submodules
|
||||
```
|
||||
|
||||
2. Navigate into the top directory of the source code and compile it using:
|
||||
|
||||
```sh
|
||||
make crazyflie21_bl
|
||||
```
|
||||
```sh
|
||||
make crazyflie21_bl
|
||||
```
|
||||
|
||||
3. Put the Crazyflie 2.1 into DFU mode by following these steps:
|
||||
- Ensure it is initially unpowered.
|
||||
- Ensure battery is disconnected.
|
||||
- Hold down the reset button (see figure below...).
|
||||

|
||||
- Plug into computer's USB port.
|
||||
- After a second, the blue LED should start blinking and after 5 seconds should start blinking faster.
|
||||
- Release button.
|
||||
- Ensure it is initially unpowered.
|
||||
- Ensure battery is disconnected.
|
||||
- Hold down the reset button (see figure below...).
|
||||

|
||||
- Plug into computer's USB port.
|
||||
- After a second, the blue LED should start blinking and after 5 seconds should start blinking faster.
|
||||
- Release button.
|
||||
|
||||
4. Install _dfu-util_:
|
||||
|
||||
```sh
|
||||
sudo apt-get update
|
||||
sudo apt-get install dfu-util
|
||||
```
|
||||
```sh
|
||||
sudo apt-get update
|
||||
sudo apt-get install dfu-util
|
||||
```
|
||||
|
||||
5. Flash bootloader using _dfu-util_ and unplug Crazyflie 2.1 when done:
|
||||
|
||||
```sh
|
||||
sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D ./build/crazyflie21_bl/crazyflie21_bl.bin
|
||||
```
|
||||
```sh
|
||||
sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D ./build/crazyflie21_bl/crazyflie21_bl.bin
|
||||
```
|
||||
|
||||
When powering on the Crazyflie 2.1 the yellow LED should blink.
|
||||
When powering on the Crazyflie 2.1 the yellow LED should blink.
|
||||
|
||||
6. Download the source code of the PX4 autopilot:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git
|
||||
```
|
||||
|
||||
7. Navigate into the top directory of the source code and compile it using:
|
||||
|
||||
```sh
|
||||
cd PX4-Autopilot/
|
||||
make bitcraze_crazyflie21_default upload
|
||||
```
|
||||
```sh
|
||||
cd PX4-Autopilot/
|
||||
make bitcraze_crazyflie21_default upload
|
||||
```
|
||||
|
||||
8. When prompted to plug in device, plug in Crazyflie 2.1.
|
||||
The yellow LED should start blinking indicating bootloader mode.
|
||||
Then the red LED should turn on indicating that the flashing process has started.
|
||||
The yellow LED should start blinking indicating bootloader mode.
|
||||
Then the red LED should turn on indicating that the flashing process has started.
|
||||
|
||||
9. Wait for completion.
|
||||
|
||||
@@ -124,20 +124,20 @@ After setting up the PX4 development environment, follow these steps to install
|
||||
1. Download the latest [Crazyflie 2.1 bootloader](https://github.com/bitcraze/crazyflie2-stm-bootloader/releases)
|
||||
|
||||
2. Put the Crazyflie 2.1 into DFU mode by following these steps:
|
||||
- Ensure it is initially unpowered.
|
||||
- Ensure battery is disconnected.
|
||||
- Hold down the reset button.
|
||||
- Plug into computer's USB port.
|
||||
- After a second, the blue LED should start blinking and after 5 seconds should start blinking faster.
|
||||
- Release button.
|
||||
- Ensure it is initially unpowered.
|
||||
- Ensure battery is disconnected.
|
||||
- Hold down the reset button.
|
||||
- Plug into computer's USB port.
|
||||
- After a second, the blue LED should start blinking and after 5 seconds should start blinking faster.
|
||||
- Release button.
|
||||
|
||||
3. Flash bootloader using _dfu-util_ and unplug Crazyflie 2.1 when done:
|
||||
|
||||
```sh
|
||||
sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D cf2loader-1.0.bin
|
||||
```
|
||||
```sh
|
||||
sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D cf2loader-1.0.bin
|
||||
```
|
||||
|
||||
When powering on the Crazyflie 2.1 the yellow LED should blink.
|
||||
When powering on the Crazyflie 2.1 the yellow LED should blink.
|
||||
|
||||
4. Install the latest Bitcraze Crazyflie 2.1 Firmware using [this](https://www.bitcraze.io/documentation/tutorials/getting-started-with-crazyflie-2-x/#update-fw) tutorial.
|
||||
|
||||
|
||||
@@ -82,26 +82,26 @@ Follow this guide to bind your ELRS receiver to your transmitter.
|
||||
#### Setting up the Receiver
|
||||
|
||||
1. **Power On the Receiver**: Once your drone is powered on, you'll notice the ELRS receiver's blue LED flashing.
|
||||
This is an indication that the receiver is on but has not yet established a connection with a transmitter.
|
||||
This is an indication that the receiver is on but has not yet established a connection with a transmitter.
|
||||
|
||||

|
||||

|
||||
|
||||
2. **Enter Binding Mode**: To initiate binding, open a terminal and execute the `adb shell` and `voxl-elrs -bind` commands.
|
||||
You'll observe the receiver's LED switch to a flashing in a heartbeat pattern, signaling that it is now in binding mode.
|
||||
You'll observe the receiver's LED switch to a flashing in a heartbeat pattern, signaling that it is now in binding mode.
|
||||
|
||||

|
||||

|
||||
|
||||
#### Setting up the Transmitter
|
||||
|
||||
1. **Access the Menu**: On your Commando 8 radio transmitter included in the kit, press the left mode button to open the menu system.
|
||||
|
||||

|
||||

|
||||
|
||||
2. **Navigate to ExpressLRS**: Use the right button to select the first menu entry, which should be "ExpressLRS."
|
||||
|
||||
3. **Find the Bind Option**: With the "ExpressLRS" option selected, scroll down to the bottom of the menu to locate the "Bind" section. This can be done by pressing the right button downwards until you reach the "Bind" option.
|
||||
|
||||

|
||||

|
||||
|
||||
4. **Initiate Binding**: Select "Bind" to put the transmitter into binding mode. You will know the process has been successful when the transmitter emits a beep, indicating a successful bind.
|
||||
|
||||
|
||||
@@ -42,17 +42,17 @@ This kit is still highly recommended for developing and testing vision solutions
|
||||
## Warnings and Notifications
|
||||
|
||||
1. The kit is intended for computer vision projects that use a forward-facing camera (it does not have downward or rear-facing depth cameras).
|
||||
Consequently it can't be used (without modification) for testing features that require a downward-facing camera.
|
||||
Consequently it can't be used (without modification) for testing features that require a downward-facing camera.
|
||||
|
||||
2. Obstacle avoidance in missions can only be tested when GPS is available (missions use GPS coordinates).
|
||||
Collision prevention can be tested in position mode provided there is a good position lock from either GPS or optical flow.
|
||||
Collision prevention can be tested in position mode provided there is a good position lock from either GPS or optical flow.
|
||||
|
||||
3. The port labeled `USB1` may jam the GPS if used with a _USB3_ peripheral (disable GPS-dependent functionality including missions).
|
||||
This is why the boot image is supplied on a _USB2.0_ memory stick.
|
||||
This is why the boot image is supplied on a _USB2.0_ memory stick.
|
||||
|
||||
4. PX4 Vision v1 with ECN 010 or above (carrier board RC05 and up), the _UP Core_ can be powered by either the DC plug or with battery.
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
5. All PX4 Vision v1.5 _UP Core_ can be powered by either the DC plug or with battery.
|
||||
|
||||
@@ -136,37 +136,37 @@ In addition, users will need ground station hardware/software:
|
||||
|
||||
1. Attach a [compatible RC receiver](../getting_started/rc_transmitter_receiver.md#connecting-receivers) to the vehicle (not supplied with kit):
|
||||
|
||||
- Remove/unscrew the top plate (where the battery goes) using an H2.0 hex key tool.
|
||||
- [Connect the receiver to the flight controller](../assembly/quick_start_pixhawk4.md#radio-control).
|
||||
- Re-attach the top plate.
|
||||
- Mount the RC receiver on the _UP Core_ carrier board plate at the back of the vehicle (use zipties or double-sided tape).
|
||||
- Ensure the antennas are clear of any obstructions and electrically isolated from the frame (e.g. secure them under the carrier board or to the vehicle arms or legs).
|
||||
- Remove/unscrew the top plate (where the battery goes) using an H2.0 hex key tool.
|
||||
- [Connect the receiver to the flight controller](../assembly/quick_start_pixhawk4.md#radio-control).
|
||||
- Re-attach the top plate.
|
||||
- Mount the RC receiver on the _UP Core_ carrier board plate at the back of the vehicle (use zipties or double-sided tape).
|
||||
- Ensure the antennas are clear of any obstructions and electrically isolated from the frame (e.g. secure them under the carrier board or to the vehicle arms or legs).
|
||||
|
||||
2. [Bind](../getting_started/rc_transmitter_receiver.md#binding) the RC ground and air units (if not already done).
|
||||
The binding procedure depends on the specific radio system used (read the receiver manual).
|
||||
The binding procedure depends on the specific radio system used (read the receiver manual).
|
||||
|
||||
3. Raise the GPS mast to the vertical position and screw the cover onto the holder on the base plate. (Not required for v1.5)
|
||||
|
||||

|
||||

|
||||
|
||||
4. Insert the pre-imaged USB2.0 stick from the kit into the _UP Core_ port labeled `USB1` (highlighted below).
|
||||
|
||||

|
||||

|
||||
|
||||
5. Power the vehicle with a fully charged battery.
|
||||
::: info
|
||||
Ensure propellers are removed before connecting the battery.
|
||||
::: info
|
||||
Ensure propellers are removed before connecting the battery.
|
||||
|
||||
:::
|
||||
|
||||
6. Connect the ground station to the vehicle WiFi network (after a few seconds) using the following default credentials:
|
||||
|
||||
- **SSID:** pixhawk4
|
||||
- **Password:** pixhawk4
|
||||
- **SSID:** pixhawk4
|
||||
- **Password:** pixhawk4
|
||||
|
||||
:::tip
|
||||
WiFi network SSID, password, and other credentials may be changed after connecting (if desired), by using a web browser to open the URL: `http://192.168.4.1`.
|
||||
The baud rate must not be changed from 921600.
|
||||
:::tip
|
||||
WiFi network SSID, password, and other credentials may be changed after connecting (if desired), by using a web browser to open the URL: `http://192.168.4.1`.
|
||||
The baud rate must not be changed from 921600.
|
||||
|
||||
:::
|
||||
|
||||
@@ -174,39 +174,39 @@ In addition, users will need ground station hardware/software:
|
||||
|
||||
8. [Configure/calibrate](../config/index.md) the vehicle:
|
||||
|
||||
::: info
|
||||
The vehicle should arrive pre-calibrated (e.g. with firmware, airframe, battery, and sensors all setup).
|
||||
You will however need to calibrate the radio system (that you just connected) and it is often worth re-doing the compass calibration.
|
||||
::: info
|
||||
The vehicle should arrive pre-calibrated (e.g. with firmware, airframe, battery, and sensors all setup).
|
||||
You will however need to calibrate the radio system (that you just connected) and it is often worth re-doing the compass calibration.
|
||||
|
||||
:::
|
||||
|
||||
- [Calibrate the Radio System](../config/radio.md)
|
||||
- [Calibrate the Compass](../config/compass.md)
|
||||
- [Calibrate the Radio System](../config/radio.md)
|
||||
- [Calibrate the Compass](../config/compass.md)
|
||||
|
||||
9. (Optional) Configure a [Flight Mode selector switch](../config/flight_mode.md) on the remote controller.
|
||||
|
||||
::: info
|
||||
Modes can also be changed using _QGroundControl_
|
||||
::: info
|
||||
Modes can also be changed using _QGroundControl_
|
||||
|
||||
:::
|
||||
|
||||
We recommend RC controller switches are define for:
|
||||
We recommend RC controller switches are define for:
|
||||
|
||||
- [Position Mode](../flight_modes_mc/position.md) - a safe manual flight mode that can be used to test collision prevention.
|
||||
- [Mission Mode](../flight_modes_mc/mission.md) - run missions and test obstacle avoidance.
|
||||
- [Return Mode](../flight_modes_mc/return.md) - return vehicle safely to its launch point and land.
|
||||
- [Position Mode](../flight_modes_mc/position.md) - a safe manual flight mode that can be used to test collision prevention.
|
||||
- [Mission Mode](../flight_modes_mc/mission.md) - run missions and test obstacle avoidance.
|
||||
- [Return Mode](../flight_modes_mc/return.md) - return vehicle safely to its launch point and land.
|
||||
|
||||
10. Attach the propellers with the rotations as shown:
|
||||
|
||||

|
||||

|
||||
|
||||
- The propellers directions can be determined from the labels: _6045_ (normal, counter-clockwise) and _6045_**R** (reversed, clockwise).
|
||||
- The propellers directions can be determined from the labels: _6045_ (normal, counter-clockwise) and _6045_**R** (reversed, clockwise).
|
||||
|
||||

|
||||

|
||||
|
||||
- Screw down firmly using the provided propellor nuts:
|
||||
- Screw down firmly using the provided propellor nuts:
|
||||
|
||||

|
||||

|
||||
|
||||
## Fly the Drone with Avoidance
|
||||
|
||||
@@ -216,31 +216,31 @@ When the vehicle setup described above is complete:
|
||||
|
||||
2. Wait until the boot sequence completes and the avoidance system has started (the vehicle will reject arming commands during boot).
|
||||
|
||||
:::tip
|
||||
The boot/startup process takes around 1 minute from the supplied USB stick (or 30 seconds from [internal memory](#install_image_mission_computer)).
|
||||
:::tip
|
||||
The boot/startup process takes around 1 minute from the supplied USB stick (or 30 seconds from [internal memory](#install_image_mission_computer)).
|
||||
|
||||
:::
|
||||
|
||||
3. Check that the avoidance system has started properly:
|
||||
|
||||
- The _QGroundControl_ notification log displays the message: **Avoidance system connected**.
|
||||
- The _QGroundControl_ notification log displays the message: **Avoidance system connected**.
|
||||
|
||||

|
||||

|
||||
|
||||
- A red laser is visible on the front of the _Structure Core_ camera.
|
||||
- A red laser is visible on the front of the _Structure Core_ camera.
|
||||
|
||||
4. Wait for the GPS LED to turn green.
|
||||
This means that the vehicle has a GPS fix and is ready to fly!
|
||||
This means that the vehicle has a GPS fix and is ready to fly!
|
||||
|
||||
5. Connect the ground station to the vehicle WiFi network.
|
||||
|
||||
6. Find a safe outdoor location for flying, ideally with a tree or some other convenient obstacle for testing PX4 Vision.
|
||||
|
||||
7. To test [collision prevention](../computer_vision/collision_prevention.md), enable [Position Mode](../flight_modes_mc/position.md) and fly manually towards an obstacle.
|
||||
The vehicle should slow down and then stop within 6m of the obstacle (the distance can be [changed](../advanced_config/parameters.md) using the [CP_DIST](../advanced_config/parameter_reference.md#CP_DIST) parameter).
|
||||
The vehicle should slow down and then stop within 6m of the obstacle (the distance can be [changed](../advanced_config/parameters.md) using the [CP_DIST](../advanced_config/parameter_reference.md#CP_DIST) parameter).
|
||||
|
||||
8. To test obstacle avoidance, create a mission where the path is blocked by an obstacle.
|
||||
Then switch to [Mission Mode](../flight_modes_mc/mission.md) to run the mission, and observe the vehicle moving around the obstacle and then returning to the planned course.
|
||||
Then switch to [Mission Mode](../flight_modes_mc/mission.md) to run the mission, and observe the vehicle moving around the obstacle and then returning to the planned course.
|
||||
|
||||
## Development using the Kit
|
||||
|
||||
@@ -285,22 +285,22 @@ To flash the USB image to the _UP Core_:
|
||||
2. [Login to the companion computer](#login_mission_computer) (as described above).
|
||||
|
||||
3. Open a terminal and run the following command to copy the image onto internal memory (eMMC).
|
||||
The terminal will prompt for a number of responses during the flashing process.
|
||||
The terminal will prompt for a number of responses during the flashing process.
|
||||
|
||||
```sh
|
||||
cd ~/catkin_ws/src/px4vision_ros/tools
|
||||
sudo ./flash_emmc.sh
|
||||
```
|
||||
```sh
|
||||
cd ~/catkin_ws/src/px4vision_ros/tools
|
||||
sudo ./flash_emmc.sh
|
||||
```
|
||||
|
||||
::: info
|
||||
All information saved in the _UP Core_ computer will be removed when executing this script.
|
||||
::: info
|
||||
All information saved in the _UP Core_ computer will be removed when executing this script.
|
||||
|
||||
:::
|
||||
|
||||
4. Pull out the USB stick.
|
||||
|
||||
5. Restart the vehicle.
|
||||
The _UP Core_ computer will now boot from internal memory (eMMC).
|
||||
The _UP Core_ computer will now boot from internal memory (eMMC).
|
||||
|
||||
### Boot the Companion Computer
|
||||
|
||||
@@ -324,24 +324,24 @@ To login to the companion computer:
|
||||
|
||||
1. Connect a keyboard and mouse to the _UP Core_ via port `USB2`:
|
||||
|
||||

|
||||

|
||||
|
||||
- Use the USB-JST cable from the kit to get a USB A connector
|
||||
- Use the USB-JST cable from the kit to get a USB A connector
|
||||
|
||||

|
||||

|
||||
|
||||
- A USB hub can be attached to the cable if the keyboard and mouse have separate connectors.
|
||||
- A USB hub can be attached to the cable if the keyboard and mouse have separate connectors.
|
||||
|
||||
2. Connect a monitor to the _UP Core_ HDMI port.
|
||||
|
||||

|
||||

|
||||
|
||||
The Ubuntu login screen should then appear on the monitor.
|
||||
The Ubuntu login screen should then appear on the monitor.
|
||||
|
||||
3. Login to the _UP Core_ using the credentials:
|
||||
|
||||
- **Username:** px4vision
|
||||
- **Password:** px4vision
|
||||
- **Username:** px4vision
|
||||
- **Password:** px4vision
|
||||
|
||||
### Developing/Extending PX4 Avoidance
|
||||
|
||||
@@ -356,39 +356,39 @@ To integrate a different planner, this needs to be disabled.
|
||||
|
||||
1. Disable the avoidance process using the following command:
|
||||
|
||||
```sh
|
||||
systemctl stop avoidance.service
|
||||
```
|
||||
```sh
|
||||
systemctl stop avoidance.service
|
||||
```
|
||||
|
||||
You can simply reboot the machine to restart the service.
|
||||
You can simply reboot the machine to restart the service.
|
||||
|
||||
Other useful commands are:
|
||||
Other useful commands are:
|
||||
|
||||
```sh
|
||||
# restart service
|
||||
systemctl start avoidance.service
|
||||
```sh
|
||||
# restart service
|
||||
systemctl start avoidance.service
|
||||
|
||||
# disable service (stop service and do not restart after boot)
|
||||
systemctl disable avoidance.service
|
||||
# disable service (stop service and do not restart after boot)
|
||||
systemctl disable avoidance.service
|
||||
|
||||
# enable service (start service and enable restart after boot)
|
||||
systemctl enable avoidance.service
|
||||
```
|
||||
# enable service (start service and enable restart after boot)
|
||||
systemctl enable avoidance.service
|
||||
```
|
||||
|
||||
2. The source code of the obstacle avoidance package can be found in https://github.com/PX4/PX4-Avoidance which is located in `~/catkin_ws/src/avoidance`.
|
||||
|
||||
3. Make changes to the code! To get the latest code of avoidance pull the code from the avoidance repo:
|
||||
|
||||
```sh
|
||||
git pull origin
|
||||
git checkout origin/master
|
||||
```
|
||||
```sh
|
||||
git pull origin
|
||||
git checkout origin/master
|
||||
```
|
||||
|
||||
4. Build the package
|
||||
|
||||
```sh
|
||||
catkin build local_planner
|
||||
```
|
||||
```sh
|
||||
catkin build local_planner
|
||||
```
|
||||
|
||||
The ROS workspace is placed in `~/catkin_ws`.
|
||||
For reference on developing in ROS and using the catkin workspace, see the [ROS catkin tutorials](http://wiki.ros.org/catkin/Tutorials).
|
||||
|
||||
@@ -33,4 +33,4 @@ These may or may not be updatable to run "vanilla" PX4.
|
||||
## See Also
|
||||
|
||||
- [Complete Vehicles (Fixed-Wing)](../complete_vehicles_fw/index.md)
|
||||
- [Complete Vehicles (MC)](../complete_vehicles_mc/index.md)
|
||||
- [Complete Vehicles (MC)](../complete_vehicles_mc/index.md)
|
||||
@@ -47,7 +47,7 @@ PX4 v1.14 (and later) supports the [LightWare LiDAR SF45](../sensor/sf45_rotatin
|
||||
|
||||
- Attach and configure the distance sensor on a particular port (see [sensor-specific docs](../sensor/rangefinders.md)) and enable collision prevention using [CP_DIST](#CP_DIST).
|
||||
- 방향을 설정하려면 드라이버를 수정하십시오.
|
||||
This should be done by mimicking the `SENS_CM8JL65_R_0` parameter (though you might also hard-code the orientation in the sensor _module.yaml_ file to something like `sf0x start -d ${SERIAL_DEV} -R 25` - where 25 is equivalent to `ROTATION_DOWNWARD_FACING`).
|
||||
This should be done by mimicking the `SENS_CM8JL65_R_0` parameter (though you might also hard-code the orientation in the sensor _module.yaml_ file to something like `sf0x start -d ${SERIAL_DEV} -R 25` - where 25 is equivalent to `ROTATION_DOWNWARD_FACING`).
|
||||
- Modify the driver to set the _field of view_ in the distance sensor UORB topic (`distance_sensor_s.h_fov`).
|
||||
|
||||
## PX4 (Software) Setup
|
||||
@@ -184,7 +184,7 @@ Next, adjust the relevant parameters to the appropriate values and add arbitrary
|
||||
|
||||
The diagram below shows a simulation of collision prevention as viewed in Gazebo.
|
||||
|
||||

|
||||

|
||||
|
||||
## Development Information/Tools
|
||||
|
||||
@@ -203,85 +203,85 @@ The Lua script works by extracting the `obstacle_distance_fused` data at each ti
|
||||
|
||||
2. Configure PX4 to publish obstacle distance data (so that it is available to PlotJuggler):
|
||||
|
||||
Add the [`obstacle_distance_fused`](../msg_docs/ObstacleDistance.md) UORB topic to your [`dds_topics.yaml`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml) so that it is published by PX4:
|
||||
Add the [`obstacle_distance_fused`](../msg_docs/ObstacleDistance.md) UORB topic to your [`dds_topics.yaml`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml) so that it is published by PX4:
|
||||
|
||||
```sh
|
||||
- topic: /fmu/out/obstacle_distance_fused
|
||||
type: px4_msgs::msg::ObstacleDistance
|
||||
```
|
||||
```sh
|
||||
- topic: /fmu/out/obstacle_distance_fused
|
||||
type: px4_msgs::msg::ObstacleDistance
|
||||
```
|
||||
|
||||
For more information see [DDS Topics YAML](../middleware/uxrce_dds.md#dds-topics-yaml) in _uXRCE-DDS (PX4-ROS 2/DDS Bridge)_.
|
||||
For more information see [DDS Topics YAML](../middleware/uxrce_dds.md#dds-topics-yaml) in _uXRCE-DDS (PX4-ROS 2/DDS Bridge)_.
|
||||
|
||||
3. Open PlotJuggler and navigate to the **Tools > Reactive Script Editor** section.
|
||||
In the **Script Editor** tab, add following scripts in the appropriate sections:
|
||||
In the **Script Editor** tab, add following scripts in the appropriate sections:
|
||||
|
||||
- **Global code, executed once:**
|
||||
- **Global code, executed once:**
|
||||
|
||||
```lua
|
||||
obs_dist_fused_xy = ScatterXY.new("obstacle_distance_fused_xy")
|
||||
obs_dist_min = Timeseries.new("obstacle_distance_minimum")
|
||||
```
|
||||
```lua
|
||||
obs_dist_fused_xy = ScatterXY.new("obstacle_distance_fused_xy")
|
||||
obs_dist_min = Timeseries.new("obstacle_distance_minimum")
|
||||
```
|
||||
|
||||
- **function(tracker_time)**
|
||||
- **function(tracker_time)**
|
||||
|
||||
```lua
|
||||
obs_dist_fused_xy:clear()
|
||||
```lua
|
||||
obs_dist_fused_xy:clear()
|
||||
|
||||
i = 0
|
||||
angle_offset = TimeseriesView.find("/fmu/out/obstacle_distance_fused/angle_offset")
|
||||
increment = TimeseriesView.find("/fmu/out/obstacle_distance_fused/increment")
|
||||
min_dist = 65535
|
||||
i = 0
|
||||
angle_offset = TimeseriesView.find("/fmu/out/obstacle_distance_fused/angle_offset")
|
||||
increment = TimeseriesView.find("/fmu/out/obstacle_distance_fused/increment")
|
||||
min_dist = 65535
|
||||
|
||||
-- Cache increment and angle_offset values at tracker_time to avoid repeated calls
|
||||
local angle_offset_value = angle_offset:atTime(tracker_time)
|
||||
local increment_value = increment:atTime(tracker_time)
|
||||
-- Cache increment and angle_offset values at tracker_time to avoid repeated calls
|
||||
local angle_offset_value = angle_offset:atTime(tracker_time)
|
||||
local increment_value = increment:atTime(tracker_time)
|
||||
|
||||
if increment_value == nil or increment_value <= 0 then
|
||||
print("Invalid increment value: " .. tostring(increment_value))
|
||||
return
|
||||
end
|
||||
if increment_value == nil or increment_value <= 0 then
|
||||
print("Invalid increment value: " .. tostring(increment_value))
|
||||
return
|
||||
end
|
||||
|
||||
local max_steps = math.floor(360 / increment_value)
|
||||
local max_steps = math.floor(360 / increment_value)
|
||||
|
||||
while i < max_steps do
|
||||
local str = string.format("/fmu/out/obstacle_distance_fused/distances[%d]", i)
|
||||
local distance = TimeseriesView.find(str)
|
||||
if distance == nil then
|
||||
print("No distance data for: " .. str)
|
||||
break
|
||||
end
|
||||
while i < max_steps do
|
||||
local str = string.format("/fmu/out/obstacle_distance_fused/distances[%d]", i)
|
||||
local distance = TimeseriesView.find(str)
|
||||
if distance == nil then
|
||||
print("No distance data for: " .. str)
|
||||
break
|
||||
end
|
||||
|
||||
local dist = distance:atTime(tracker_time)
|
||||
if dist ~= nil and dist < 65535 then
|
||||
-- Calculate angle and Cartesian coordinates
|
||||
local angle = angle_offset_value + i * increment_value
|
||||
local y = dist * math.cos(math.rad(angle))
|
||||
local x = dist * math.sin(math.rad(angle))
|
||||
local dist = distance:atTime(tracker_time)
|
||||
if dist ~= nil and dist < 65535 then
|
||||
-- Calculate angle and Cartesian coordinates
|
||||
local angle = angle_offset_value + i * increment_value
|
||||
local y = dist * math.cos(math.rad(angle))
|
||||
local x = dist * math.sin(math.rad(angle))
|
||||
|
||||
obs_dist_fused_xy:push_back(x, y)
|
||||
obs_dist_fused_xy:push_back(x, y)
|
||||
|
||||
-- Update minimum distance
|
||||
if dist < min_dist then
|
||||
min_dist = dist
|
||||
end
|
||||
end
|
||||
-- Update minimum distance
|
||||
if dist < min_dist then
|
||||
min_dist = dist
|
||||
end
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
-- Push minimum distance once after the loop
|
||||
if min_dist < 65535 then
|
||||
obs_dist_min:push_back(tracker_time, min_dist)
|
||||
else
|
||||
print("No valid minimum distance found")
|
||||
end
|
||||
```
|
||||
-- Push minimum distance once after the loop
|
||||
if min_dist < 65535 then
|
||||
obs_dist_min:push_back(tracker_time, min_dist)
|
||||
else
|
||||
print("No valid minimum distance found")
|
||||
end
|
||||
```
|
||||
|
||||
4. Enter a name for the script on the top right, and press **Save**.
|
||||
Once saved, the script should appear in the _Active Scripts_ section.
|
||||
Once saved, the script should appear in the _Active Scripts_ section.
|
||||
|
||||
5. Start streaming the data using the approach described in [Plotting uORB Topic Data in Real Time using PlotJuggler](../debug/plotting_realtime_uorb_data.md).
|
||||
You should see the `obstacle_distance_fused_xy` and `obstacle_distance_minimum` timeseries on the left.
|
||||
You should see the `obstacle_distance_fused_xy` and `obstacle_distance_minimum` timeseries on the left.
|
||||
|
||||
Note that you have to press **Save** again to re-enable the scripts after loading a new log file or otherwise clearing data.
|
||||
|
||||
@@ -293,7 +293,7 @@ New sensor data is compared to the existing map, and used to update any sections
|
||||
|
||||
The angles in the `obstacle_distance` topic are defined as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
The data from rangefinders, rotary lidars, or companion computers, is processed differently, as described below.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Path Planning Interface
|
||||
|
||||
<Badge type="warning" text="Removed" />
|
||||
<Badge type="warning" text="Removed PX4 v1.15" />
|
||||
|
||||
:::warning
|
||||
The **Path Planning Interface**, along with the features **Obstacle avoidance in Missions** and **Safe Landing** are no longer supported or maintained, and _should not_ be used in any PX4 version.
|
||||
|
||||
@@ -96,7 +96,7 @@ It is rare that a system is set up with an entirely synchronised chain!
|
||||
|
||||
IMU 속도와 EV 속도 사이의 오프셋을 확인하여 로그에서 대략적인 지연 추정치를 얻을 수 있습니다.
|
||||
|
||||

|
||||

|
||||
|
||||
:::info
|
||||
A plot of external data vs. onboard estimate (as above) can be generated using [FlightPlot](../log/flight_log_analysis.md#flightplot) or similar flight analysis tools.
|
||||
@@ -132,15 +132,15 @@ Perform the following checks to verify that VIO is working properly _before_ you
|
||||
이러한 단계가 유지되면, 첫 번째 비행을 시도할 수 있습니다.
|
||||
|
||||
1. Put the vehicle on the ground and start streaming `ODOMETRY` feedback (as above).
|
||||
스로틀 스틱을 내리고 모터를 작동시키십시오.
|
||||
스로틀 스틱을 내리고 모터를 작동시키십시오.
|
||||
|
||||
이때 왼쪽 스틱을 가장 낮은 위치에 놓고, 위치 제어로 전환합니다.
|
||||
초록불이 켜져야 합니다.
|
||||
녹색 표시등은 위치 피드백을 사용할 수 있고, 위치 제어가 활성화되었음을 알려줍니다.
|
||||
이때 왼쪽 스틱을 가장 낮은 위치에 놓고, 위치 제어로 전환합니다.
|
||||
초록불이 켜져야 합니다.
|
||||
녹색 표시등은 위치 피드백을 사용할 수 있고, 위치 제어가 활성화되었음을 알려줍니다.
|
||||
|
||||
2. 기체가 고도를 유지하도록 스로틀 스틱을 중간(데드 존)에 놓습니다.
|
||||
스틱을 올리면 기준 고도가 증가하고 값을 낮추면 감소합니다.
|
||||
Similarly, the other stick will change the position over the ground.
|
||||
스틱을 올리면 기준 고도가 증가하고 값을 낮추면 감소합니다.
|
||||
Similarly, the other stick will change the position over the ground.
|
||||
|
||||
3. Increase the value of the throttle stick and the vehicle will take off. Move it back to the middle immediately afterwards.
|
||||
|
||||
|
||||
@@ -71,44 +71,44 @@ Explanations and requirements:
|
||||
- `/* EVENT`: This tag indicates that a comment defines metadata for the following event.
|
||||
|
||||
- **event_name**: the event name (`events::ID(event_name)`).
|
||||
- must be unique within the whole source code of PX4.
|
||||
As a general convention, prefix it with the module name, or the source file for larger modules.
|
||||
- must be a valid variable name, i.e. must not contain spaces, colons, etc.
|
||||
- from that name, a 24 bit event ID is derived using a hash function.
|
||||
This means as long as the event name stays the same, so will the ID.
|
||||
- must be unique within the whole source code of PX4.
|
||||
As a general convention, prefix it with the module name, or the source file for larger modules.
|
||||
- must be a valid variable name, i.e. must not contain spaces, colons, etc.
|
||||
- from that name, a 24 bit event ID is derived using a hash function.
|
||||
This means as long as the event name stays the same, so will the ID.
|
||||
|
||||
- **Log Level**:
|
||||
|
||||
- valid log levels are the same as used in the MAVLink [MAV_SEVERITY](https://mavlink.io/en/messages/common.html#MAV_SEVERITY) enum.
|
||||
In order of descending importance these are:
|
||||
- valid log levels are the same as used in the MAVLink [MAV_SEVERITY](https://mavlink.io/en/messages/common.html#MAV_SEVERITY) enum.
|
||||
In order of descending importance these are:
|
||||
|
||||
```plain
|
||||
Emergency,
|
||||
Alert,
|
||||
Critical,
|
||||
Error,
|
||||
Warning,
|
||||
Notice,
|
||||
Info,
|
||||
Debug,
|
||||
Disabled,
|
||||
```
|
||||
```plain
|
||||
Emergency,
|
||||
Alert,
|
||||
Critical,
|
||||
Error,
|
||||
Warning,
|
||||
Notice,
|
||||
Info,
|
||||
Debug,
|
||||
Disabled,
|
||||
```
|
||||
|
||||
```
|
||||
- Above we specify a separate external and internal log level, which are the levels displayed to GCS users and in the log file, respectively: `{events::Log::Error, events::LogInternal::Info}`.
|
||||
For the majority of cases you can pass a single log level, and this will be used for both exernal and internal cases.
|
||||
There are cases it makes sense to have two different log levels.
|
||||
For example an RTL failsafe action: the user should see it as Warning/Error, whereas in the log, it is an expected system response, so it can be set to `Info`.
|
||||
```
|
||||
```
|
||||
- Above we specify a separate external and internal log level, which are the levels displayed to GCS users and in the log file, respectively: `{events::Log::Error, events::LogInternal::Info}`.
|
||||
For the majority of cases you can pass a single log level, and this will be used for both exernal and internal cases.
|
||||
There are cases it makes sense to have two different log levels.
|
||||
For example an RTL failsafe action: the user should see it as Warning/Error, whereas in the log, it is an expected system response, so it can be set to `Info`.
|
||||
```
|
||||
|
||||
- **Event Message**:
|
||||
- Single-line, short message of the event.
|
||||
It may contain template placeholders for arguments (e.g. `{1}`). For more information see below.
|
||||
- Single-line, short message of the event.
|
||||
It may contain template placeholders for arguments (e.g. `{1}`). For more information see below.
|
||||
|
||||
- **Event Description**:
|
||||
- Detailed, optional event description.
|
||||
- Can be multiple lines/paragraphs.
|
||||
- It may contain template placeholders for arguments (e.g. `{2}`) and supported tags (see below)
|
||||
- Detailed, optional event description.
|
||||
- Can be multiple lines/paragraphs.
|
||||
- It may contain template placeholders for arguments (e.g. `{2}`) and supported tags (see below)
|
||||
|
||||
#### Arguments and Enums
|
||||
|
||||
@@ -127,35 +127,35 @@ Text format for event message description:
|
||||
|
||||
- characters can be escaped with \\
|
||||
|
||||
These have to be escaped: '\\\\', '\\<', '\\{'.
|
||||
These have to be escaped: '\\\\', '\\<', '\\{'.
|
||||
|
||||
- supported tags:
|
||||
|
||||
- Profiles: `<profile name="[!]NAME">CONTENT</profile>`
|
||||
- Profiles: `<profile name="[!]NAME">CONTENT</profile>`
|
||||
|
||||
`CONTENT` will only be shown if the name matches the configured profile.
|
||||
This can be used for example to hide developer information from end-users.
|
||||
`CONTENT` will only be shown if the name matches the configured profile.
|
||||
This can be used for example to hide developer information from end-users.
|
||||
|
||||
- URLs: `<a [href="URL"]>CONTENT</a>`.
|
||||
If `href` is not set, use `CONTENT` as `URL` (i.e.`<a>https://docs.px4.io</a>` is interpreted as `<a href="https://docs.px4.io">https://docs.px4.io</a>`)
|
||||
- URLs: `<a [href="URL"]>CONTENT</a>`.
|
||||
If `href` is not set, use `CONTENT` as `URL` (i.e.`<a>https://docs.px4.io</a>` is interpreted as `<a href="https://docs.px4.io">https://docs.px4.io</a>`)
|
||||
|
||||
- Parameters: `<param>PARAM_NAME</param>`
|
||||
- Parameters: `<param>PARAM_NAME</param>`
|
||||
|
||||
- no nested tags of the same type are allowed
|
||||
- no nested tags of the same type are allowed
|
||||
|
||||
- arguments: template placeholders that follow python syntax, with 1-based indexing (instead of 0)
|
||||
|
||||
- general form: `{ARG_IDX[:.NUM_DECIMAL_DIGITS][UNIT]}`
|
||||
- general form: `{ARG_IDX[:.NUM_DECIMAL_DIGITS][UNIT]}`
|
||||
|
||||
UNIT:
|
||||
UNIT:
|
||||
|
||||
- m: horizontal distance in meters
|
||||
- m_v: vertical distance in meters
|
||||
- m^2: area in m^2
|
||||
- m/s: speed in m/s
|
||||
- C: temperature in degrees celsius
|
||||
- m: horizontal distance in meters
|
||||
- m_v: vertical distance in meters
|
||||
- m^2: area in m^2
|
||||
- m/s: speed in m/s
|
||||
- C: temperature in degrees celsius
|
||||
|
||||
- `NUM_DECIMAL_DIGITS` only makes sense for real number arguments.
|
||||
- `NUM_DECIMAL_DIGITS` only makes sense for real number arguments.
|
||||
|
||||
## 로깅
|
||||
|
||||
|
||||
@@ -38,24 +38,24 @@ The instructions below might be used to create a task named _MyTask_:
|
||||
|
||||
- Update the copyright to the current year
|
||||
|
||||
```cmake
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
```
|
||||
```cmake
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
```
|
||||
|
||||
- Modify the code to reflect the new task - e.g. replace `FlightTaskOrbit` with `FlightTaskMyTask`.
|
||||
The code will look something like this:
|
||||
The code will look something like this:
|
||||
|
||||
```cmake
|
||||
px4_add_library(FlightTaskMyTask
|
||||
FlightTaskMyTask.cpp
|
||||
)
|
||||
```cmake
|
||||
px4_add_library(FlightTaskMyTask
|
||||
FlightTaskMyTask.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(FlightTaskMyTask PUBLIC FlightTask)
|
||||
target_include_directories(FlightTaskMyTask PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
```
|
||||
target_link_libraries(FlightTaskMyTask PUBLIC FlightTask)
|
||||
target_include_directories(FlightTaskMyTask PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
```
|
||||
|
||||
4. Update the header file (in this case **FlightTaskMyTask.hpp**):
|
||||
Most tasks reimplement the virtual methods `activate()` and `update()`, and in this example we also have a private variable.
|
||||
@@ -141,35 +141,35 @@ The instructions below might be used to create a task named _MyTask_:
|
||||
|
||||
- Update `MPC_POS_MODE` ([multicopter_position_mode_params.c](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/mc_pos_control/multicopter_position_mode_params.c)) to add an option for selecting "MyTask" if the parameter has a previously unused value like 5:
|
||||
|
||||
```c
|
||||
...
|
||||
* @value 0 Direct velocity
|
||||
* @value 3 Smoothed velocity
|
||||
* @value 4 Acceleration based
|
||||
* @value 5 My task
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_INT32(MPC_POS_MODE, 5);
|
||||
```
|
||||
```c
|
||||
...
|
||||
* @value 0 Direct velocity
|
||||
* @value 3 Smoothed velocity
|
||||
* @value 4 Acceleration based
|
||||
* @value 5 My task
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_INT32(MPC_POS_MODE, 5);
|
||||
```
|
||||
|
||||
- Add a case for your new option in the switch for the parameter [FlightModeManager.cpp](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/flight_mode_manager/FlightModeManager.cpp#L266-L285) to enable the task when `_param_mpc_pos_mode` has the right value.
|
||||
|
||||
```cpp
|
||||
...
|
||||
// manual position control
|
||||
...
|
||||
switch (_param_mpc_pos_mode.get()) {
|
||||
...
|
||||
case 3:
|
||||
error = switchTask(FlightTaskIndex::ManualPositionSmoothVel);
|
||||
break;
|
||||
case 5: // Add case for new task: MyTask
|
||||
error = switchTask(FlightTaskIndex::MyTask);
|
||||
break;
|
||||
case 4:
|
||||
....
|
||||
...
|
||||
```
|
||||
```cpp
|
||||
...
|
||||
// manual position control
|
||||
...
|
||||
switch (_param_mpc_pos_mode.get()) {
|
||||
...
|
||||
case 3:
|
||||
error = switchTask(FlightTaskIndex::ManualPositionSmoothVel);
|
||||
break;
|
||||
case 5: // Add case for new task: MyTask
|
||||
error = switchTask(FlightTaskIndex::MyTask);
|
||||
break;
|
||||
case 4:
|
||||
....
|
||||
...
|
||||
```
|
||||
|
||||
## 신규 비행 작업 테스트
|
||||
|
||||
|
||||
+42
-34
@@ -43,13 +43,13 @@ To make sure the vehicle is stable enough for auto-tuning:
|
||||
2. Take off and <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">hover at 1m above ground in [Altitude mode](../flight_modes_mc/altitude.md) or [Stabilized mode](../flight_modes_mc/manual_stabilized.md)</div><div style="display: inline;" v-else-if="$frontmatter.frame === 'Plane'">fly at cruise speed in [Position mode](../flight_modes_fw/position.md) or [Altitude mode](../flight_modes_fw/altitude.md)</div>.
|
||||
|
||||
3. Use the RC transmitter roll stick to perform the following maneuver, tilting the vehicle just a few degrees: _roll left > roll right > center_ (The whole maneuver should take about 3 seconds).
|
||||
기체는 2번의 진동 이내에서 안정화되어야 합니다.
|
||||
기체는 2번의 진동 이내에서 안정화되어야 합니다.
|
||||
|
||||
4. 각각의 시도에서 더 큰 진폭으로 기울이면서 기동을 반복합니다.
|
||||
기체가 ~20도에서 2번의 진동 내에서 안정화될 수 있으면 다음 단계로 이동합니다.
|
||||
기체가 ~20도에서 2번의 진동 내에서 안정화될 수 있으면 다음 단계로 이동합니다.
|
||||
|
||||
5. 피치 축에서 동일한 동작을 반복합니다.
|
||||
As above, start with small angles and confirm that the vehicle can stabilise itself within 2 oscillations before increasing the tilt.
|
||||
As above, start with small angles and confirm that the vehicle can stabilise itself within 2 oscillations before increasing the tilt.
|
||||
|
||||
If the drone can stabilize itself within 2 oscillations it is ready for the [auto-tuning procedure](#auto-tuning-procedure).
|
||||
|
||||
@@ -72,35 +72,43 @@ The test steps are:
|
||||
1. Perform the [pre-tuning test](#pre-tuning-test).
|
||||
|
||||
2. Takeoff using RC control <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">in [Altitude mode](../flight_modes_mc/altitude.md).
|
||||
Hover the vehicle at a safe distance and at a few meters above ground (between 4 and 20m).</div><div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
Once flying at cruise speed, activate [Hold mode](../flight_modes_fw/hold.md).
|
||||
This will guide the plane to fly in circle at constant altitude and speed.</div>
|
||||
Hover the vehicle at a safe distance and at a few meters above ground (between 4 and 20m).</div><div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
Once flying at cruise speed, activate [Hold mode](../flight_modes_fw/hold.md).
|
||||
This will guide the plane to fly in circle at constant altitude and speed.</div>
|
||||
|
||||
3. Enable autotune.
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Plane'">
|
||||
<div class="tip custom-block"><p class="custom-block-title">TIP</p>
|
||||
<div v-if="$frontmatter.frame === 'Plane'">
|
||||
<div class="tip custom-block"><p class="custom-block-title">TIP</p>
|
||||
|
||||
If an [Enable/Disable Autotune Switch](#enable-disable-autotune-switch) is configured you can just toggle the switch to the "enabled" position.
|
||||
If an [Enable/Disable Autotune Switch](#enable-disable-autotune-switch) is configured you can just toggle the switch to the "enabled" position.
|
||||
|
||||
</div></div>
|
||||
</div></div>
|
||||
|
||||
1. In QGroundControl, open the menu **Vehicle setup > PID Tuning**:
|
||||
1. In QGroundControl, open the menu **Vehicle setup > PID Tuning**:
|
||||
|
||||

|
||||

|
||||
|
||||
2. Select either the _Rate Controller_ or _Attitude Controller_ tabs.
|
||||
2. Select either the _Rate Controller_ or _Attitude Controller_ tabs.
|
||||
|
||||
3. Ensure that the **Autotune enabled** button is enabled (this will display the **Autotune** button and remove the manual tuning selectors).
|
||||
3. Ensure that the **Autotune enabled** button is enabled (this will display the **Autotune** button and remove the manual tuning selectors).
|
||||
|
||||
4. Read the warning popup and click on **OK** to start tuning.
|
||||
4. Read the warning popup and click on **OK** to start tuning.
|
||||
|
||||
4. 드론은 먼저 빠른 롤 동작을 수행한 후 피치 및 요 동작을 수행합니다.
|
||||
The progress is shown in the progress bar, next to the _Autotune_ button.
|
||||
4. The drone will first start to perform quick roll motions followed by pitch and yaw motions.
|
||||
The progress is shown in the progress bar, next to the _Autotune_ button.
|
||||
|
||||
5. <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">Manually land and disarm to apply the new tuning parameters.
|
||||
Takeoff carefully and manually test that the vehicle is stable.</div><div v-else-if="$frontmatter.frame === 'Plane'">The tuning will be immediately/automatically be applied and tested in flight (by default).
|
||||
그런 다음, PX4는 4초 테스트를 실행하고 문제가 감지되면 튜닝 작업의 이전 상태로 복원합니다.</div>
|
||||
<div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">
|
||||
|
||||
5. Manually land and disarm to apply the new tuning parameters.
|
||||
Takeoff carefully and manually test that the vehicle is stable.
|
||||
|
||||
</div><div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
5. The tuning will be immediately/automatically be applied and tested in flight (by default).
|
||||
PX4 will then run a 4 second test and revert the new tuning if a problem is detected.
|
||||
|
||||
</div>
|
||||
|
||||
:::warning
|
||||
If any strong oscillations occur, land immediately and follow the instructions in the [Troubleshooting](#troubleshooting) section below.
|
||||
@@ -117,7 +125,7 @@ Additional notes:
|
||||
<div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
- Autotuning can also be run in [Altitude mode](../flight_modes_fw/altitude.md) or [Position mode](../flight_modes_fw/position.md).
|
||||
그러나 직선으로 비행하면서 테스트를 실행하면 더 큰 튜닝 안전 영역이 필요하며, 더 좋은 튜닝 결과를 보장하지 않습니다.
|
||||
However running the test while flying straight requires a larger safe area for tuning, and does not give a significantly better tuning result.
|
||||
|
||||
</div>
|
||||
|
||||
@@ -150,18 +158,18 @@ Fast oscillations (more than 1 oscillation per second): this is because the gain
|
||||
|
||||
</div>
|
||||
|
||||
### 자동 튜닝 실패
|
||||
### The auto-tuning sequence fails
|
||||
|
||||
If the drone was not moving enough during auto-tuning, the system identification algorithm might have issues to find the correct coefficients.
|
||||
|
||||
Increase the <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">[MC_AT_SYSID_AMP](../advanced_config/parameter_reference.md#MC_AT_SYSID_AMP)</div><div style="display: inline;" v-else-if="$frontmatter.frame === 'Plane'">[FW_AT_SYSID_AMP](../advanced_config/parameter_reference.md#FW_AT_SYSID_AMP)</div> parameter by steps of 1 and trigger the auto-tune again.
|
||||
|
||||
### 드론이 자동 튜닝 후 진동합니다.
|
||||
### The drone oscillates after auto-tuning
|
||||
|
||||
Due to effects not included in the mathematical model such as delays, saturation, slew-rate, airframe flexibility, the loop gain can be too high.
|
||||
To fix this, follow the same steps described [when the drone oscillates in the pre-tuning test](#drone-oscillates-when-performing-the-pre-tuning-test).
|
||||
|
||||
### 여전히 정상 작동하지 않는 경우:
|
||||
### I still can't get it to work
|
||||
|
||||
Attempt manual tuning using the guides listed in [See also](#see-also) below.
|
||||
|
||||
@@ -183,13 +191,13 @@ This behaviour can be configured using the [FW_AT_APPLY](../advanced_config/para
|
||||
</div>
|
||||
|
||||
- `0`: the gains are not applied.
|
||||
자동 튜닝의 결과를 직접적으로 사용하지 않은 체로 검사하는 경우에 사용합니다.
|
||||
This is used for testing purposes if the user wants to inspect results of the auto-tuning algorithm without using them directly.
|
||||
- `1`: apply the gains after disarm (default for multirotors).
|
||||
이후, 조종자는 주의하여 이륙하면서 튜닝 결과를 테스트할 수 있습니다.
|
||||
The operator can then test the new tuning while taking-off carefully.
|
||||
- `2`: apply immediately (default for fixed-wings).
|
||||
새로운 튜닝이 적용되고, 교란이 컨트롤러로 전송된 후, 다음 4초 동안 안정성이 모니터링됩니다.
|
||||
제어 루프가 불안정한 경우, 제어 게인을 즉시 이전 값으로 복원합니다.
|
||||
테스트를 통과하면, 조종자는 새로운 튜닝 결과를 사용할 수 있습니다.
|
||||
The new tuning is applied, disturbances are sent to the controller and the stability is monitored during the next 4 seconds.
|
||||
If the control loop is unstable, the control gains are immediately reverted back to their previous value.
|
||||
If the test passes, the pilot can then use the new tuning.
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
@@ -217,7 +225,7 @@ Fixed-wing vehicles (only) can select which axes are tuned using the [FW_AT_AXES
|
||||
|
||||
</div>
|
||||
|
||||
## 개발자 SDK
|
||||
## Developers/SDKs
|
||||
|
||||
Autotuning is started using [MAV_CMD_DO_AUTOTUNE_ENABLE](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_AUTOTUNE_ENABLE) MAVLink command.
|
||||
|
||||
@@ -231,7 +239,7 @@ PX4 should stream progress as the protocol does not allow polling.
|
||||
|
||||
The feature is not yet supported by MAVSDK.
|
||||
|
||||
## 배경 및 세부 사항
|
||||
## Background/Detail
|
||||
|
||||
PX4 uses [PID controllers](../flight_stack/controller_diagrams.md) (rate, attitude, velocity, and position) to calculate the outputs required to move a vehicle from its current estimated state to match a desired setpoint.
|
||||
The controllers must be well tuned in order to get the best performance out of a vehicle.
|
||||
@@ -258,20 +266,20 @@ The default behaviour can be configured using [parameters](#optional-configurati
|
||||
|
||||
### 자주 묻는 질문
|
||||
|
||||
#### 어떤 기체 유형이 지원됩니까?
|
||||
#### What frames types are supported?
|
||||
|
||||
Autotuning is enabled for multicopter, fixed-wing, and hybrid VTOL fixed-wing vehicles.
|
||||
|
||||
While it is not yet enabled for other frame types, in theory it an be used with any frame that uses a rate controller.
|
||||
|
||||
#### 지원되는 모든 기체에 대해 자동 튜닝이 작동됩니까?
|
||||
#### Does autotuning work for all supported airframes?
|
||||
|
||||
The mathematical model used by autotuning to estimate the dynamics of the drone assumes this it is a linear system with no coupling between the axes (SISO), and with a limited complexity (2 poles and 2 zeros).
|
||||
If the real drone is too far from those conditions, the model will not be able to represent the real dynamics of the drone.
|
||||
|
||||
In practise, autotuning generally works well for fixed-wing and multicopter, provided the frame is not too flexible.
|
||||
|
||||
#### 자동 튜닝은 얼마나 걸립니까?
|
||||
#### How long does autotuning take?
|
||||
|
||||
Tuning takes 5s-20s per axis (aborted if tuning could not be established in 20s) + 2s pause between each axis + 4s of testing if the new gains are applied in air.
|
||||
|
||||
|
||||
+46
-46
@@ -448,9 +448,9 @@ Instructions:
|
||||
|
||||
4. One motor will start spinning (click **Spin Motor Again** if it stops spinning too quickly to note.)
|
||||
|
||||
지오메트리 섹션에서 해당 모터를 선택합니다.
|
||||
지오메트리 섹션에서 해당 모터를 선택합니다.
|
||||
|
||||

|
||||

|
||||
|
||||
5. 모든 모터를 할당한 후 도구는 출력에 대한 올바른 모터 매핑을 설정한 다음 종료됩니다.
|
||||
|
||||
@@ -467,15 +467,15 @@ To assign an actuator:
|
||||
1. First assign functions to the outputs that you think are _likely_ to be correct in the _Actuator Outputs_ section.
|
||||
2. Toggle the **Enable sliders** switch in _Actuator Testing_ section.
|
||||
3. 테스트하려는 액추에이터의 슬라이더를 이동합니다.
|
||||
- 모터는 최소 추력 위치로 이동하여야 합니다.
|
||||
- 서보는 중간 위치 근처로 이동하여야 합니다.
|
||||
- 모터는 최소 추력 위치로 이동하여야 합니다.
|
||||
- 서보는 중간 위치 근처로 이동하여야 합니다.
|
||||
4. 어떤 액츄에이터가 차량에서 움직이는 지 확인하십시오.
|
||||
This should match the actuator positions for your geometry (the [airframe reference](../airframes/airframe_reference.md) shows motor positions for a number of standard airframes).
|
||||
- 올바른 액츄에이터가 움직이면 다음 단계로 진행합니다.
|
||||
- 잘못된 액츄에이터가 움직이면 출력 할당을 변경합니다.
|
||||
- 아무 것도 움직이지 않으면, 슬라이더를 범위 중간에 늘리고 필요한 경우 더 높입니다.
|
||||
그 후 아무 것도 움직이지 않으면, 출력이 연결되지 않거나 모터에 전원이 공급되지 않거나 출력 설정에 오류가 있을 수 있습니다.
|
||||
문제를 해결하여야 합니다("무엇이든"이 움직이는지 확인하기 위하여 다른 액추에이터 출력을 시도할 수 있음).
|
||||
This should match the actuator positions for your geometry (the [airframe reference](../airframes/airframe_reference.md) shows motor positions for a number of standard airframes).
|
||||
- 올바른 액츄에이터가 움직이면 다음 단계로 진행합니다.
|
||||
- 잘못된 액츄에이터가 움직이면 출력 할당을 변경합니다.
|
||||
- 아무 것도 움직이지 않으면, 슬라이더를 범위 중간에 늘리고 필요한 경우 더 높입니다.
|
||||
그 후 아무 것도 움직이지 않으면, 출력이 연결되지 않거나 모터에 전원이 공급되지 않거나 출력 설정에 오류가 있을 수 있습니다.
|
||||
문제를 해결하여야 합니다("무엇이든"이 움직이는지 확인하기 위하여 다른 액추에이터 출력을 시도할 수 있음).
|
||||
5. 슬라이더를 "무장 해제" 위치로 되돌립니다(모터의 경우 슬라이더 하단, 서보의 경우 슬라이더 중앙).
|
||||
6. 모든 액추에이터에 대하여 반복합니다.
|
||||
|
||||
@@ -501,34 +501,34 @@ Remove propellers!
|
||||
For each motor:
|
||||
|
||||
1. 모터 슬라이더를 아래로 당겨서 아래쪽에 찰칵 소리가 나도록 합니다.
|
||||
In this position the motor is set to the outputs `disarmed` value.
|
||||
- 모터가 이 위치에서 회전하지 않는 지 확인하십시오.
|
||||
- If the motor spins, reduce the corresponding PWM `disarmed` value in the [Actuator Outputs](#actuator-outputs) section to below the level at which it still spins.
|
||||
In this position the motor is set to the outputs `disarmed` value.
|
||||
- 모터가 이 위치에서 회전하지 않는 지 확인하십시오.
|
||||
- If the motor spins, reduce the corresponding PWM `disarmed` value in the [Actuator Outputs](#actuator-outputs) section to below the level at which it still spins.
|
||||
|
||||
2. Slowly move the slider up until it snaps to the _minimum_ position.
|
||||
In this position the motor is set to the outputs `minimum` value.
|
||||
In this position the motor is set to the outputs `minimum` value.
|
||||
|
||||
- 이 위치에서 모터가 매우 느리게 회전하는 지 확인합니다.
|
||||
- If the motor is not spinning, or spinning too fast you will need to adjust the corresponding PWM `minimum` value in the [Actuator Outputs](#actuator-outputs) such that the motors barely spin.
|
||||
- 이 위치에서 모터가 매우 느리게 회전하는 지 확인합니다.
|
||||
- If the motor is not spinning, or spinning too fast you will need to adjust the corresponding PWM `minimum` value in the [Actuator Outputs](#actuator-outputs) such that the motors barely spin.
|
||||
|
||||

|
||||
::: info
|
||||
For DShot output, this is not required.
|
||||

|
||||
::: info
|
||||
For DShot output, this is not required.
|
||||
|
||||
:::
|
||||
|
||||
3. Increase the slider value to a level where you can verify that the motor is spinning in the correct direction and that it would give a positive thrust in the expected direction.
|
||||
|
||||
- The expected thrust direction can vary by vehicle type.
|
||||
For example in multicopters the thrust should always point upwards, while in a fixed-wing vehicle the thrust will push the vehicle forwards.
|
||||
- For VTOL, thrust should point upwards when the Tilt Servo is at 0 degrees as defined the [Tilt Servo Convention](#tilt-servo-coordinate-system).
|
||||
Testing of the [Tilt Servo](#tilt-servo-setup) is covered below as well.
|
||||
- If thrust is in the wrong direction, you may need to [reverse the motors](#reversing-motors).
|
||||
- The expected thrust direction can vary by vehicle type.
|
||||
For example in multicopters the thrust should always point upwards, while in a fixed-wing vehicle the thrust will push the vehicle forwards.
|
||||
- For VTOL, thrust should point upwards when the Tilt Servo is at 0 degrees as defined the [Tilt Servo Convention](#tilt-servo-coordinate-system).
|
||||
Testing of the [Tilt Servo](#tilt-servo-setup) is covered below as well.
|
||||
- If thrust is in the wrong direction, you may need to [reverse the motors](#reversing-motors).
|
||||
|
||||
4. Increase the slider value to the maximum value, so the motor is spinning quickly.
|
||||
Reduce the value of the PWM output's `maximum` value just below the default.
|
||||
Listen to the tone of the motors as you increase the value in small (25us) increments.
|
||||
The "optimal" maximum value is the value at which you last hear a change in the tone.
|
||||
Reduce the value of the PWM output's `maximum` value just below the default.
|
||||
Listen to the tone of the motors as you increase the value in small (25us) increments.
|
||||
The "optimal" maximum value is the value at which you last hear a change in the tone.
|
||||
|
||||
### 조종면 설정
|
||||
|
||||
@@ -551,34 +551,34 @@ Control surfaces that move either direction around a neutral point include: aile
|
||||
To set these up:
|
||||
|
||||
1. Set the `Disarmed` value so that the surfaces will stay at neutral position when disarmed.
|
||||
This is usually around `1500` for PWM servos (near the centre of the servo range).
|
||||
This is usually around `1500` for PWM servos (near the centre of the servo range).
|
||||
|
||||

|
||||

|
||||
|
||||
2. Move the slider for the surface upwards (positive command) and verify that it moves in the direction defined in the [Control Surface Convention](#control-surface-deflection-convention).
|
||||
|
||||
- Ailerons, elevons, V-Tails, A-Tails, and other horizontal surfaces should move up.
|
||||
- Rudders and other "purely vertical" surfaces should move right.
|
||||
- Ailerons, elevons, V-Tails, A-Tails, and other horizontal surfaces should move up.
|
||||
- Rudders and other "purely vertical" surfaces should move right.
|
||||
|
||||
::: tip
|
||||
It is important that the slider movement matches the control surface convention, in order to normalize control for different servo mountings (moving the slider up may actually decrease the output value sent to the servo).
|
||||
::: tip
|
||||
It is important that the slider movement matches the control surface convention, in order to normalize control for different servo mountings (moving the slider up may actually decrease the output value sent to the servo).
|
||||
|
||||
:::
|
||||
|
||||
If the control surface moves in the opposite direction, click on the `Rev Range` checkbox to reverse the range.
|
||||
If the control surface moves in the opposite direction, click on the `Rev Range` checkbox to reverse the range.
|
||||
|
||||
3. Move the slider again to the middle and check if the Control Surfaces are aligned in the neutral position of the wing.
|
||||
|
||||
- If it is not aligned, you can set the **Trim** value for the control surface.
|
||||
- If it is not aligned, you can set the **Trim** value for the control surface.
|
||||
|
||||
::: info
|
||||
This is done in the `Trim` setting of the Geometry panel, usually by "trial and error".
|
||||

|
||||
::: info
|
||||
This is done in the `Trim` setting of the Geometry panel, usually by "trial and error".
|
||||

|
||||
|
||||
:::
|
||||
|
||||
- After setting the trim for a control surface, move its slider away from the centre, release, and then back into disarmed (middle) position.
|
||||
Confirm that surface is in the neutral position.
|
||||
- After setting the trim for a control surface, move its slider away from the centre, release, and then back into disarmed (middle) position.
|
||||
Confirm that surface is in the neutral position.
|
||||
|
||||
:::info
|
||||
Another way to test without using the sliders would be to set the [`COM_PREARM_MODE`](../advanced_config/parameter_reference.md#COM_PREARM_MODE) parameter to `Always`:
|
||||
@@ -600,13 +600,13 @@ One approach for setting these up is:
|
||||
|
||||
1. Set values `Disarmed` to `1500`, `Min` to `1200`, `Max` to `1700` so that the values are around the centre of the servo range.
|
||||
2. Move the corresponding slider up and check the control moves and that it is extending (moving away from the disarmed position).
|
||||
If not, click on the `Rev Range` checkbox to reverse the range.
|
||||
If not, click on the `Rev Range` checkbox to reverse the range.
|
||||
3. Enable slider in the disarmed position, them change the value of the `Disarmed` signal until the control is retracted/flush with wing.
|
||||
This may require that the `Disarmed` value is increased or decreased:
|
||||
- If the value was decreased towards `Min`, then set `Min` to match `Disarmed`.
|
||||
- If the value was increased towards `Max`, then set `Max` to match `Disarmed`.
|
||||
This may require that the `Disarmed` value is increased or decreased:
|
||||
- If the value was decreased towards `Min`, then set `Min` to match `Disarmed`.
|
||||
- If the value was increased towards `Max`, then set `Max` to match `Disarmed`.
|
||||
4. The value that you did _not_ set to match `Disarmed` controls the maximum amount that the control surface can extend.
|
||||
Set the slider to the top of the control, then change the value (`Max` or `Min`) so that the control surface is fully extended when the slider is at top.
|
||||
Set the slider to the top of the control, then change the value (`Max` or `Min`) so that the control surface is fully extended when the slider is at top.
|
||||
|
||||
:::info Special note for flaps
|
||||
In some vehicle builds, flaps may be configured such that both flaps are controlled from a single output.
|
||||
@@ -630,7 +630,7 @@ For each of the tilt servos:
|
||||
|
||||
2. Position the slider for the servo in the lowest position, and verify that a positive value increase will point towards the `Angle at Min Tilt` (defined in the Geometry section).
|
||||
|
||||

|
||||

|
||||
|
||||
3. Position the slider for the servo in the highest position, and verify that positive motor thrust will point towards the `Angle at Max Tilt` (as defined in the Geometry section).
|
||||
|
||||
|
||||
@@ -27,18 +27,18 @@ Before calibration they must be [enabled via the corresponding parameter](../adv
|
||||
|
||||
4. Click the **Airspeed** sensor button.
|
||||
|
||||

|
||||

|
||||
|
||||
5. 센서로 부는 바람을 막으십시오 (예: 손을 컵 모양으로 감쌀 수 있습니다).
|
||||
피톳 튜브의 구멍을 막지 않도록 주의하십시오.
|
||||
피톳 튜브의 구멍을 막지 않도록 주의하십시오.
|
||||
|
||||
6. Click **OK** to start the calibration.
|
||||
|
||||
7. 피톳 튜브의 끝에 입으로 바람을 불어 보정 완료 신호를 보냅니다.
|
||||
|
||||
:::tip
|
||||
Blowing into the tube is also a basic check that the dynamic and static ports are installed correctly.
|
||||
교체한 센서는 튜브에 바람을 불어 넣을 때 큰 음의 차압을 판독하고 보정이 오류와 함께 중단됩니다.
|
||||
:::tip
|
||||
Blowing into the tube is also a basic check that the dynamic and static ports are installed correctly.
|
||||
교체한 센서는 튜브에 바람을 불어 넣을 때 큰 음의 차압을 판독하고 보정이 오류와 함께 중단됩니다.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Fixed-wing Auto-Tuning
|
||||
frame: 고정익
|
||||
frame: Plane
|
||||
newEditLink: en/config/_autotune.md
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Multicopter Auto-Tuning
|
||||
frame: 멀티콥터
|
||||
frame: Multicopter
|
||||
newEditLink: en/config/_autotune.md
|
||||
---
|
||||
|
||||
|
||||
+15
-15
@@ -23,9 +23,9 @@ If any external magnetometers are available, it then disables the internal magne
|
||||
Several types of compass calibration are available:
|
||||
|
||||
1. [Complete](#complete-calibration): This calibration is required after installing the autopilot on an airframe for the first time or when the configuration of the vehicle has changed significantly.
|
||||
It compensates for hard and soft iron effects by estimating an offset and a scale factor for each axis.
|
||||
It compensates for hard and soft iron effects by estimating an offset and a scale factor for each axis.
|
||||
2. [Partial](#partial-quick-calibration): This calibration can be performed as a routine when preparing the vehicle for a flight, after changing the payload, or simply when the compass rose seems inaccurate.
|
||||
This type of calibration only estimates the offsets to compensate for a hard iron effect.
|
||||
This type of calibration only estimates the offsets to compensate for a hard iron effect.
|
||||
3. [Large vehicle](#large-vehicle-calibration): This calibration can be performed when the vehicle is too large or heavy to perform a complete calibration. This type of calibration only estimates the offsets to compensate for a hard iron effect.
|
||||
|
||||
## 보정 절차
|
||||
@@ -35,13 +35,13 @@ Several types of compass calibration are available:
|
||||
Before starting the calibration:
|
||||
|
||||
1. 큰 금속 물체등과 같이 자기장이 강한 곳에서 멀리 떨어진 위치를 선택하십시오.
|
||||
:::tip
|
||||
Metal is not always obvious! 사무실 테이블 위에서나 (종종 금속 막대 포함) 또는 차량 옆에서 보정하지 마십시오.
|
||||
철근이 고르지 않게 분포된 콘크리트 슬래브 근처 장소들도 보정에 영향을 미칠 수 있습니다.
|
||||
:::tip
|
||||
Metal is not always obvious! 사무실 테이블 위에서나 (종종 금속 막대 포함) 또는 차량 옆에서 보정하지 마십시오.
|
||||
철근이 고르지 않게 분포된 콘크리트 슬래브 근처 장소들도 보정에 영향을 미칠 수 있습니다.
|
||||
|
||||
:::
|
||||
2. Connect via telemetry radio rather than USB if at all possible.
|
||||
USB can potentially cause significant magnetic interference.
|
||||
USB can potentially cause significant magnetic interference.
|
||||
3. If using an external compass (or a combined GPS/compass module), make sure it is [mounted](../assembly/mount_gps_compass.md) as far as possible from other electronics in order to reduce magnetic interference, and in a _supported orientation_.
|
||||
|
||||
### Complete Calibration
|
||||
@@ -54,10 +54,10 @@ Before starting the calibration:
|
||||
|
||||
3. Click the **Compass** sensor button.
|
||||
|
||||

|
||||

|
||||
|
||||
::: info
|
||||
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md). 미리 설정하지 않았다면, 여기에서 설정할 수 있습니다.
|
||||
::: info
|
||||
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md). 미리 설정하지 않았다면, 여기에서 설정할 수 있습니다.
|
||||
|
||||
:::
|
||||
|
||||
@@ -65,7 +65,7 @@ Before starting the calibration:
|
||||
|
||||
5. 기체를 아래에 표시된 자세로 놓고 그대로 유지해주십시오 메시지가 표시되면(방향 이미지가 노란색으로 변함) 기체를 지정축을 기준으로 한 방향으로 회전시킵니다. 현재 방향에 대해 보정이 완료되면 화면의 그림이 녹색으로 바뀝니다.
|
||||
|
||||

|
||||

|
||||
|
||||
6. 드론의 모든 방향에 대해 보정 과정을 반복합니다.
|
||||
|
||||
@@ -76,7 +76,7 @@ Once you've calibrated the vehicle in all the positions _QGroundControl_ will di
|
||||
This calibration is similar to the well-known figure-8 compass calibration done on a smartphone:
|
||||
|
||||
1. Hold the vehicle in front of you and randomly perform partial rotations on all its axes.
|
||||
2-3 oscillations of ~30 degrees in every direction is usually sufficient.
|
||||
2-3 oscillations of ~30 degrees in every direction is usually sufficient.
|
||||
2. Wait for the heading estimate to stabilize and verify that the compass rose is pointing to the correct direction (this can take a couple of seconds).
|
||||
|
||||
참고:
|
||||
@@ -94,12 +94,12 @@ This calibration process leverages external knowledge of vehicle's orientation a
|
||||
|
||||
1. Ensure GNSS Fix. This is required to find the expected Earth magnetic field in WMM tables.
|
||||
2. Align the vehicle to face True North.
|
||||
Be as accurate as possible for best results.
|
||||
Be as accurate as possible for best results.
|
||||
3. Open the [QGroundControl MAVLink Console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html) and send the following command:
|
||||
|
||||
```sh
|
||||
commander calibrate mag quick
|
||||
```
|
||||
```sh
|
||||
commander calibrate mag quick
|
||||
```
|
||||
|
||||
참고:
|
||||
|
||||
|
||||
@@ -61,10 +61,10 @@ Next you will need to specify the [vehicle airframe](../config/airframe.md) (and
|
||||
2. Check **Advanced settings** and select the version from the dropdown list:
|
||||
- **Standard Version (stable):** The default version (i.e. no need to use advanced settings to install this!)
|
||||
- **Beta Testing (beta):** A beta/candidate release.
|
||||
신규 버전 출시 이전에 테스트 할 경우에만 사용할 수 있습니다.
|
||||
신규 버전 출시 이전에 테스트 할 경우에만 사용할 수 있습니다.
|
||||
- **Developer Build (master):** The latest build of PX4/PX4-Autopilot _main_ branch.
|
||||
- **Custom Firmware file...:** A custom firmware file (e.g. [that you have built locally](../dev_setup/building_px4.md)).
|
||||
사용자 정의 펌웨어 파일을 선택한 경우 다음 단계에서 파일 시스템에서 사용자 정의 펌웨어를 선택하여야 합니다.
|
||||
사용자 정의 펌웨어 파일을 선택한 경우 다음 단계에서 파일 시스템에서 사용자 정의 펌웨어를 선택하여야 합니다.
|
||||
|
||||
그러면 펌웨어 업데이트가 이전과 같이 계속됩니다.
|
||||
|
||||
|
||||
@@ -40,24 +40,24 @@ You can also separately specify channels for mapping a kill switch, return to la
|
||||
|
||||
3. Select **"Q" icon > Vehicle Setup > Flight Modes** (sidebar) to open _Flight Modes Setup_.
|
||||
|
||||

|
||||

|
||||
|
||||
4. Specify _Flight Mode Settings_:
|
||||
- Select the **Mode channel** (above this shown as Channel 5, but this will depend on your transmitter configuration).
|
||||
- Move the transmitter switch (or switches) that you have set up for mode selection through the available positions.
|
||||
The mode slot matching your current switch position will be highlighted (above this is _Flight Mode 1_).
|
||||
::: info
|
||||
While you can set flight modes in any of the 6 slots, only the channels that are mapped to switch positions will be highlighted/used.
|
||||
- Select the **Mode channel** (above this shown as Channel 5, but this will depend on your transmitter configuration).
|
||||
- Move the transmitter switch (or switches) that you have set up for mode selection through the available positions.
|
||||
The mode slot matching your current switch position will be highlighted (above this is _Flight Mode 1_).
|
||||
::: info
|
||||
While you can set flight modes in any of the 6 slots, only the channels that are mapped to switch positions will be highlighted/used.
|
||||
|
||||
:::
|
||||
- Select the flight mode that you want triggered for each switch position.
|
||||
- Select the flight mode that you want triggered for each switch position.
|
||||
|
||||
5. Specify _Switch Settings_:
|
||||
- Select the channels that you want to map to specific actions - e.g.: _Return_ mode, _Kill switch_, _offboard_ mode, etc. (if you have spare switches and channels on your transmitter).
|
||||
- Select the channels that you want to map to specific actions - e.g.: _Return_ mode, _Kill switch_, _offboard_ mode, etc. (if you have spare switches and channels on your transmitter).
|
||||
|
||||
6. Test that the modes are mapped to the right transmitter switches:
|
||||
- Check the _Channel Monitor_ to confirm that the expected channel is changed by each switch.
|
||||
- Select each mode switch on your transmitter in turn, and check that the desired flight mode is activated (the text turns yellow on _QGroundControl_ for the active mode).
|
||||
- Check the _Channel Monitor_ to confirm that the expected channel is changed by each switch.
|
||||
- Select each mode switch on your transmitter in turn, and check that the desired flight mode is activated (the text turns yellow on _QGroundControl_ for the active mode).
|
||||
|
||||
All values are automatically saved as they are changed.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user