mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-17 10:31:28 +08:00
Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8580ac0155 | ||
|
|
de6d3a13de | ||
|
|
e7a87710bc | ||
|
|
5282dc04b5 | ||
|
|
b26d15c979 | ||
|
|
401d35677f | ||
|
|
b8517eb428 | ||
|
|
630740d54f | ||
|
|
8531cde567 | ||
|
|
c0316f3db1 | ||
|
|
71e743009a | ||
|
|
b2ff9e37c4 | ||
|
|
bd2551d5f7 | ||
|
|
7df8610cbd | ||
|
|
24c98ef14e | ||
|
|
5e6aebc8fa | ||
|
|
1dbbe90e06 | ||
|
|
f890dee5aa | ||
|
|
1418b45942 | ||
|
|
e66aab8e3a | ||
|
|
9c7970bd7d | ||
|
|
d18491b76e | ||
|
|
40a7c5a55d | ||
|
|
57ac8c19ff | ||
|
|
acc1aeb571 | ||
|
|
814a6fadc6 | ||
|
|
041b0d379a | ||
|
|
7c058b21ac | ||
|
|
e7d45575ad | ||
|
|
0255f881c6 | ||
|
|
bed182f6ab | ||
|
|
78be95ebc1 | ||
|
|
341d00e806 | ||
|
|
fe3ae3c79b | ||
|
|
8fc749f19b | ||
|
|
1e6d911ab9 | ||
|
|
364d323ddf | ||
|
|
47358a446f | ||
|
|
a494b45078 | ||
|
|
7dfcfd5f2b | ||
|
|
e11fbbf312 | ||
|
|
65f8b81fda | ||
|
|
13c993dda4 | ||
|
|
61f98262cf | ||
|
|
5ace8d993d | ||
|
|
a8e5084897 | ||
|
|
7eebb22a9c | ||
|
|
3bdbb6eacf | ||
|
|
20a829e691 | ||
|
|
045a598a97 | ||
|
|
d188f8012f | ||
|
|
4635827f01 | ||
|
|
162b7b87e9 | ||
|
|
acf01c5e88 | ||
|
|
f892492a17 | ||
|
|
2a68adfd35 | ||
|
|
f56efaf149 | ||
|
|
8595c734e6 | ||
|
|
0b50c6c003 | ||
|
|
9e143e3d4c | ||
|
|
965e0e5226 | ||
|
|
e55f1bc66d |
24
.gitignore
vendored
24
.gitignore
vendored
@ -2,7 +2,6 @@
|
||||
!ROMFS/*/*.d
|
||||
!ROMFS/*/*/*.d
|
||||
!ROMFS/*/*/*/*.d
|
||||
*.px4log
|
||||
*.dSYM
|
||||
*.o
|
||||
*.pyc
|
||||
@ -18,15 +17,10 @@
|
||||
.~lock.*
|
||||
Archives/*
|
||||
Build/*
|
||||
Testing/
|
||||
build/*
|
||||
build_*/
|
||||
core
|
||||
cscope.out
|
||||
cscope.in.out
|
||||
cscope.po.out
|
||||
Firmware.sublime-workspace
|
||||
user.sublime*
|
||||
Images/*.bin
|
||||
Images/*.px4
|
||||
mavlink/include/mavlink/v0.9/
|
||||
@ -54,22 +48,4 @@ unittests/build
|
||||
.vagrant
|
||||
*.pretty
|
||||
xcode
|
||||
src/platforms/posix/px4_messages/
|
||||
src/platforms/posix-arm/px4_messages/
|
||||
src/platforms/qurt/px4_messages/
|
||||
ROMFS/*/*/rc.autostart
|
||||
rootfs/
|
||||
*.autosave
|
||||
CMakeLists.txt.user
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
*.config
|
||||
*.creator
|
||||
*.creator.user
|
||||
*.files
|
||||
*.includes
|
||||
|
||||
# uavcan firmware
|
||||
ROMFS/px4fmu_common/uavcan/
|
||||
vectorcontrol/
|
||||
|
||||
38
.gitmodules
vendored
38
.gitmodules
vendored
@ -4,8 +4,8 @@
|
||||
[submodule "NuttX"]
|
||||
path = NuttX
|
||||
url = git://github.com/PX4/NuttX.git
|
||||
[submodule "src/modules/uavcan/libuavcan"]
|
||||
path = src/modules/uavcan/libuavcan
|
||||
[submodule "libuavcan"]
|
||||
path = src/lib/uavcan
|
||||
url = git://github.com/UAVCAN/libuavcan.git
|
||||
[submodule "Tools/genmsg"]
|
||||
path = Tools/genmsg
|
||||
@ -13,31 +13,9 @@
|
||||
[submodule "Tools/gencpp"]
|
||||
path = Tools/gencpp
|
||||
url = https://github.com/ros/gencpp.git
|
||||
[submodule "Tools/jMAVSim"]
|
||||
path = Tools/jMAVSim
|
||||
url = https://github.com/PX4/jMAVSim.git
|
||||
[submodule "Tools/sitl_gazebo"]
|
||||
path = Tools/sitl_gazebo
|
||||
url = https://github.com/PX4/sitl_gazebo.git
|
||||
[submodule "unittests/googletest"]
|
||||
path = unittests/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
ignore = untracked
|
||||
[submodule "src/lib/matrix"]
|
||||
path = src/lib/matrix
|
||||
url = https://github.com/PX4/Matrix.git
|
||||
[submodule "src/lib/DriverFramework"]
|
||||
path = src/lib/DriverFramework
|
||||
url = https://github.com/PX4/DriverFramework.git
|
||||
[submodule "src/lib/ecl"]
|
||||
path = src/lib/ecl
|
||||
url = https://github.com/PX4/ecl.git
|
||||
[submodule "cmake/cmake_hexagon"]
|
||||
path = cmake/cmake_hexagon
|
||||
url = https://github.com/ATLFlight/cmake_hexagon
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/GpsDrivers.git
|
||||
[submodule "mavlink/include/mavlink/v2.0"]
|
||||
path = mavlink/include/mavlink/v2.0
|
||||
url = git://github.com/mavlink/c_library.git
|
||||
[submodule "unittests/gtest"]
|
||||
path = unittests/gtest
|
||||
url = https://github.com/sjwilks/gtest.git
|
||||
[submodule "src/lib/eigen"]
|
||||
path = src/lib/eigen
|
||||
url = https://github.com/PX4/eigen.git
|
||||
|
||||
128
.travis.yml
128
.travis.yml
@ -3,18 +3,8 @@
|
||||
|
||||
language: cpp
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- os: linux
|
||||
sudo: false
|
||||
env: GCC_VER=4.8
|
||||
- os: linux
|
||||
sudo: false
|
||||
env: GCC_VER=4.9
|
||||
- os: osx
|
||||
osx_image: xcode7
|
||||
sudo: true
|
||||
# use travis-ci docker based infrastructure
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
@ -23,74 +13,44 @@ cache:
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- kubuntu-backports
|
||||
- ubuntu-toolchain-r-test
|
||||
- george-edison55-precise-backports
|
||||
packages:
|
||||
- build-essential
|
||||
- ccache
|
||||
- clang-3.5
|
||||
- cmake
|
||||
- g++-4.9
|
||||
- gcc-4.9
|
||||
- g++-4.8
|
||||
- gcc-4.8
|
||||
- genromfs
|
||||
- libc6-i386
|
||||
- libncurses5-dev
|
||||
- ninja-build
|
||||
- python-argparse
|
||||
- python-empy
|
||||
- python-serial
|
||||
- s3cmd
|
||||
- texinfo
|
||||
- zlib1g-dev
|
||||
|
||||
before_install:
|
||||
- cd ${TRAVIS_BUILD_DIR} && git fetch --unshallow && git fetch --all --tags
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
pushd .
|
||||
&& cd ~ && mkdir gcc && cd gcc
|
||||
&& if [ "$GCC_VER" = "4.8" ]; then GCC_URL="https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2" ; fi
|
||||
&& if [ "$GCC_VER" = "4.9" ]; then GCC_URL="https://launchpad.net/gcc-arm-embedded/4.9/4.9-2014-q4-major/+download/gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2" ; fi
|
||||
&& wget -O gcc.tar.bz2 ${GCC_URL}
|
||||
&& tar -jxf gcc.tar.bz2 --strip 1
|
||||
&& exportline="export PATH=$HOME/gcc/bin:\$PATH"
|
||||
&& if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
|
||||
&& . ~/.profile
|
||||
&& popd
|
||||
&& git clone git://github.com/PX4/CI-Tools.git
|
||||
&& ./CI-Tools/s3cmd-configure
|
||||
&& mkdir -p ~/bin
|
||||
&& wget -O ~/bin/astyle https://github.com/PX4/astyle/releases/download/2.05.1/astyle-linux && chmod +x ~/bin/astyle
|
||||
&& astyle --version
|
||||
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
||||
;
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
brew tap PX4/homebrew-px4
|
||||
&& brew update; brew update
|
||||
&& brew install cmake ninja
|
||||
&& brew install genromfs
|
||||
&& sudo easy_install pip
|
||||
&& sudo pip install empy
|
||||
;
|
||||
fi
|
||||
|
||||
before_script:
|
||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
|
||||
# General toolchain dependencies
|
||||
- pushd .
|
||||
- cd ~
|
||||
- wget https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
|
||||
- tar -jxf gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
|
||||
- exportline="export PATH=$HOME/gcc-arm-none-eabi-4_8-2014q3/bin:\$PATH"
|
||||
- if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
|
||||
- . ~/.profile
|
||||
- popd
|
||||
# setup ccache
|
||||
- mkdir -p ~/bin
|
||||
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
|
||||
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
|
||||
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-size
|
||||
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-objcopy
|
||||
- ln -s /usr/bin/ccache ~/bin/clang++
|
||||
- ln -s /usr/bin/ccache ~/bin/clang++-3.4
|
||||
- ln -s /usr/bin/ccache ~/bin/clang++-3.5
|
||||
- ln -s /usr/bin/ccache ~/bin/clang
|
||||
- ln -s /usr/bin/ccache ~/bin/clang-3.4
|
||||
- ln -s /usr/bin/ccache ~/bin/clang-3.5
|
||||
- ln -s /usr/bin/ccache ~/bin/g++-4.8
|
||||
- ln -s /usr/bin/ccache ~/bin/gcc-4.8
|
||||
- export PATH=~/bin:$PATH
|
||||
|
||||
env:
|
||||
global:
|
||||
- NINJA_BUILD=1
|
||||
# AWS KEY: $PX4_AWS_KEY
|
||||
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
|
||||
# AWS SECRET: $PX4_AWS_SECRET
|
||||
@ -98,27 +58,36 @@ env:
|
||||
- PX4_AWS_BUCKET=px4-travis
|
||||
|
||||
script:
|
||||
- git submodule update --quiet --init --recursive
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
arm-none-eabi-gcc --version && make check VECTORCONTROL=1;
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
make check_posix_sitl_default;
|
||||
fi
|
||||
- ccache -z
|
||||
- arm-none-eabi-gcc --version
|
||||
- echo 'Running Tests..' && echo -en 'travis_fold:start:script.1\\r'
|
||||
- make tests
|
||||
- cat src/modules/systemlib/mixer/mixer_multirotor.generated.h
|
||||
- echo -en 'travis_fold:end:script.1\\r'
|
||||
- echo 'Building NuttX..' && echo -en 'travis_fold:start:script.2\\r'
|
||||
- make archives
|
||||
- ccache -s
|
||||
- echo -en 'travis_fold:end:script.2\\r'
|
||||
- echo 'Building Firmware..' && echo -en 'travis_fold:start:script.3\\r'
|
||||
- make -j4
|
||||
- ccache -s
|
||||
- echo -en 'travis_fold:end:script.3\\r'
|
||||
- zip Firmware.zip Images/*.px4
|
||||
|
||||
after_success:
|
||||
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${GCC_VER}" = "4.8" ]]; then
|
||||
make package_firmware
|
||||
&& find . -name \*.px4 -exec cp "{}" . \;
|
||||
&& find . -maxdepth 1 -mindepth 1 -type f -name 'nuttx-*-default.px4' | sed 's/.\/nuttx-//' | sed 's/-default.px4//' | xargs -I{} mv nuttx-{}-default.px4 {}_default.px4
|
||||
&& ./CI-Tools/s3cmd-put `find . -maxdepth 1 -mindepth 1 -type f -name '*_default.px4'` build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
|
||||
&& ./CI-Tools/s3cmd-put Firmware.zip archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/
|
||||
&& ./CI-Tools/s3cmd-put CI-Tools/directory/index.html archives/Firmware/$TRAVIS_BRANCH/
|
||||
&& ./CI-Tools/s3cmd-put CI-Tools/index.html index.html
|
||||
&& ./CI-Tools/s3cmd-put CI-Tools/timestamp.html timestamp.html
|
||||
&& echo ""
|
||||
&& echo "Binaries have been posted to:" https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
|
||||
;
|
||||
fi
|
||||
after_script:
|
||||
- git clone git://github.com/PX4/CI-Tools.git
|
||||
- ./CI-Tools/s3cmd-configure
|
||||
# upload newest build for this branch with s3 index
|
||||
- ./CI-Tools/s3cmd-put Images/px4*.px4 CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
|
||||
# archive newest build by date with s3 index
|
||||
- ./CI-Tools/s3cmd-put Firmware.zip archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/
|
||||
- ./CI-Tools/s3cmd-put CI-Tools/directory/index.html archives/Firmware/$TRAVIS_BRANCH/
|
||||
# upload top level index.html and timestamp.html
|
||||
- ./CI-Tools/s3cmd-put CI-Tools/index.html index.html
|
||||
- ./CI-Tools/s3cmd-put CI-Tools/timestamp.html timestamp.html
|
||||
- echo ""
|
||||
- echo "Binaries have been posted to:"
|
||||
- echo https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
@ -130,7 +99,6 @@ deploy:
|
||||
tags: true
|
||||
all_branches: true
|
||||
repo: PX4/Firmware
|
||||
condition: $GCC_VER = 4.8
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
@ -138,7 +106,3 @@ notifications:
|
||||
- https://webhooks.gitter.im/e/2b9c4a4cb2211f8befba
|
||||
on_success: always # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
slack:
|
||||
secure: "QKw73Zel/s3JAbe/7XyO9tPnJwiiGFpYzSjdR8lG3tYFjRdXZnhxG4c+G7bkgkaPTS4Hult33VXE3kcEqOI7+C+eRwRlZhDfL0knQbXVCxjcLjzmUFdoPOwurlgZDw66PFWCi5tZcLKSRo3u4U8ibT4WKi3jm9sDSyOcfBAucMU="
|
||||
on_success: change # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
|
||||
681
CMakeLists.txt
681
CMakeLists.txt
@ -1,382 +1,331 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(px4)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
add_definitions(-D__PX4_ROS)
|
||||
add_definitions(-D__EXPORT=)
|
||||
add_definitions(-DMAVLINK_DIALECT=common)
|
||||
|
||||
#=============================================================================
|
||||
# CMAKE CODING STANDARD FOR PX4
|
||||
#
|
||||
# Structure
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# * Common functions should be included in px_base.cmake.
|
||||
#
|
||||
# * OS/ board specific fucntions should be include in
|
||||
# px_impl_${OS}.cmake or px4_impl_${OS}_${BOARD}.cmake.
|
||||
#
|
||||
# Formatting
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# * Use hard indents to match the px4 source code.
|
||||
#
|
||||
# * All function and script arguments are upper case.
|
||||
#
|
||||
# * All local variables are lower case.
|
||||
#
|
||||
# * All cmake functions are lowercase.
|
||||
#
|
||||
# * For else, endif, endfunction, etc, never put the name of the statement
|
||||
#
|
||||
# Instead of the very confusing:
|
||||
# if (${var} STREQUAL "1") <-- condition now becomes if name
|
||||
# # do somthing
|
||||
# elseif (${var} STREQUAL "2") <-- another condition
|
||||
# # do somthing
|
||||
# else (${var} STREQUAL "1") <-- tag is referring to name of if
|
||||
# # do somthing
|
||||
# endif (${var} STREQUAL "1") <-- tag is referring to name of if
|
||||
#
|
||||
# Do this:
|
||||
# if (${var} STREQUAL "1") <-- condition now becomes if name
|
||||
# # do somthing
|
||||
# elseif (${var} STREQUAL "2") <-- another condition
|
||||
# # do somthing
|
||||
# else () <-- leave blank
|
||||
# # do somthing
|
||||
# endif () <-- leave blank
|
||||
#
|
||||
# Functions/Macros
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# * Use px4_parse_function_args to parse functions and check for required
|
||||
# arguments. Unless there is only one argument in the function and it is clear.
|
||||
#
|
||||
# * Never use macros. They allow overwriting global variables and this
|
||||
# makes variable declarations hard to locate.
|
||||
#
|
||||
# * If a target from add_custom_* is set in a function, explicitly pass it
|
||||
# as an output argument so that the target name is clear to the user.
|
||||
#
|
||||
# * Avoid use of global variables in functions. Functions in a nested
|
||||
# scope may use global variables, but this makes it difficult to
|
||||
# resuse functions.
|
||||
#
|
||||
# Included CMake Files
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# * All variables in config files must have the prefix "config_".
|
||||
#
|
||||
# * Never set global variables in an included cmake file,
|
||||
# you may only define functions. This excludes config and Toolchain files.
|
||||
# This makes it clear to the user when variables are being set or targets
|
||||
# are being created.
|
||||
#
|
||||
# * Setting a global variable in a CMakeLists.txt file is ok, because
|
||||
# each CMakeLists.txt file has scope in the current directory and all
|
||||
# subdirecties, so it is not truly global.
|
||||
#
|
||||
# * All toolchain files should be included in the cmake
|
||||
# directory and named Toolchain-"name".cmake.
|
||||
#
|
||||
# Misc
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# * If referencing a string variable, don't put it in quotes.
|
||||
# Don't do "${OS}" STREQUAL "posix",
|
||||
# instead type ${OS} STREQUAL "posix". This will throw an
|
||||
# error when ${OS} is not defined instead of silently
|
||||
# evaluating to false.
|
||||
#
|
||||
#=============================================================================
|
||||
## Find catkin macros and libraries
|
||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
||||
## is used, also find other catkin packages
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
roscpp
|
||||
rospy
|
||||
std_msgs
|
||||
geometry_msgs
|
||||
message_generation
|
||||
cmake_modules
|
||||
gazebo_msgs
|
||||
sensor_msgs
|
||||
mav_msgs
|
||||
libmavconn
|
||||
tf
|
||||
)
|
||||
find_package(Eigen REQUIRED)
|
||||
|
||||
# Warning: Changing this modifies CMake's internal workings
|
||||
# and leads to wrong toolchain detection
|
||||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
## System dependencies are found with CMake's conventions
|
||||
# find_package(Boost REQUIRED COMPONENTS system)
|
||||
|
||||
# Use clang
|
||||
#SET (CMAKE_C_COMPILER /usr/bin/clang-3.6)
|
||||
#SET (CMAKE_CXX_COMPILER /usr/bin/clang++-3.6)
|
||||
|
||||
#=============================================================================
|
||||
# parameters
|
||||
#
|
||||
## Uncomment this if the package has a setup.py. This macro ensures
|
||||
## modules and global scripts declared therein get installed
|
||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
||||
# catkin_python_setup()
|
||||
|
||||
set(CMAKE_BUILD_TYPE "" CACHE STRING "build type")
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
||||
STRINGS ";Debug;Release;RelWithDebInfo;MinSizeRel")
|
||||
set(CONFIG "nuttx_px4fmu-v2_default" CACHE STRING "desired configuration")
|
||||
file(GLOB_RECURSE configs RELATIVE cmake/configs "cmake/configs/*.cmake")
|
||||
set_property(CACHE CONFIG PROPERTY STRINGS ${configs})
|
||||
set(THREADS "4" CACHE STRING
|
||||
"number of threads to use for external build processes")
|
||||
set(DEBUG_PORT "/dev/ttyACM0" CACHE STRING "debugging port")
|
||||
################################################
|
||||
## Declare ROS messages, services and actions ##
|
||||
################################################
|
||||
|
||||
#=============================================================================
|
||||
# configuration
|
||||
#
|
||||
# must come before project to set toolchain
|
||||
## To declare and build messages, services or actions from within this
|
||||
## package, follow these steps:
|
||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
||||
## * In the file package.xml:
|
||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
||||
## pulled in transitively but can be declared for certainty nonetheless:
|
||||
## * add a build_depend tag for "message_generation"
|
||||
## * add a run_depend tag for "message_runtime"
|
||||
## * In this file (CMakeLists.txt):
|
||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
||||
## catkin_package(CATKIN_DEPENDS ...)
|
||||
## * uncomment the add_*_files sections below as needed
|
||||
## and list every .msg/.srv/.action file to be processed
|
||||
## * uncomment the generate_messages entry below
|
||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
||||
|
||||
string(REPLACE "_" ";" config_args ${CONFIG})
|
||||
list(GET config_args 0 OS)
|
||||
list(GET config_args 1 BOARD)
|
||||
list(GET config_args 2 LABEL)
|
||||
set(target_name "${OS}-${BOARD}-${LABEL}")
|
||||
## Generate messages in the 'msg' folder
|
||||
add_message_files(
|
||||
FILES
|
||||
rc_channels.msg
|
||||
vehicle_attitude.msg
|
||||
vehicle_attitude_setpoint.msg
|
||||
manual_control_setpoint.msg
|
||||
actuator_controls.msg
|
||||
actuator_controls_0.msg
|
||||
actuator_controls_virtual_mc.msg
|
||||
vehicle_rates_setpoint.msg
|
||||
mc_virtual_rates_setpoint.msg
|
||||
vehicle_attitude.msg
|
||||
vehicle_control_mode.msg
|
||||
actuator_armed.msg
|
||||
parameter_update.msg
|
||||
vehicle_status.msg
|
||||
vehicle_local_position.msg
|
||||
position_setpoint.msg
|
||||
position_setpoint_triplet.msg
|
||||
vehicle_local_position_setpoint.msg
|
||||
vehicle_global_velocity_setpoint.msg
|
||||
offboard_control_mode.msg
|
||||
vehicle_force_setpoint.msg
|
||||
)
|
||||
|
||||
message(STATUS "${target_name}")
|
||||
## Generate services in the 'srv' folder
|
||||
# add_service_files(
|
||||
# FILES
|
||||
# Service1.srv
|
||||
# Service2.srv
|
||||
# )
|
||||
|
||||
# switch to ros CMake file if building ros
|
||||
if (${OS} STREQUAL "ros")
|
||||
include("cmake/ros-CMakeLists.txt")
|
||||
else() # otherwise use the rest of this file
|
||||
## Generate actions in the 'action' folder
|
||||
# add_action_files(
|
||||
# FILES
|
||||
# Action1.action
|
||||
# Action2.action
|
||||
# )
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
set(config_module "configs/${CONFIG}")
|
||||
include(${config_module})
|
||||
## Generate added messages and services with any dependencies listed here
|
||||
generate_messages(
|
||||
DEPENDENCIES
|
||||
std_msgs
|
||||
gazebo_msgs
|
||||
)
|
||||
|
||||
# cmake modules
|
||||
include(ExternalProject)
|
||||
###################################
|
||||
## catkin specific configuration ##
|
||||
###################################
|
||||
## The catkin_package macro generates cmake config files for your package
|
||||
## Declare things to be passed to dependent projects
|
||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
||||
catkin_package(
|
||||
INCLUDE_DIRS src/include
|
||||
LIBRARIES px4
|
||||
CATKIN_DEPENDS message_runtime roscpp rospy std_msgs libmavconn
|
||||
DEPENDS system_lib
|
||||
)
|
||||
|
||||
# require px4 module interface
|
||||
set(px4_required_interface
|
||||
px4_os_prebuild_targets
|
||||
px4_os_add_flags
|
||||
)
|
||||
foreach(cmd ${px4_required_interface})
|
||||
if(NOT COMMAND ${cmd})
|
||||
message(FATAL_ERROR "${config_module} must implement ${cmd}")
|
||||
endif()
|
||||
endforeach()
|
||||
set(px4_required_config
|
||||
config_module_list
|
||||
)
|
||||
foreach(conf ${px4_required_config})
|
||||
if(NOT DEFINED ${conf})
|
||||
message(FATAL_ERROR "cmake/${config_module} must define ${conf}")
|
||||
endif()
|
||||
endforeach()
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
# List the DriverFramework drivers
|
||||
if(DEFINED config_df_driver_list)
|
||||
message("DF Drivers: ${config_df_driver_list}")
|
||||
## Specify additional locations of header files
|
||||
## Your package locations should be listed before other locations
|
||||
include_directories(
|
||||
${catkin_INCLUDE_DIRS}
|
||||
src/platforms
|
||||
src/platforms/ros/px4_messages
|
||||
src/include
|
||||
src/modules
|
||||
src/
|
||||
src/lib
|
||||
${EIGEN_INCLUDE_DIRS}
|
||||
integrationtests
|
||||
)
|
||||
|
||||
## generate multiplatform wrapper headers
|
||||
## note that the message header files are generated as in any ROS project with generate_messages()
|
||||
set(MULTIPLATFORM_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/platforms/ros/px4_messages)
|
||||
set(MULTIPLATFORM_TEMPLATE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/msg/templates/px4/ros)
|
||||
set(TOPICHEADER_TEMP_DIR ${CMAKE_BINARY_DIR}/topics_temporary)
|
||||
set(MULTIPLATFORM_PREFIX px4_)
|
||||
add_custom_target(multiplatform_message_headers ALL ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Tools/px_generate_uorb_topic_headers.py
|
||||
-d ${CMAKE_CURRENT_SOURCE_DIR}/msg -o ${MULTIPLATFORM_HEADER_DIR} -e ${MULTIPLATFORM_TEMPLATE_DIR}
|
||||
-t ${TOPICHEADER_TEMP_DIR} -p ${MULTIPLATFORM_PREFIX})
|
||||
|
||||
## Declare a cpp library
|
||||
add_library(px4
|
||||
src/platforms/ros/px4_ros_impl.cpp
|
||||
src/platforms/ros/perf_counter.cpp
|
||||
src/platforms/ros/geo.cpp
|
||||
src/lib/mathlib/math/Limits.cpp
|
||||
src/modules/systemlib/circuit_breaker.cpp
|
||||
)
|
||||
add_dependencies(px4 ${PROJECT_NAME}_generate_messages_cpp multiplatform_message_headers)
|
||||
|
||||
target_link_libraries(px4
|
||||
${catkin_LIBRARIES}
|
||||
)
|
||||
|
||||
## Declare a test publisher
|
||||
add_executable(publisher
|
||||
src/examples/publisher/publisher_main.cpp
|
||||
src/examples/publisher/publisher_example.cpp)
|
||||
add_dependencies(publisher ${PROJECT_NAME}_generate_messages_cpp multiplatform_message_headers)
|
||||
target_link_libraries(publisher
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## Declare a test subscriber
|
||||
add_executable(subscriber
|
||||
src/examples/subscriber/subscriber_main.cpp
|
||||
src/examples/subscriber/subscriber_example.cpp)
|
||||
add_dependencies(subscriber ${PROJECT_NAME}_generate_messages_cpp multiplatform_message_headers)
|
||||
target_link_libraries(subscriber
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## MC Attitude Control
|
||||
add_executable(mc_att_control
|
||||
src/modules/mc_att_control_multiplatform/mc_att_control_main.cpp
|
||||
src/modules/mc_att_control_multiplatform/mc_att_control.cpp
|
||||
src/modules/mc_att_control_multiplatform/mc_att_control_base.cpp)
|
||||
add_dependencies(mc_att_control ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(mc_att_control
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## MC Position Control
|
||||
add_executable(mc_pos_control
|
||||
src/modules/mc_pos_control_multiplatform/mc_pos_control_main.cpp
|
||||
src/modules/mc_pos_control_multiplatform/mc_pos_control.cpp)
|
||||
add_dependencies(mc_pos_control ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(mc_pos_control
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## Attitude Estimator dummy
|
||||
add_executable(attitude_estimator
|
||||
src/platforms/ros/nodes/attitude_estimator/attitude_estimator.cpp)
|
||||
add_dependencies(attitude_estimator ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(attitude_estimator
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## Position Estimator dummy
|
||||
add_executable(position_estimator
|
||||
src/platforms/ros/nodes/position_estimator/position_estimator.cpp)
|
||||
add_dependencies(position_estimator ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(position_estimator
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## Manual input
|
||||
add_executable(manual_input
|
||||
src/platforms/ros/nodes/manual_input/manual_input.cpp)
|
||||
add_dependencies(manual_input ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(manual_input
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## Multicopter Mixer dummy
|
||||
add_executable(mc_mixer
|
||||
src/platforms/ros/nodes/mc_mixer/mc_mixer.cpp)
|
||||
add_dependencies(mc_mixer ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(mc_mixer
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## Commander dummy
|
||||
add_executable(commander
|
||||
src/platforms/ros/nodes/commander/commander.cpp)
|
||||
add_dependencies(commander ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(commander
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## Mavlink dummy
|
||||
add_executable(mavlink
|
||||
src/platforms/ros/nodes/mavlink/mavlink.cpp)
|
||||
add_dependencies(mavlink ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(mavlink
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## Offboard Position Setpoint Demo
|
||||
add_executable(demo_offboard_position_setpoints
|
||||
src/platforms/ros/nodes/demo_offboard_position_setpoints/demo_offboard_position_setpoints.cpp)
|
||||
add_dependencies(demo_offboard_position_setpoints ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(demo_offboard_position_setpoints
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
## Offboard Attitude Setpoint Demo
|
||||
add_executable(demo_offboard_attitude_setpoints
|
||||
src/platforms/ros/nodes/demo_offboard_attitude_setpoints/demo_offboard_attitude_setpoints.cpp)
|
||||
add_dependencies(demo_offboard_attitude_setpoints ${PROJECT_NAME}_generate_messages_cpp_cpp)
|
||||
target_link_libraries(demo_offboard_attitude_setpoints
|
||||
${catkin_LIBRARIES}
|
||||
px4
|
||||
)
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
|
||||
# all install targets should use catkin DESTINATION variables
|
||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
||||
|
||||
## Mark executable scripts (Python etc.) for installation
|
||||
## in contrast to setup.py, you can choose the destination
|
||||
# install(PROGRAMS
|
||||
# scripts/my_python_script
|
||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark executables and/or libraries for installation
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
)
|
||||
|
||||
## Mark cpp header files for installation
|
||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||
# FILES_MATCHING PATTERN "*.h"
|
||||
# PATTERN ".svn" EXCLUDE
|
||||
# )
|
||||
|
||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
||||
# install(FILES
|
||||
# # myfile1
|
||||
# # myfile2
|
||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||
# )
|
||||
|
||||
#############
|
||||
## Testing ##
|
||||
#############
|
||||
|
||||
## Add gtest based cpp test target and link libraries
|
||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_px4test.cpp)
|
||||
# if(TARGET ${PROJECT_NAME}-test)
|
||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
||||
# endif()
|
||||
|
||||
## Add folders to be run by python nosetests
|
||||
# catkin_add_nosetests(test)
|
||||
|
||||
if(CATKIN_ENABLE_TESTING)
|
||||
find_package(rostest REQUIRED)
|
||||
add_rostest(integrationtests/demo_tests/direct_tests.launch)
|
||||
add_rostest(integrationtests/demo_tests/mavros_tests.launch)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# project definition
|
||||
#
|
||||
project(px4 CXX C ASM)
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.0.0)
|
||||
cmake_policy(SET CMP0045 NEW) # error on non-existent target in get prop
|
||||
cmake_policy(SET CMP0046 NEW) # no non-existent targets as dependencies
|
||||
cmake_policy(SET CMP0025 OLD) # still report AppleClang as Clang
|
||||
endif()
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.1.0)
|
||||
cmake_policy(SET CMP0054 NEW) # don't dereference quoted variables
|
||||
endif()
|
||||
|
||||
set(version_major 1)
|
||||
set(version_minor 0)
|
||||
set(version_patch 1)
|
||||
set(version "${version_major}.${version_minor}.${version_patch}")
|
||||
set(package-contact "px4users@googlegroups.com")
|
||||
|
||||
#=============================================================================
|
||||
# programs
|
||||
#
|
||||
find_package(PythonInterp REQUIRED)
|
||||
|
||||
#=============================================================================
|
||||
# cmake modules
|
||||
#
|
||||
enable_testing()
|
||||
|
||||
#=============================================================================
|
||||
# check required toolchain variables
|
||||
#
|
||||
set(required_variables
|
||||
CMAKE_C_COMPILER_ID
|
||||
)
|
||||
foreach(var ${required_variables})
|
||||
if (NOT ${var})
|
||||
message(FATAL_ERROR "Toolchain/config must define ${var}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#=============================================================================
|
||||
# git
|
||||
#
|
||||
px4_add_git_submodule(TARGET git_genmsg PATH "Tools/genmsg")
|
||||
px4_add_git_submodule(TARGET git_gencpp PATH "Tools/gencpp")
|
||||
px4_add_git_submodule(TARGET git_mavlink PATH "mavlink/include/mavlink/v1.0")
|
||||
px4_add_git_submodule(TARGET git_gtest PATH "unittets/gtest")
|
||||
px4_add_git_submodule(TARGET git_uavcan PATH "src/modules/uavcan/libuavcan")
|
||||
px4_add_git_submodule(TARGET git_nuttx PATH "NuttX")
|
||||
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
|
||||
px4_add_git_submodule(TARGET git_ecl PATH "src/lib/ecl")
|
||||
px4_add_git_submodule(TARGET git_jmavsim PATH "Tools/jMAVSim")
|
||||
px4_add_git_submodule(TARGET git_gazebo PATH "Tools/sitl_gazebo")
|
||||
px4_add_git_submodule(TARGET git_matrix PATH "src/lib/matrix")
|
||||
px4_add_git_submodule(TARGET git_cmake_hexagon PATH "cmake/cmake_hexagon")
|
||||
|
||||
add_custom_target(submodule_clean
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND git submodule deinit -f .
|
||||
COMMAND rm -rf .git/modules/*
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# misc targets
|
||||
#
|
||||
add_custom_target(check_format
|
||||
COMMAND Tools/check_code_style.sh
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(config
|
||||
COMMAND cmake-gui .
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# external libraries
|
||||
#
|
||||
px4_os_prebuild_targets(OUT prebuild_targets
|
||||
BOARD ${BOARD}
|
||||
THREADS ${THREADS})
|
||||
|
||||
#=============================================================================
|
||||
# build flags
|
||||
#
|
||||
px4_os_add_flags(
|
||||
BOARD ${BOARD}
|
||||
C_FLAGS c_flags
|
||||
CXX_FLAGS cxx_flags
|
||||
EXE_LINKER_FLAGS exe_linker_flags
|
||||
INCLUDE_DIRS include_dirs
|
||||
LINK_DIRS link_dirs
|
||||
DEFINITIONS definitions)
|
||||
|
||||
px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${exe_linker_flags}" GLUE " ")
|
||||
px4_join(OUT CMAKE_C_FLAGS LIST "${c_flags}" GLUE " ")
|
||||
px4_join(OUT CMAKE_CXX_FLAGS LIST "${cxx_flags}" GLUE " ")
|
||||
|
||||
include_directories(${include_dirs})
|
||||
#message("INCLUDE_DIRS=${include_dirs}")
|
||||
link_directories(${link_dirs})
|
||||
add_definitions(${definitions})
|
||||
|
||||
#=============================================================================
|
||||
# source code generation
|
||||
#
|
||||
add_subdirectory(msg)
|
||||
px4_generate_messages(TARGET msg_gen
|
||||
MSG_FILES ${msg_files}
|
||||
OS ${OS}
|
||||
DEPENDS git_genmsg git_gencpp prebuild_targets
|
||||
)
|
||||
px4_generate_parameters_xml(OUT parameters.xml BOARD ${BOARD})
|
||||
px4_generate_airframes_xml(OUT airframes.xml BOARD ${BOARD})
|
||||
add_custom_target(xml_gen
|
||||
DEPENDS parameters.xml airframes.xml)
|
||||
|
||||
#=============================================================================
|
||||
# external projects
|
||||
#
|
||||
|
||||
set(ep_base ${CMAKE_BINARY_DIR}/external)
|
||||
set_property(DIRECTORY PROPERTY EP_BASE ${ep_base})
|
||||
|
||||
# add external project install folders to build
|
||||
link_directories(${ep_base}/Install/lib)
|
||||
include_directories(${ep_base}/Install/include)
|
||||
# add the directories so cmake won't warn
|
||||
execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/lib)
|
||||
execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/include)
|
||||
|
||||
#=============================================================================
|
||||
# DriverFramework Drivers
|
||||
#
|
||||
set(df_driver_libs)
|
||||
foreach(driver ${config_df_driver_list})
|
||||
add_subdirectory(src/lib/DriverFramework/drivers/${driver})
|
||||
list(APPEND df_driver_libs df_${driver})
|
||||
message("Adding DF driver: ${driver}")
|
||||
endforeach()
|
||||
|
||||
#=============================================================================
|
||||
# subdirectories
|
||||
#
|
||||
set(module_libraries)
|
||||
foreach(module ${config_module_list})
|
||||
string(REGEX MATCH "^[./]" external_module ${module})
|
||||
if(external_module)
|
||||
STRING(REGEX REPLACE "//" "/" EXT_MODULE ${module})
|
||||
STRING(REGEX REPLACE "/" "__" EXT_MODULE_PREFIX ${EXT_MODULE})
|
||||
add_subdirectory(${module} ${CMAKE_BINARY_DIR}/${EXT_MODULE_PREFIX})
|
||||
else()
|
||||
add_subdirectory(src/${module})
|
||||
endif()
|
||||
px4_mangle_name(${module} mangled_name)
|
||||
list(APPEND module_libraries ${mangled_name})
|
||||
#message(STATUS "adding module: ${module}")
|
||||
endforeach()
|
||||
|
||||
# Keep track of external shared libs required for modules
|
||||
set(module_external_libraries "${module_external_libraries}" CACHE INTERNAL "module_external_libraries")
|
||||
|
||||
add_subdirectory(src/firmware/${OS})
|
||||
|
||||
#add_dependencies(df_driver_framework nuttx_export_${CONFIG}.stamp)
|
||||
if (NOT "${OS}" STREQUAL "nuttx")
|
||||
endif()
|
||||
|
||||
if (config_io_board)
|
||||
add_subdirectory(src/modules/px4iofirmware)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# generate git version
|
||||
#
|
||||
px4_create_git_hash_header(HEADER ${CMAKE_BINARY_DIR}/build_git_version.h)
|
||||
|
||||
#=============================================================================
|
||||
# packaging
|
||||
#
|
||||
# Important to having packaging at end of cmake file.
|
||||
#
|
||||
set(CPACK_PACKAGE_VERSION ${version})
|
||||
set(CPACK_PACKAGE_CONTACT ${package_contact})
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP")
|
||||
include(CPack)
|
||||
|
||||
endif() # ros alternative endif
|
||||
|
||||
# vim: set noet fenc=utf-8 ff=unix ft=cmake :
|
||||
|
||||
@ -16,7 +16,7 @@ git checkout -b mydescriptivebranchname
|
||||
|
||||
### Edit and build the code
|
||||
|
||||
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
|
||||
The [developer guide](http://px4.io/dev/start) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
|
||||
|
||||
### Commit your changes
|
||||
|
||||
|
||||
@ -281,7 +281,7 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
# causing a significant performance penality.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# a logarithmic scale so increasing the size by one will rougly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols
|
||||
@ -599,7 +599,8 @@ RECURSIVE = YES
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE = ../src/modules/attitude_estimator_ekf/codegen
|
||||
EXCLUDE = ../src/lib/mathlib/CMSIS \
|
||||
../src/modules/attitude_estimator_ekf/codegen
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
|
||||
# directories that are symbolic links (a Unix filesystem feature) are excluded
|
||||
|
||||
37
Documentation/README
Normal file
37
Documentation/README
Normal file
@ -0,0 +1,37 @@
|
||||
Linux/Mac OS X
|
||||
==============
|
||||
To install doxygen:
|
||||
$sudo apt-get install doxygen
|
||||
|
||||
If the above does not work go to:
|
||||
http://www.stack.nl/~dimitri/doxygen/download.html for the correct download.
|
||||
|
||||
Then go to the following website for inforamtion on the install:
|
||||
http://www.stack.nl/~dimitri/doxygen/install.html
|
||||
|
||||
Then to generate the html, run the following code while you are in the qgroundcontrol/doc directory:
|
||||
$doxygen Doxyfile
|
||||
|
||||
The html file index.html should be in doc/html unless you changed the output directory.
|
||||
|
||||
The other option for generating the documentation is to use the wizard:
|
||||
$doxywizard &
|
||||
|
||||
doxywizard information:
|
||||
http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html
|
||||
|
||||
Or go to the Doxygen Manual for information at the website noted below.
|
||||
|
||||
Windows
|
||||
=======
|
||||
Go to the following website for the correct download and follow the wizard to install:
|
||||
http://www.stack.nl/~dimitri/doxygen/download.html
|
||||
|
||||
Run the wizard to generate the documentation.
|
||||
Go to the website below or the Doxygen Manual for information on running doxywizard.
|
||||
http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html
|
||||
|
||||
Doxygen Manual
|
||||
==============
|
||||
http://www.stack.nl/~dimitri/doxygen/
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
Linux/Mac OS X
|
||||
==============
|
||||
To install doxygen:
|
||||
$sudo apt-get install doxygen
|
||||
|
||||
If the above does not work go to:
|
||||
http://www.stack.nl/~dimitri/doxygen/download.html for the correct download.
|
||||
|
||||
Then go to the following website for inforamtion on the install:
|
||||
http://www.stack.nl/~dimitri/doxygen/install.html
|
||||
|
||||
Then to generate the html, run the following code while you are in this directory:
|
||||
$doxygen Doxyfile
|
||||
|
||||
The html file index.html should be in doc/html unless you changed the output directory.
|
||||
|
||||
The other option for generating the documentation is to use the wizard:
|
||||
$doxywizard &
|
||||
|
||||
doxywizard information:
|
||||
http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html
|
||||
|
||||
Or go to the Doxygen Manual for information at the website noted below.
|
||||
|
||||
Windows
|
||||
=======
|
||||
Go to the following website for the correct download and follow the wizard to install:
|
||||
http://www.stack.nl/~dimitri/doxygen/download.html
|
||||
|
||||
Run the wizard to generate the documentation.
|
||||
Go to the website below or the Doxygen Manual for information on running doxywizard.
|
||||
http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html
|
||||
|
||||
Doxygen Manual
|
||||
==============
|
||||
http://www.stack.nl/~dimitri/doxygen/
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 74 KiB |
@ -1,98 +0,0 @@
|
||||
[TOC]
|
||||
|
||||
# Introduction
|
||||
|
||||
The HIL architecture allows you to test the flight stack replacing the real physical vehicle and sensors with a simulator of vehicle dynamics and sensor outputs. The flight stack "is not aware" that it is not on a real vehicle. This is a powerful tool for develping and testing code rapidly in a benchtop environment.
|
||||
|
||||
The flight stack can be run anywhere that supports a network connection to the simulator (with sufficient bandwidth and latency to transport the sensor and actuator messages). This can be on a standard linux workstation, an on-target linux image, or the on-target DSP image. These modes can be selected based on the goals of the testing. Workstation is useful for rapid testing in a tool-rich environment. DSP image testing is the closest to the final implementation, so is useful for testing actual HW operation, other than the physical sensing and actuation.
|
||||
|
||||
## Px4 High-level HIL Architecture
|
||||
|
||||
A diagram of the setup described is shown here. Note that UDP port numbers are only displayed on the socket server and are left blank on the socket client.
|
||||
|
||||
(???NOTES: This diagram needs to be updated to use control inputs over UDP, either from QGC or from other)
|
||||
|
||||

|
||||
|
||||
## Requirements
|
||||
The simulator that is currently supported is jMAVSim. The setup described here requires PX4 and jMAVSim installed and running. qGroundControl (QGC) is also required because it is the supported method of providing manual control commands.
|
||||
|
||||
## Assumptions
|
||||
|
||||
# Compiling Code
|
||||
|
||||
## JMAVSim
|
||||
|
||||
### Platform Requirements
|
||||
Linux with java-1.7.x or greater
|
||||
|
||||
### Build Instructions
|
||||
In a clean directory
|
||||
```
|
||||
> git clone https://github.com/PX4/jMAVSim.git
|
||||
> cd jMAVSim
|
||||
> git submodule init
|
||||
> git submodule update
|
||||
> ant
|
||||
```
|
||||
|
||||
## qGroundControl
|
||||
|
||||
### Platform Requirements
|
||||
Windows 7
|
||||
Logitech Gamepad F310 joystick controller
|
||||
|
||||
### Download/Install Instructions
|
||||
Download QGC from http://qgroundcontrol.org/downloads and install using the windows executable.
|
||||
|
||||
|
||||
## PX4
|
||||
|
||||
### Platform Requirements
|
||||
Linux or Eagle with a working IP interface (?? does this need further instructions?)
|
||||
|
||||
### Build Host Requirements
|
||||
(???Notes: Windows?)
|
||||
|
||||
### Download & Build Instructions
|
||||
|
||||
### Installing binaries on the Qualcomm Target
|
||||
|
||||
# Running PX4 in HIL Mode
|
||||
|
||||
## Starting PX4 on Qualcomm Eagle
|
||||
|
||||
```
|
||||
> adb shell
|
||||
# bash
|
||||
root@linaro-developer:/# cd ???
|
||||
root@linaro-developer:/# ./mainapp
|
||||
App name: mainapp
|
||||
Enter a command and its args:
|
||||
uorb start
|
||||
muorb start
|
||||
mavlink start -u 14556
|
||||
simulator start -p
|
||||
```
|
||||
|
||||
## Starting jMAVSim
|
||||
In the directory where jMAVSim is installed
|
||||
```
|
||||
java -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp <IPADDR>:14560 -n 100
|
||||
```
|
||||
replacing <IPADDR> with the IP address of the machine running PX4 (Eagle). This can be found by running "ifconfig" on that machine.
|
||||
|
||||
## Starting qGroundControl
|
||||
Launch the qGroundControl application
|
||||
1. Set up the communication to the flight stack. In the menu File:Settings:CommLinks, select Add. Enter a Link Name of your choice. Select Link Type: UDP. Set the listening port to an unused port (example: 14561). Select Add. Enter the IP address and port of the PX4 Mavlink app, which is <IPADDR>:14556 with <IPADDR> being the IP address of the Eagle board. Select OK.
|
||||
1. Set up the joystick. Plug in the joystick to your Windows machine. In the menu File:Settings:CommLinks, check Enable Controllers. Select "Gamepad F310". Select "Manual". Set the axes/channel mapping to 0:Yaw, 1:Throttle, 2:unset, 3:Pitch, 4:Roll. Seletct "Inverted" for the throttle axis. Click "Calibrate range". Move the right joystick through its full range of motion. Move the left joystick full left then full right. Move the left joystick full forward (but not full backward). Click "end calibration."
|
||||
1. Connect to the flight stack. Click Analyze. Click the "Connect" button in the upper right, and select the connection that you created in the first step.
|
||||
|
||||
You should now be connected to the flight stack. You can see incoming Mavlink packets using the MAVLink Instpector (from Advanced:Tool Widgets)
|
||||
|
||||
|
||||
## Controlling PX4 flight in HIL Mode
|
||||
The joystick can now be used to fly the simulated vehicle. The jMAVSim world visualization gives a FPV view, and QGC can be used to display instruments such as artificial horizon and maps (if GPS simulation is enabled).
|
||||
|
||||
|
||||
# Debugging/FAQ
|
||||
File diff suppressed because it is too large
Load Diff
@ -33,20 +33,7 @@
|
||||
{
|
||||
"tab_size": 8,
|
||||
"translate_tabs_to_spaces": false,
|
||||
"highlight_line": true,
|
||||
"AStyleFormatter":
|
||||
{
|
||||
"options_c":
|
||||
{
|
||||
"use_only_additional_options": true,
|
||||
"additional_options_file": "${project_path}/Tools/astylerc"
|
||||
},
|
||||
"options_c++":
|
||||
{
|
||||
"use_only_additional_options": true,
|
||||
"additional_options_file": "${project_path}/Tools/astylerc"
|
||||
}
|
||||
}
|
||||
"highlight_line": true
|
||||
},
|
||||
"build_systems":
|
||||
[
|
||||
@ -63,20 +50,6 @@
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"cmd": ["make upload px4fmu-v2_default -j8"],
|
||||
"shell": true
|
||||
},
|
||||
{
|
||||
"name": "PX4: make posix",
|
||||
"working_dir": "${project_path}",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"cmd": ["make posix"],
|
||||
"shell": true
|
||||
},
|
||||
{
|
||||
"name": "MindPX_V2: make and upload",
|
||||
"working_dir": "${project_path}",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"cmd": ["make upload mindpx-v2_default -j8"],
|
||||
"shell": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"board_id": 88,
|
||||
"magic": "MindPX",
|
||||
"description": "Firmware for the MindPXFMUv2 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "MindPXFMUv2",
|
||||
"version": "2.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"board_id": 11,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the PX4FMUv4 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4FMUv4",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@ -3,7 +3,7 @@ to be made under the same license. Any exception to this general rule is listed
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2015 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2012-2014 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -38,4 +38,4 @@ to be made under the same license. Any exception to this general rule is listed
|
||||
- PX4 middleware: BSD 3-clause
|
||||
- PX4 flight control stack: BSD 3-clause
|
||||
- NuttX operating system: BSD 3-clause
|
||||
- Exceptions: Currently only this [400 LOC file](https://github.com/PX4/Firmware/blob/master/src/lib/external_lgpl/tecs/tecs.cpp) remains LGPL, but will be replaced with a BSD implementation.
|
||||
- Exceptions: Currently only this [400 LOC file](https://github.com/PX4/Firmware/blob/master/src/lib/external_lgpl/tecs/tecs.cpp) remains LGPL, but will be replaced with a BSD implementation.
|
||||
579
Makefile
579
Makefile
@ -1,6 +1,5 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 - 2016 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2012-2015 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@ -29,301 +28,349 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Enforce the presence of the GIT repository
|
||||
#
|
||||
# We depend on our submodules, so we have to prevent attempts to
|
||||
# compile without it being present.
|
||||
ifeq ($(wildcard .git),)
|
||||
$(error YOU HAVE TO USE GIT TO DOWNLOAD THIS REPOSITORY. ABORTING.)
|
||||
# Top-level Makefile for building PX4 firmware images.
|
||||
#
|
||||
|
||||
#
|
||||
# Get path and tool configuration
|
||||
#
|
||||
export PX4_BASE := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))/
|
||||
include $(PX4_BASE)makefiles/setup.mk
|
||||
|
||||
#
|
||||
# Get a version string provided by git
|
||||
# This assumes that git command is available and that
|
||||
# the directory holding this file also contains .git directory
|
||||
#
|
||||
GIT_DESC := $(shell git log -1 --pretty=format:%H)
|
||||
ifneq ($(words $(GIT_DESC)),1)
|
||||
GIT_DESC := "unknown_git_version"
|
||||
endif
|
||||
|
||||
CMAKE_VER := $(shell Tools/check_cmake.sh; echo $$?)
|
||||
ifneq ($(CMAKE_VER),0)
|
||||
$(warning Not a valid CMake version or CMake not installed.)
|
||||
$(warning On Ubuntu, install or upgrade via:)
|
||||
$(warning )
|
||||
$(warning 3rd party PPA:)
|
||||
$(warning sudo add-apt-repository ppa:george-edison55/cmake-3.x -y)
|
||||
$(warning sudo apt-get update)
|
||||
$(warning sudo apt-get install cmake)
|
||||
$(warning )
|
||||
$(warning Official website:)
|
||||
$(warning wget https://cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.sh)
|
||||
$(warning chmod +x cmake-3.3.2-Linux-x86_64.sh)
|
||||
$(warning sudo mkdir /opt/cmake-3.3.2)
|
||||
$(warning sudo ./cmake-3.3.2-Linux-x86_64.sh --prefix=/opt/cmake-3.3.2 --exclude-subdir)
|
||||
$(warning export PATH=/opt/cmake-3.3.2/bin:$$PATH)
|
||||
$(warning )
|
||||
$(error Fatal)
|
||||
GIT_DESC_SHORT := $(shell echo $(GIT_DESC) | cut -c1-16)
|
||||
|
||||
#
|
||||
# Canned firmware configurations that we (know how to) build.
|
||||
#
|
||||
KNOWN_CONFIGS := $(subst config_,,$(basename $(notdir $(wildcard $(PX4_MK_DIR)config_*.mk))))
|
||||
CONFIGS ?= $(KNOWN_CONFIGS)
|
||||
|
||||
#
|
||||
# Boards that we (know how to) build NuttX export kits for.
|
||||
#
|
||||
KNOWN_BOARDS := $(subst board_,,$(basename $(notdir $(wildcard $(PX4_MK_DIR)board_*.mk))))
|
||||
BOARDS ?= $(KNOWN_BOARDS)
|
||||
|
||||
#
|
||||
# Debugging
|
||||
#
|
||||
MQUIET = --no-print-directory
|
||||
#MQUIET = --print-directory
|
||||
|
||||
################################################################################
|
||||
# No user-serviceable parts below
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# If the user has listed a config as a target, strip it out and override CONFIGS.
|
||||
#
|
||||
FIRMWARE_GOAL = firmware
|
||||
EXPLICIT_CONFIGS := $(filter $(CONFIGS),$(MAKECMDGOALS))
|
||||
ifneq ($(EXPLICIT_CONFIGS),)
|
||||
CONFIGS := $(EXPLICIT_CONFIGS)
|
||||
.PHONY: $(EXPLICIT_CONFIGS)
|
||||
$(EXPLICIT_CONFIGS): all
|
||||
|
||||
#
|
||||
# If the user has asked to upload, they must have also specified exactly one
|
||||
# config.
|
||||
#
|
||||
ifneq ($(filter upload,$(MAKECMDGOALS)),)
|
||||
ifneq ($(words $(EXPLICIT_CONFIGS)),1)
|
||||
$(error In order to upload, exactly one board config must be specified)
|
||||
endif
|
||||
FIRMWARE_GOAL = upload
|
||||
.PHONY: upload
|
||||
upload:
|
||||
@:
|
||||
endif
|
||||
endif
|
||||
|
||||
# Help
|
||||
# --------------------------------------------------------------------
|
||||
# Don't be afraid of this makefile, it is just passing
|
||||
# arguments to cmake to allow us to keep the wiki pages etc.
|
||||
# that describe how to build the px4 firmware
|
||||
# the same even when using cmake instead of make.
|
||||
#
|
||||
# Example usage:
|
||||
# Built products
|
||||
#
|
||||
# make px4fmu-v2_default (builds)
|
||||
# make px4fmu-v2_default upload (builds and uploads)
|
||||
# make px4fmu-v2_default test (builds and tests)
|
||||
DESIRED_FIRMWARES = $(foreach config,$(CONFIGS),$(IMAGE_DIR)$(config).px4)
|
||||
STAGED_FIRMWARES = $(foreach config,$(KNOWN_CONFIGS),$(IMAGE_DIR)$(config).px4)
|
||||
FIRMWARES = $(foreach config,$(KNOWN_CONFIGS),$(BUILD_DIR)$(config).build/firmware.px4)
|
||||
|
||||
all: $(DESIRED_FIRMWARES)
|
||||
|
||||
#
|
||||
# This tells cmake to build the nuttx px4fmu-v2 default config in the
|
||||
# directory build_nuttx_px4fmu-v2_default and then call make
|
||||
# in that directory with the target upload.
|
||||
# Copy FIRMWARES into the image directory.
|
||||
#
|
||||
# XXX copying the .bin files is a hack to work around the PX4IO uploader
|
||||
# not supporting .px4 files, and it should be deprecated onced that
|
||||
# is taken care of.
|
||||
#
|
||||
$(STAGED_FIRMWARES): $(IMAGE_DIR)%.px4: $(BUILD_DIR)%.build/firmware.px4
|
||||
@$(ECHO) %% Copying $@
|
||||
$(Q) $(COPY) $< $@
|
||||
$(Q) $(COPY) $(patsubst %.px4,%.bin,$<) $(patsubst %.px4,%.bin,$@)
|
||||
|
||||
# explicity set default build target
|
||||
all: px4fmu-v2_default
|
||||
#
|
||||
# Generate FIRMWARES.
|
||||
#
|
||||
.PHONY: $(FIRMWARES)
|
||||
$(BUILD_DIR)%.build/firmware.px4: config = $(patsubst $(BUILD_DIR)%.build/firmware.px4,%,$@)
|
||||
$(BUILD_DIR)%.build/firmware.px4: work_dir = $(BUILD_DIR)$(config).build/
|
||||
$(FIRMWARES): $(BUILD_DIR)%.build/firmware.px4: checkgitversion generateuorbtopicheaders checksubmodules
|
||||
@$(ECHO) %%%%
|
||||
@$(ECHO) %%%% Building $(config) in $(work_dir)
|
||||
@$(ECHO) %%%%
|
||||
$(Q) $(MKDIR) -p $(work_dir)
|
||||
$(Q) $(MAKE) -r -C $(work_dir) \
|
||||
-f $(PX4_MK_DIR)firmware.mk \
|
||||
CONFIG=$(config) \
|
||||
WORK_DIR=$(work_dir) \
|
||||
$(FIRMWARE_GOAL)
|
||||
|
||||
# Parsing
|
||||
# --------------------------------------------------------------------
|
||||
# assume 1st argument passed is the main target, the
|
||||
# rest are arguments to pass to the makefile generated
|
||||
# by cmake in the subdirectory
|
||||
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
j ?= 4
|
||||
#
|
||||
# Make FMU firmwares depend on the corresponding IO firmware.
|
||||
#
|
||||
# This is a pretty vile hack, since it hard-codes knowledge of the FMU->IO dependency
|
||||
# and forces the _default config in all cases. There has to be a better way to do this...
|
||||
#
|
||||
FMU_VERSION = $(patsubst px4fmu-%,%,$(word 1, $(subst _, ,$(1))))
|
||||
define FMU_DEP
|
||||
$(BUILD_DIR)$(1).build/firmware.px4: $(IMAGE_DIR)px4io-$(call FMU_VERSION,$(1))_default.px4
|
||||
endef
|
||||
FMU_CONFIGS := $(filter px4fmu%,$(CONFIGS))
|
||||
$(foreach config,$(FMU_CONFIGS),$(eval $(call FMU_DEP,$(config))))
|
||||
|
||||
NINJA_BUILD := $(shell ninja --version 2>/dev/null)
|
||||
ifdef NINJA_BUILD
|
||||
PX4_CMAKE_GENERATOR ?= "Ninja"
|
||||
PX4_MAKE = ninja
|
||||
PX4_MAKE_ARGS =
|
||||
#
|
||||
# Build the NuttX export archives.
|
||||
#
|
||||
# Note that there are no explicit dependencies extended from these
|
||||
# archives. If NuttX is updated, the user is expected to rebuild the
|
||||
# archives/build area manually. Likewise, when the 'archives' target is
|
||||
# invoked, all archives are always rebuilt.
|
||||
#
|
||||
# XXX Should support fetching/unpacking from a separate directory to permit
|
||||
# downloads of the prebuilt archives as well...
|
||||
#
|
||||
NUTTX_ARCHIVES = $(foreach board,$(BOARDS),$(ARCHIVE_DIR)$(board).export)
|
||||
.PHONY: archives
|
||||
archives: checksubmodules $(NUTTX_ARCHIVES)
|
||||
|
||||
# We cannot build these parallel; note that we also force -j1 for the
|
||||
# sub-make invocations.
|
||||
ifneq ($(filter archives,$(MAKECMDGOALS)),)
|
||||
.NOTPARALLEL:
|
||||
endif
|
||||
|
||||
J?=1
|
||||
|
||||
$(ARCHIVE_DIR)%.export: board = $(notdir $(basename $@))
|
||||
$(ARCHIVE_DIR)%.export: configuration = nsh
|
||||
$(NUTTX_ARCHIVES): $(ARCHIVE_DIR)%.export: $(NUTTX_SRC)
|
||||
@$(ECHO) %% Configuring NuttX for $(board)
|
||||
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
|
||||
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) distclean
|
||||
$(Q) (cd $(NUTTX_SRC)/configs && $(COPYDIR) $(PX4_BASE)nuttx-configs/$(board) .)
|
||||
$(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(board)/$(configuration))
|
||||
@$(ECHO) %% Exporting NuttX for $(board)
|
||||
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) CONFIG_ARCH_BOARD=$(board) export
|
||||
$(Q) $(MKDIR) -p $(dir $@)
|
||||
$(Q) $(COPY) $(NUTTX_SRC)nuttx-export.zip $@
|
||||
$(Q) (cd $(NUTTX_SRC)/configs && $(RMDIR) $(board))
|
||||
|
||||
#
|
||||
# The user can run the NuttX 'menuconfig' tool for a single board configuration with
|
||||
# make BOARDS=<boardname> menuconfig
|
||||
#
|
||||
ifeq ($(MAKECMDGOALS),menuconfig)
|
||||
ifneq ($(words $(BOARDS)),1)
|
||||
$(error BOARDS must specify exactly one board for the menuconfig goal)
|
||||
endif
|
||||
BOARD = $(BOARDS)
|
||||
menuconfig: $(NUTTX_SRC)
|
||||
@$(ECHO) %% Configuring NuttX for $(BOARD)
|
||||
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
|
||||
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) distclean
|
||||
$(Q) (cd $(NUTTX_SRC)/configs && $(COPYDIR) $(PX4_BASE)nuttx-configs/$(BOARD) .)
|
||||
$(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(BOARD)/nsh)
|
||||
@$(ECHO) %% Running menuconfig for $(BOARD)
|
||||
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) menuconfig
|
||||
@$(ECHO) %% Saving configuration file
|
||||
$(Q)$(COPY) $(NUTTX_SRC).config $(PX4_BASE)nuttx-configs/$(BOARD)/nsh/defconfig
|
||||
else
|
||||
|
||||
ifdef SYSTEMROOT
|
||||
# Windows
|
||||
PX4_CMAKE_GENERATOR ?= "MSYS Makefiles"
|
||||
else
|
||||
PX4_CMAKE_GENERATOR ?= "Unix Makefiles"
|
||||
endif
|
||||
PX4_MAKE = make
|
||||
PX4_MAKE_ARGS = -j$(j) --no-print-directory
|
||||
menuconfig:
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) "The menuconfig goal must be invoked without any other goal being specified"
|
||||
@$(ECHO) ""
|
||||
endif
|
||||
|
||||
# Functions
|
||||
# --------------------------------------------------------------------
|
||||
# describe how to build a cmake config
|
||||
define cmake-build
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(PWD)/build_$@); fi
|
||||
+@Tools/check_submodules.sh
|
||||
+@(echo "PX4 CONFIG: $@" && cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
endef
|
||||
$(NUTTX_SRC): checkgitversion checksubmodules
|
||||
|
||||
define cmake-build-other
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake $(2) -G$(PX4_CMAKE_GENERATOR) || (cd .. && rm -rf $(PWD)/build_$@); fi
|
||||
+@(cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
endef
|
||||
$(UAVCAN_DIR):
|
||||
$(Q) (./Tools/check_submodules.sh)
|
||||
|
||||
# create empty targets to avoid msgs for targets passed to cmake
|
||||
define cmake-targ
|
||||
$(1):
|
||||
@#
|
||||
.PHONY: $(1)
|
||||
endef
|
||||
|
||||
define colorecho
|
||||
@tput setaf 6
|
||||
@echo $1
|
||||
@tput sgr0
|
||||
endef
|
||||
|
||||
# ADD CONFIGS HERE
|
||||
# --------------------------------------------------------------------
|
||||
# Do not put any spaces between function arguments.
|
||||
|
||||
px4fmu-v1_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v1_default)
|
||||
|
||||
px4fmu-v2_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_default)
|
||||
|
||||
px4fmu-v2_test:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_test)
|
||||
|
||||
px4fmu-v4_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v4_default)
|
||||
|
||||
px4-stm32f4discovery_default:
|
||||
$(call cmake-build,nuttx_px4-stm32f4discovery_default)
|
||||
|
||||
px4fmu-v2_ekf2:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_ekf2)
|
||||
|
||||
mindpx-v2_default:
|
||||
$(call cmake-build,nuttx_mindpx-v2_default)
|
||||
|
||||
posix_sitl_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_test:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_replay:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_broadcast:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
ros_sitl_default:
|
||||
@echo "This target is deprecated. Use make 'posix_sitl_default gazebo' instead."
|
||||
|
||||
qurt_eagle_travis:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
qurt_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
eagle_default: posix_eagle_default qurt_eagle_default
|
||||
eagle_legacy_default: posix_eagle_legacy_driver_default qurt_eagle_legacy_driver_default
|
||||
|
||||
qurt_eagle_legacy_driver_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_eagle_legacy_driver_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
qurt_excelsior_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_excelsior_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
excelsior_default: posix_excelsior_default qurt_excelsior_default
|
||||
|
||||
posix_rpi2_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_rpi2_release:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_bebop_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix: posix_sitl_default
|
||||
|
||||
broadcast: posix_sitl_broadcast
|
||||
|
||||
sitl_deprecation:
|
||||
@echo "Deprecated. Use 'make posix_sitl_default jmavsim' or"
|
||||
@echo "'make posix_sitl_default gazebo' if Gazebo is preferred."
|
||||
|
||||
run_sitl_quad: sitl_deprecation
|
||||
run_sitl_plane: sitl_deprecation
|
||||
run_sitl_ros: sitl_deprecation
|
||||
|
||||
# Other targets
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
.PHONY: gazebo_build uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
|
||||
.NOTPARALLEL: gazebo_build uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
|
||||
|
||||
gazebo_build:
|
||||
@mkdir -p build_gazebo
|
||||
@if [ ! -e $(PWD)/build_gazebo/CMakeCache.txt ];then cd build_gazebo && cmake -Wno-dev -G$(PX4_CMAKE_GENERATOR) $(PWD)/Tools/sitl_gazebo; fi
|
||||
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS)
|
||||
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS) sdf
|
||||
|
||||
uavcan_firmware:
|
||||
ifeq ($(VECTORCONTROL),1)
|
||||
$(call colorecho,"Downloading and building Vector control (FOC) firmware for the S2740VC and PX4ESC 1.6")
|
||||
@(rm -rf vectorcontrol && git clone --quiet --depth 1 https://github.com/thiemar/vectorcontrol.git && cd vectorcontrol && BOARD=s2740vc_1_0 make --silent --no-print-directory && BOARD=px4esc_1_6 make --silent --no-print-directory && ../Tools/uavcan_copy.sh)
|
||||
ifeq ($(PX4_TARGET_OS),nuttx)
|
||||
# TODO
|
||||
# Move the above nuttx specific rules into $(PX4_BASE)makefiles/firmware_nuttx.mk
|
||||
endif
|
||||
ifeq ($(PX4_TARGET_OS),posix)
|
||||
include $(PX4_BASE)makefiles/firmware_posix.mk
|
||||
endif
|
||||
ifeq ($(PX4_TARGET_OS),posix-arm)
|
||||
include $(PX4_BASE)makefiles/firmware_posix.mk
|
||||
endif
|
||||
ifeq ($(PX4_TARGET_OS),qurt)
|
||||
include $(PX4_BASE)makefiles/firmware_qurt.mk
|
||||
endif
|
||||
|
||||
checks_defaults: \
|
||||
check_px4fmu-v1_default \
|
||||
check_px4fmu-v2_default \
|
||||
check_mindpx-v2_default \
|
||||
check_px4-stm32f4discovery_default \
|
||||
#
|
||||
# Versioning
|
||||
#
|
||||
|
||||
checks_bootloaders: \
|
||||
GIT_VER_FILE = $(PX4_VERSIONING_DIR).build_git_ver
|
||||
GIT_HEADER_FILE = $(PX4_VERSIONING_DIR)build_git_version.h
|
||||
|
||||
$(GIT_VER_FILE) :
|
||||
$(Q) if [ ! -f $(GIT_VER_FILE) ]; then \
|
||||
$(MKDIR) -p $(PX4_VERSIONING_DIR); \
|
||||
$(ECHO) "" > $(GIT_VER_FILE); \
|
||||
fi
|
||||
|
||||
checks_tests: \
|
||||
check_px4fmu-v2_test
|
||||
.PHONY: checkgitversion
|
||||
checkgitversion: $(GIT_VER_FILE)
|
||||
$(Q) if [ "$(GIT_DESC)" != "$(shell cat $(GIT_VER_FILE))" ]; then \
|
||||
$(ECHO) "/* Auto Magically Generated file */" > $(GIT_HEADER_FILE); \
|
||||
$(ECHO) "/* Do not edit! */" >> $(GIT_HEADER_FILE); \
|
||||
$(ECHO) "#define PX4_GIT_VERSION_STR \"$(GIT_DESC)\"" >> $(GIT_HEADER_FILE); \
|
||||
$(ECHO) "#define PX4_GIT_VERSION_BINARY 0x$(GIT_DESC_SHORT)" >> $(GIT_HEADER_FILE); \
|
||||
$(ECHO) $(GIT_DESC) > $(GIT_VER_FILE); \
|
||||
fi
|
||||
|
||||
checks_alts: \
|
||||
check_px4fmu-v2_ekf2 \
|
||||
#
|
||||
# Submodule Checks
|
||||
#
|
||||
|
||||
checks_uavcan: \
|
||||
check_px4fmu-v4_default_and_uavcan
|
||||
.PHONY: checksubmodules
|
||||
checksubmodules:
|
||||
$(Q) ($(PX4_BASE)/Tools/check_submodules.sh)
|
||||
|
||||
checks_sitls: \
|
||||
check_posix_sitl_default \
|
||||
check_posix_sitl_test \
|
||||
.PHONY: updatesubmodules
|
||||
updatesubmodules:
|
||||
$(Q) (git submodule init)
|
||||
$(Q) (git submodule update)
|
||||
|
||||
checks_last: \
|
||||
check_unittest \
|
||||
check_format \
|
||||
MSG_DIR = $(PX4_BASE)msg
|
||||
UORB_TEMPLATE_DIR = $(PX4_BASE)msg/templates/uorb
|
||||
MULTIPLATFORM_TEMPLATE_DIR = $(PX4_BASE)msg/templates/px4/uorb
|
||||
TOPICS_DIR = $(PX4_BASE)src/modules/uORB/topics
|
||||
MULTIPLATFORM_HEADER_DIR = $(PX4_BASE)src/platforms/nuttx/px4_messages
|
||||
MULTIPLATFORM_PREFIX = px4_
|
||||
TOPICHEADER_TEMP_DIR = $(BUILD_DIR)topics_temporary
|
||||
MULTI_TOPICHEADER_TEMP_DIR = $(BUILD_DIR)multi_topics_temporary
|
||||
GENMSG_PYTHONPATH = $(PX4_BASE)Tools/genmsg/src
|
||||
GENCPP_PYTHONPATH = $(PX4_BASE)Tools/gencpp/src
|
||||
|
||||
check: checks_defaults checks_tests checks_alts checks_uavcan checks_bootloaders checks_sitls checks_last
|
||||
.PHONY: generateuorbtopicheaders
|
||||
generateuorbtopicheaders: checksubmodules
|
||||
@$(ECHO) "Generating uORB topic headers"
|
||||
$(Q) (PYTHONPATH=$(GENMSG_PYTHONPATH):$(GENCPP_PYTHONPATH):$(PYTHONPATH) $(PYTHON) \
|
||||
$(PX4_BASE)Tools/px_generate_uorb_topic_headers.py \
|
||||
-d $(MSG_DIR) -o $(TOPICS_DIR) -e $(UORB_TEMPLATE_DIR) -t $(TOPICHEADER_TEMP_DIR))
|
||||
@$(ECHO) "Generating multiplatform uORB topic wrapper headers"
|
||||
$(Q) (PYTHONPATH=$(GENMSG_PYTHONPATH):$(GENCPP_PYTHONPATH):$(PYTHONPATH) $(PYTHON) \
|
||||
$(PX4_BASE)Tools/px_generate_uorb_topic_headers.py \
|
||||
-d $(MSG_DIR) -o $(MULTIPLATFORM_HEADER_DIR) -e $(MULTIPLATFORM_TEMPLATE_DIR) -t $(MULTI_TOPICHEADER_TEMP_DIR) -p $(MULTIPLATFORM_PREFIX))
|
||||
|
||||
#
|
||||
# Testing targets
|
||||
#
|
||||
testbuild:
|
||||
$(Q) (cd $(PX4_BASE) && $(MAKE) distclean && $(MAKE) archives && $(MAKE) -j8)
|
||||
$(Q) (zip -r Firmware.zip $(PX4_BASE)/Images)
|
||||
|
||||
#
|
||||
# Unittest targets. Builds and runs the host-level
|
||||
# unit tests.
|
||||
.PHONY: tests
|
||||
tests: generateuorbtopicheaders
|
||||
$(Q) (mkdir -p $(PX4_BASE)/unittests/build && cd $(PX4_BASE)/unittests/build && cmake .. && $(MAKE) unittests)
|
||||
|
||||
.PHONY: format check_format
|
||||
check_format:
|
||||
$(call colorecho,"Checking formatting with astyle")
|
||||
@./Tools/fix_code_style.sh
|
||||
@./Tools/check_code_style_all.sh
|
||||
|
||||
check_%:
|
||||
@echo
|
||||
$(call colorecho,"Building" $(subst check_,,$@))
|
||||
@$(MAKE) --no-print-directory $(subst check_,,$@)
|
||||
@echo
|
||||
|
||||
check_px4fmu-v4_default: uavcan_firmware
|
||||
check_px4fmu-v4_default_and_uavcan: check_px4fmu-v4_default
|
||||
@echo
|
||||
ifeq ($(VECTORCONTROL),1)
|
||||
@echo "Cleaning up vectorcontrol firmware"
|
||||
@rm -rf vectorcontrol
|
||||
@rm -rf ROMFS/px4fmu_common/uavcan
|
||||
endif
|
||||
|
||||
unittest: posix_sitl_test
|
||||
@export CC=clang
|
||||
@export CXX=clang++
|
||||
@export ASAN_OPTIONS=symbolize=1
|
||||
$(call cmake-build-other,unittest, ../unittests)
|
||||
@(cd build_unittest && ctest -j2 --output-on-failure)
|
||||
|
||||
test_onboard_sitl:
|
||||
@HEADLESS=1 make posix_sitl_test gazebo_iris
|
||||
|
||||
package_firmware:
|
||||
@zip --junk-paths Firmware.zip `find . -name \*.px4`
|
||||
$(Q) (./Tools/check_code_style.sh | sort -n)
|
||||
|
||||
#
|
||||
# Cleanup targets. 'clean' should remove all built products and force
|
||||
# a complete re-compilation, 'distclean' should remove everything
|
||||
# that's generated leaving only files that are in source control.
|
||||
#
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@rm -rf build_*/
|
||||
@(cd NuttX/nuttx && make clean)
|
||||
@echo > /dev/null
|
||||
$(Q) $(RMDIR) $(BUILD_DIR)*.build
|
||||
$(Q) $(RMDIR) $(PX4_VERSIONING_DIR)
|
||||
$(Q) $(REMOVE) $(IMAGE_DIR)*.px4
|
||||
$(Q) $(RMDIR) $(TOPICHEADER_TEMP_DIR)
|
||||
$(Q) $(RMDIR) $(MULTI_TOPICHEADER_TEMP_DIR)
|
||||
|
||||
submodulesclean:
|
||||
@git submodule sync --recursive
|
||||
@git submodule deinit -f .
|
||||
@git submodule update --init --recursive --force
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
@echo > /dev/null
|
||||
$(Q) $(REMOVE) $(ARCHIVE_DIR)*.export
|
||||
$(Q) $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) distclean
|
||||
$(Q) (cd $(NUTTX_SRC)/configs && $(FIND) . -maxdepth 1 -type l -delete)
|
||||
|
||||
distclean: submodulesclean
|
||||
@git clean -ff -x -d -e ".project" -e ".cproject"
|
||||
|
||||
# targets handled by cmake
|
||||
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
|
||||
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim replay \
|
||||
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_iris_opt_flow gazebo_tailsitter \
|
||||
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol gazebo_plane gazebo_solo
|
||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
CONFIGS:=$(shell ls cmake/configs | sed -e "s~.*/~~" | sed -e "s~\..*~~")
|
||||
|
||||
#help:
|
||||
# @echo
|
||||
# @echo "Type 'make ' and hit the tab key twice to see a list of the available"
|
||||
# @echo "build configurations."
|
||||
# @echo
|
||||
#
|
||||
# Print some help text
|
||||
#
|
||||
.PHONY: help
|
||||
help:
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " PX4 firmware builder"
|
||||
@$(ECHO) " ===================="
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " Available targets:"
|
||||
@$(ECHO) " ------------------"
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " archives"
|
||||
@$(ECHO) " Build the NuttX RTOS archives that are used by the firmware build."
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " all"
|
||||
@$(ECHO) " Build all firmware configs: $(CONFIGS)"
|
||||
@$(ECHO) " A limited set of configs can be built with CONFIGS=<list-of-configs>"
|
||||
@$(ECHO) ""
|
||||
@for config in $(CONFIGS); do \
|
||||
$(ECHO) " $$config"; \
|
||||
$(ECHO) " Build just the $$config firmware configuration."; \
|
||||
$(ECHO) ""; \
|
||||
done
|
||||
@$(ECHO) " clean"
|
||||
@$(ECHO) " Remove all firmware build pieces."
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " distclean"
|
||||
@$(ECHO) " Remove all compilation products, including NuttX RTOS archives."
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " upload"
|
||||
@$(ECHO) " When exactly one config is being built, add this target to upload the"
|
||||
@$(ECHO) " firmware to the board when the build is complete. Not supported for"
|
||||
@$(ECHO) " all configurations."
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " testbuild"
|
||||
@$(ECHO) " Perform a complete clean build of the entire tree."
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " Common options:"
|
||||
@$(ECHO) " ---------------"
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) " V=1"
|
||||
@$(ECHO) " If V is set, more verbose output is printed during the build. This can"
|
||||
@$(ECHO) " help when diagnosing issues with the build or toolchain."
|
||||
@$(ECHO) ""
|
||||
|
||||
2
NuttX
2
NuttX
@ -1 +1 @@
|
||||
Subproject commit f0f4bdc872d324f64e9d93d6f8989d3c1dfa2633
|
||||
Subproject commit 8891d035df45c8be570cfbd9419b438679faf7ee
|
||||
40
README.md
40
README.md
@ -1,35 +1,43 @@
|
||||
## PX4 Pro Drone Autopilot ##
|
||||
## PX4 Flight Core and PX4 Middleware ##
|
||||
|
||||
[](https://travis-ci.org/PX4/Firmware) [](https://scan.coverity.com/projects/3966?tab=overview)
|
||||
|
||||
[](https://gitter.im/PX4/Firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
This repository holds the [PX4 Pro](http://px4.io) flight control solution for drones, with the main applications located in the src/modules directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
This repository contains the PX4 Flight Core, with the main applications located in the src/modules directory. It also contains the PX4 Drone Platform, which contains drivers and middleware to run drones.
|
||||
|
||||
* Official Website: http://px4.io
|
||||
* License: BSD 3-clause (see [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
|
||||
* License: BSD 3-clause (see LICENSE.md)
|
||||
* Supported airframes (more experimental are supported):
|
||||
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
|
||||
* [Fixed wing](http://px4.io/portfolio_category/plane/)
|
||||
* [VTOL](http://px4.io/portfolio_category/vtol/)
|
||||
* Releases
|
||||
* [Downloads](https://github.com/PX4/Firmware/releases)
|
||||
* [Multicopters](http://px4.io/platforms/multicopters/start)
|
||||
* [Fixed wing](http://px4.io/platforms/planes/start)
|
||||
* [VTOL](http://px4.io/platforms/vtol/start)
|
||||
* Binaries (always up-to-date from master):
|
||||
* [Downloads](http://px4.io/firmware/downloads)
|
||||
* Mailing list: [Google Groups](http://groups.google.com/group/px4users)
|
||||
|
||||
### Users ###
|
||||
|
||||
Please refer to the [user documentation](http://px4.io) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
|
||||
Please refer to the [user documentation](https://pixhawk.org/users/start) for flying drones with the PX4 flight stack.
|
||||
|
||||
### Developers ###
|
||||
|
||||
* [Developer Forum / Mailing list](http://groups.google.com/group/px4users)
|
||||
* [Guide for Contributions](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
|
||||
* [Developer guide](http://dev.px4.io)
|
||||
Contributing guide:
|
||||
* [CONTRIBUTING.md](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
|
||||
* [PX4 Contribution Guide](http://px4.io/dev/contributing)
|
||||
|
||||
Developer guide:
|
||||
http://px4.io/dev/
|
||||
|
||||
Testing guide:
|
||||
http://px4.io/dev/unit_tests
|
||||
|
||||
This repository contains code supporting these boards:
|
||||
* [Snapdragon Flight](http://dev.px4.io/hardware-snapdragon.html)
|
||||
* FMUv1.x
|
||||
* FMUv2.x ([Pixhawk](http://dev.px4.io/hardware-pixhawk.html), Pixhawk 2 and [Pixfalcon](http://dev.px4.io/hardware-pixfalcon.html))
|
||||
* FMUv4.x (Pixhawk X and [Pixracer](http://dev.px4.io/hardware-pixracer.html))
|
||||
* FMUv2.x
|
||||
* AeroCore (v1 and v2)
|
||||
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
|
||||
|
||||
## NuttShell (NSH) ##
|
||||
|
||||
NSH usage documentation:
|
||||
http://px4.io/users/serial_connection
|
||||
|
||||
@ -20,8 +20,7 @@ then
|
||||
param set FW_AIRSPD_MAX 20
|
||||
param set FW_AIRSPD_MIN 12
|
||||
param set FW_AIRSPD_TRIM 14
|
||||
param set FW_R_TC 0.3
|
||||
param set FW_P_TC 0.3
|
||||
param set FW_ATT_TC 0.3
|
||||
param set FW_L1_DAMPING 0.74
|
||||
param set FW_L1_PERIOD 16
|
||||
param set FW_LND_ANG 15
|
||||
@ -38,8 +37,10 @@ then
|
||||
param set FW_RR_I 0.1
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.3
|
||||
param set RWTO_TKOFF 1
|
||||
fi
|
||||
|
||||
# Enable gamepad / joystick support
|
||||
param set COM_RC_IN_MODE 2
|
||||
|
||||
set HIL yes
|
||||
set MIXER AERT
|
||||
|
||||
@ -28,3 +28,11 @@ fi
|
||||
set MIXER quad_w
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_MIN 1200
|
||||
|
||||
set MIXER_AUX pass
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1000
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
|
||||
@ -25,10 +25,13 @@ then
|
||||
param set MC_YAWRATE_I 0.25
|
||||
param set MC_YAWRATE_D 0.0
|
||||
|
||||
param set BAT_V_DIV 12.27559
|
||||
param set BAT_A_PER_V 15.39103
|
||||
param set BAT_V_SCALING 0.00989
|
||||
param set BAT_C_SCALING 0.0124
|
||||
fi
|
||||
|
||||
set MIXER quad_w
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
set PWM_MIN 1200
|
||||
set PWM_MAX 1950
|
||||
|
||||
@ -30,4 +30,7 @@ fi
|
||||
|
||||
set MIXER quad_w
|
||||
|
||||
set PWM_MIN 1210
|
||||
set PWM_MAX 2100
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
@ -30,6 +30,7 @@ fi
|
||||
set MIXER sk450_deadcat
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_MIN 1050
|
||||
|
||||
set PWM_AUX_OUT 1234
|
||||
# set PWM_AUX_MIN 900
|
||||
|
||||
@ -11,4 +11,7 @@ sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_x
|
||||
|
||||
# Enable gamepad / joystick support
|
||||
param set COM_RC_IN_MODE 2
|
||||
|
||||
set HIL yes
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name 3DR DIY Quad
|
||||
# @name 3DR Iris DIY Quad
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
@ -11,12 +11,13 @@ sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
# TODO tune roll/pitch separately
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.14
|
||||
param set MC_ROLLRATE_P 0.08
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.14
|
||||
param set MC_PITCHRATE_P 0.16
|
||||
param set MC_PITCHRATE_I 0.09
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_YAW_P 4
|
||||
|
||||
@ -11,4 +11,7 @@ sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_+
|
||||
|
||||
# Enable gamepad / joystick support
|
||||
param set COM_RC_IN_MODE 2
|
||||
|
||||
set HIL yes
|
||||
|
||||
@ -11,4 +11,7 @@ sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
set HIL yes
|
||||
|
||||
# Enable gamepad / joystick support
|
||||
param set COM_RC_IN_MODE 2
|
||||
|
||||
set MIXER AERT
|
||||
|
||||
@ -14,8 +14,7 @@ then
|
||||
param set FW_AIRSPD_MIN 12
|
||||
param set FW_AIRSPD_TRIM 25
|
||||
param set FW_AIRSPD_MAX 40
|
||||
param set FW_R_TC 0.3
|
||||
param set FW_P_TC 0.3
|
||||
param set FW_ATT_TC 0.3
|
||||
param set FW_L1_DAMPING 0.74
|
||||
param set FW_L1_PERIOD 15
|
||||
param set FW_PR_FF 0.8
|
||||
@ -37,5 +36,8 @@ fi
|
||||
|
||||
set HIL yes
|
||||
|
||||
# Enable gamepad / joystick support
|
||||
param set COM_RC_IN_MODE 2
|
||||
|
||||
# Set the AERT mixer for HIL (even if the malolo is a flying wing)
|
||||
set MIXER AERT
|
||||
|
||||
@ -4,17 +4,6 @@
|
||||
#
|
||||
# @type Hexarotor Coaxial
|
||||
#
|
||||
# @output MAIN1 front right top, CW; angle:60; direction:CW
|
||||
# @output MAIN2 front right bottom, CCW; angle:60; direction:CCW
|
||||
# @output MAIN3 back top, CW; angle:180; direction:CW
|
||||
# @output MAIN4 back bottom, CCW; angle:180; direction:CCW
|
||||
# @output MAIN5 front left top, CW; angle:-60; direction:CW
|
||||
# @output MAIN6 front left bottom, CCW;angle:-60; direction:CCW
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Steadidrone MAVRIK
|
||||
#
|
||||
# @type Octo Coax Wide
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_PITCH_P 4.0
|
||||
param set MC_PITCHRATE_P 0.24
|
||||
param set MC_PITCHRATE_I 0.09
|
||||
param set MC_PITCHRATE_D 0.013
|
||||
param set MC_PITCHRATE_MAX 180.0
|
||||
|
||||
param set MC_ROLL_P 4.0
|
||||
param set MC_ROLLRATE_P 0.16
|
||||
param set MC_ROLLRATE_I 0.07
|
||||
param set MC_ROLLRATE_D 0.009
|
||||
param set MC_ROLLRATE_MAX 180.0
|
||||
|
||||
param set MC_YAW_P 3.0
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.5
|
||||
|
||||
param set MPC_HOLD_MAX_XY 0.25
|
||||
param set MPC_THR_MIN 0.15
|
||||
param set MPC_Z_VEL_MAX 2.0
|
||||
|
||||
param set BAT_N_CELLS 4
|
||||
fi
|
||||
|
||||
set MIXER octo_cox_w
|
||||
|
||||
set PWM_OUT 12345678
|
||||
@ -1,44 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Caipiroshka Duo Tailsitter
|
||||
#
|
||||
# @type VTOL Duo Tailsitter
|
||||
#
|
||||
# @output MAIN1 motor left
|
||||
# @output MAIN2 motor right
|
||||
# @output MAIN5 elevon left
|
||||
# @output MAIN6 elevon right
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.12
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 4.5
|
||||
param set MC_PITCHRATE_P 0.3
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set VT_MOT_COUNT 2
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
param set MAV_TYPE 19
|
||||
fi
|
||||
|
||||
set MIXER caipirinha_vtol
|
||||
|
||||
set PWM_OUT 1234
|
||||
@ -1,47 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name BirdsEyeView Aerobotics FireFly6
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.17
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.14
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set VT_TILT_MC 0.08
|
||||
param set VT_TILT_TRANS 0.5
|
||||
param set VT_TILT_FW 0.9
|
||||
|
||||
param set VT_MOT_COUNT 6
|
||||
param set VT_FW_MOT_OFFID 34
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 1
|
||||
fi
|
||||
|
||||
set MIXER firefly6
|
||||
set PWM_OUT 12345678
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX firefly6
|
||||
|
||||
set MAV_TYPE 21
|
||||
@ -1,25 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Quadrotor X Tailsitter
|
||||
#
|
||||
# @type VTOL Quad Tailsitter
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
param set VT_ELEV_MC_LOCK 1
|
||||
fi
|
||||
|
||||
set MIXER quad_x_vtol
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_MAX 2000
|
||||
set PWM_RATE 400
|
||||
set MAV_TYPE 20
|
||||
@ -1,25 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Quadrotor + Tailsitter
|
||||
#
|
||||
# @type VTOL Quad Tailsitter
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
param set VT_ELEV_MC_LOCK 1
|
||||
fi
|
||||
|
||||
set MIXER quad_+_vtol
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_MAX 2000
|
||||
set PWM_RATE 400
|
||||
set MAV_TYPE 20
|
||||
@ -1,60 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Fun Cub Quad VTOL.
|
||||
#
|
||||
# @type Standard VTOL
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_TRANS_THR 0.75
|
||||
param set VT_ARSP_TRANS 12
|
||||
param set VT_ARSP_BLEND 6
|
||||
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.17
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.19
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set FW_PR_FF 0.5
|
||||
param set FW_PR_I 0.02
|
||||
param set FW_PR_IMAX 0.4
|
||||
param set FW_PR_P 0.08
|
||||
param set FW_RR_FF 0.6
|
||||
param set FW_RR_I 0.01
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.05
|
||||
param set FW_THR_CRUISE 0.75
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
@ -1,48 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic quad delta VTOL.
|
||||
#
|
||||
# @type Standard VTOL
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_TRANS_THR 0.75
|
||||
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.12
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_delta
|
||||
set PWM_ACHDIS 3
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
@ -1,48 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic AAVVT v-tail plane airframe with Quad VTOL.
|
||||
#
|
||||
# @type Standard VTOL
|
||||
#
|
||||
# @maintainer Sander Smeets <sander@droneslab.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_TRANS_THR 0.75
|
||||
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.12
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAVVT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
@ -1,68 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name QuadRanger
|
||||
#
|
||||
# @type Standard VTOL
|
||||
#
|
||||
# @maintainer Sander Smeets <sander@droneslab.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_TRANS_THR 0.75
|
||||
|
||||
param set PWM_AUX_REV1 1
|
||||
param set PWM_AUX_REV2 1
|
||||
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.1
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.5
|
||||
param set MC_YAW_FF 0.7
|
||||
param set MC_YAWRATE_P 0.6
|
||||
param set MC_YAWRATE_I 0.04
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set MPC_ACC_HOR_MAX 2.0
|
||||
param set MPC_Z_VEL_MAX 1.5
|
||||
param set MPC_TKO_SPEED 1.5
|
||||
param set MPC_LAND_SPEED 0.8
|
||||
|
||||
param set FW_THR_CRUISE 65.0
|
||||
param set FW_PR_P 0.08
|
||||
param set FW_PR_FF 0.5
|
||||
param set FW_RR_P 0.05
|
||||
param set FW_RR_FF 0.6
|
||||
|
||||
param set MIS_YAW_TMT 10
|
||||
|
||||
param set VT_ARSP_TRANS 15.0
|
||||
param set VT_ARSP_BLEND 8.0
|
||||
param set VT_B_TRANS_DUR 4.0
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
@ -1,88 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Sparkle Tech Ranger VTOL
|
||||
#
|
||||
# @type Standard VTOL
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1180
|
||||
param set MAV_TYPE 22
|
||||
param set VT_ARSP_TRANS 15.0
|
||||
param set VT_B_TRANS_DUR 4.0
|
||||
param set VT_TRANS_MIN_TM 5.0
|
||||
param set VT_TRANS_THR 0.6
|
||||
param set VT_TRANS_TIMEOUT 30.0
|
||||
|
||||
param set FW_AIRSPD_MAX 22.0
|
||||
param set FW_AIRSPD_MIN 14.0
|
||||
param set FW_AIRSPD_TRIM 16.0
|
||||
param set FW_L1_PERIOD 25.0
|
||||
param set FW_PR_P 0.060
|
||||
param set FW_P_RMAX_NEG 40.0
|
||||
param set FW_P_RMAX_POS 40.0
|
||||
param set FW_RR_FF 0.4
|
||||
param set FW_RR_P 0.04
|
||||
param set FW_R_RMAX 40.0
|
||||
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_I 0.0
|
||||
param set MC_PITCHRATE_MAX 60.0
|
||||
param set MC_PITCHRATE_P 0.21
|
||||
param set MC_PITCH_P 4.0
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_MAX 60.0
|
||||
param set MC_ROLLRATE_P 0.24
|
||||
param set MC_ROLL_P 4.0
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_MAX 40.0
|
||||
param set MC_YAWRATE_P 0.18
|
||||
param set MC_YAWRAUTO_MAX 40.0
|
||||
|
||||
param set MIS_TAKEOFF_ALT 2.5
|
||||
param set MIS_YAW_TMT 20.0
|
||||
|
||||
param set MPC_ACC_HOR_MAX 1.0
|
||||
param set MPC_HOLD_MAX_XY 0.5
|
||||
param set MPC_HOLD_MAX_Z 0.5
|
||||
param set MPC_LAND_SPEED 1.0
|
||||
param set MPC_MANTHR_MIN 0.05
|
||||
param set MPC_MAN_Y_MAX 120.0
|
||||
param set MPC_THR_MIN 0.07
|
||||
param set MPC_TILTMAX_AIR 35.0
|
||||
param set MPC_TILTMAX_LND 20.0
|
||||
param set MPC_TKO_SPEED 1.0
|
||||
param set MPC_XY_FF 0.1
|
||||
param set MPC_XY_P 0.3
|
||||
param set MPC_XY_VEL_MAX 3.0
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_Z_FF 0.3
|
||||
param set MPC_Z_P 0.5
|
||||
param set MPC_Z_VEL_MAX 1.0
|
||||
param set MPC_Z_VEL_P 0.1
|
||||
|
||||
param set NAV_ACC_RAD 3.0
|
||||
|
||||
param set PWM_AUX_REV1 1
|
||||
param set PWM_AUX_REV2 1
|
||||
param set PWM_AUX_REV3 1
|
||||
param set PWM_AUX_REV4 1
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
@ -1,64 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Esky (Big) Lama v4
|
||||
#
|
||||
# @type Coaxial Helicopter
|
||||
#
|
||||
# @output MAIN1 Left swashplate servomotor, pitch axis
|
||||
# @output MAIN2 Right swashplate servomotor, roll axis
|
||||
# @output MAIN3 Upper rotor (CCW)
|
||||
# @output MAIN4 Lower rotor (CW)
|
||||
#
|
||||
# @maintainer Emmanuel Roussel
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
set MIXER coax
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set PE_VELNE_NOISE 0.5
|
||||
param set PE_VELD_NOISE 0.35
|
||||
param set PE_POSNE_NOISE 0.5
|
||||
param set PE_POSD_NOISE 1.25
|
||||
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
|
||||
param set PWM_DISARMED 900
|
||||
param set PWM_MIN 1075
|
||||
param set PWM_MAX 1950
|
||||
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.17
|
||||
param set MC_ROLLRATE_I 0.05
|
||||
param set MC_ROLLRATE_D 0.005
|
||||
param set MC_ROLLRATE_FF 0
|
||||
param set MC_PITCH_P 6.5
|
||||
param set MC_PITCHRATE_P 0.17
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCHRATE_D 0.005
|
||||
param set MC_PITCHRATE_FF 0
|
||||
param set MC_YAW_P 2
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.1
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0
|
||||
fi
|
||||
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 34
|
||||
set PWM_RATE 400
|
||||
set PWM_DISARMED p:PWM_DISARMED
|
||||
set PWM_MIN p:PWM_MIN
|
||||
set PWM_MAX p:PWM_MAX
|
||||
|
||||
# This is the gimbal pass mixer
|
||||
set MIXER_AUX pass
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1500
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
@ -1,12 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Passthrough mode for Snapdragon
|
||||
#
|
||||
# @type custom
|
||||
#
|
||||
# @maintainer Julian Oes <julian@oes.ch>
|
||||
#
|
||||
# This startup can be used on Pixhawk/Pixfalcon/Pixracer for the
|
||||
# passthrough of RC input and PWM output.
|
||||
|
||||
set VEHICLE_TYPE passthrough
|
||||
@ -6,8 +6,8 @@
|
||||
#
|
||||
# @output MAIN1 aileron
|
||||
# @output MAIN2 elevator
|
||||
# @output MAIN3 rudder
|
||||
# @output MAIN4 throttle
|
||||
# @output MAIN4 rudder
|
||||
# @output MAIN3 throttle
|
||||
# @output MAIN5 flaps
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
@ -20,9 +20,3 @@
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
set MIXER AERT
|
||||
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 4
|
||||
set PWM_DISARMED p:PWM_DISARMED
|
||||
set PWM_MIN p:PWM_MIN
|
||||
set PWM_MAX p:PWM_MAX
|
||||
|
||||
@ -20,9 +20,3 @@
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
set MIXER AETR
|
||||
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 3
|
||||
set PWM_DISARMED p:PWM_DISARMED
|
||||
set PWM_MIN p:PWM_MIN
|
||||
set PWM_MAX p:PWM_MAX
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Bormatec Maja
|
||||
#
|
||||
# @type Standard Plane
|
||||
#
|
||||
# @output MAIN1 aileron
|
||||
# @output MAIN2 aileron
|
||||
# @output MAIN3 elevator
|
||||
# @output MAIN4 rudder
|
||||
# @output MAIN5 throttle
|
||||
# @output MAIN6 wheel
|
||||
# @output MAIN7 flaps
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MIN 10
|
||||
param set FW_AIRSPD_TRIM 15
|
||||
param set FW_AIRSPD_MAX 20
|
||||
|
||||
param set FW_MAN_P_MAX 55
|
||||
param set FW_MAN_R_MAX 55
|
||||
param set FW_R_LIM 55
|
||||
|
||||
param set FW_WR_FF 0.2
|
||||
param set FW_WR_I 0.2
|
||||
param set FW_WR_IMAX 0.8
|
||||
param set FW_WR_P 1
|
||||
param set FW_W_RMAX 0
|
||||
|
||||
# set disarmed value for the ESC
|
||||
param set PWM_DISARMED 1000
|
||||
fi
|
||||
|
||||
set MIXER AAERTWF
|
||||
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 5
|
||||
set PWM_DISARMED p:PWM_DISARMED
|
||||
set PWM_MIN p:PWM_MIN
|
||||
set PWM_MAX p:PWM_MAX
|
||||
@ -1,51 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Applied Aeronautics Albatross
|
||||
#
|
||||
# @type Plane A-Tail
|
||||
#
|
||||
# @output MAIN1 aileron right
|
||||
# @output MAIN2 aileron left
|
||||
# @output MAIN3 v-tail right
|
||||
# @output MAIN4 v-tail left
|
||||
# @output MAIN5 throttle
|
||||
# @output MAIN6 wheel
|
||||
# @output MAIN7 flaps right
|
||||
# @output MAIN8 flaps left
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MIN 10
|
||||
param set FW_AIRSPD_TRIM 15
|
||||
param set FW_AIRSPD_MAX 20
|
||||
|
||||
param set FW_MAN_P_MAX 55
|
||||
param set FW_MAN_R_MAX 55
|
||||
param set FW_R_LIM 55
|
||||
|
||||
param set FW_WR_FF 0.2
|
||||
param set FW_WR_I 0.2
|
||||
param set FW_WR_IMAX 0.8
|
||||
param set FW_WR_P 1
|
||||
param set FW_W_RMAX 0
|
||||
|
||||
# set disarmed value for the ESC
|
||||
param set PWM_DISARMED 1000
|
||||
fi
|
||||
|
||||
set MIXER AAVVTWFF
|
||||
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 5
|
||||
set PWM_DISARMED p:PWM_DISARMED
|
||||
set PWM_MIN p:PWM_MIN
|
||||
set PWM_MAX p:PWM_MAX
|
||||
@ -24,8 +24,7 @@ then
|
||||
param set FW_AIRSPD_MAX 15
|
||||
param set FW_AIRSPD_MIN 10
|
||||
param set FW_AIRSPD_TRIM 13
|
||||
param set FW_R_TC 0.3
|
||||
param set FW_P_TC 0.3
|
||||
param set FW_ATT_TC 0.3
|
||||
param set FW_L1_DAMPING 0.74
|
||||
param set FW_L1_PERIOD 16
|
||||
param set FW_LND_ANG 15
|
||||
|
||||
@ -24,8 +24,7 @@ then
|
||||
param set FW_AIRSPD_MIN 13
|
||||
param set FW_AIRSPD_TRIM 15
|
||||
param set FW_AIRSPD_MAX 25
|
||||
param set FW_R_TC 0.3
|
||||
param set FW_P_TC 0.3
|
||||
param set FW_ATT_TC 0.3
|
||||
param set FW_L1_DAMPING 0.75
|
||||
param set FW_L1_PERIOD 15
|
||||
param set FW_PR_FF 0.2
|
||||
|
||||
@ -24,8 +24,7 @@ then
|
||||
param set FW_AIRSPD_MIN 15
|
||||
param set FW_AIRSPD_TRIM 20
|
||||
param set FW_AIRSPD_MAX 40
|
||||
param set FW_R_TC 0.3
|
||||
param set FW_P_TC 0.3
|
||||
param set FW_ATT_TC 0.3
|
||||
param set FW_L1_DAMPING 0.74
|
||||
param set FW_L1_PERIOD 16
|
||||
param set FW_LND_ANG 15
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
# @maintainer Simon Wilks <simon@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
@ -25,8 +25,7 @@ then
|
||||
param set FW_AIRSPD_MAX 15
|
||||
param set FW_AIRSPD_MIN 10
|
||||
param set FW_AIRSPD_TRIM 13
|
||||
param set FW_R_TC 0.3
|
||||
param set FW_P_TC 0.3
|
||||
param set FW_ATT_TC 0.3
|
||||
param set FW_L1_DAMPING 0.74
|
||||
param set FW_L1_PERIOD 16
|
||||
param set FW_LND_ANG 15
|
||||
@ -40,9 +39,6 @@ then
|
||||
param set FW_RR_P 0.04
|
||||
fi
|
||||
|
||||
# Configure this as plane
|
||||
set MAV_TYPE 1
|
||||
# Set mixer
|
||||
set MIXER wingwing
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Sparkle Tech Pigeon
|
||||
#
|
||||
# @url http://www.sparkletech.hk/
|
||||
#
|
||||
# @type Flying Wing
|
||||
#
|
||||
# @output MAIN1 left aileron
|
||||
# @output MAIN2 right aileron
|
||||
# @output MAIN4 throttle
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MIN 15
|
||||
param set FW_AIRSPD_TRIM 20
|
||||
param set FW_AIRSPD_MAX 27
|
||||
param set FW_ATT_TC 0.3
|
||||
param set FW_L1_DAMPING 0.75
|
||||
param set FW_L1_PERIOD 15
|
||||
param set FW_PR_FF 0.35
|
||||
param set FW_PR_IMAX 0.2
|
||||
param set FW_PR_P 0.05
|
||||
param set FW_P_LIM_MAX 45
|
||||
param set FW_P_LIM_MIN -45
|
||||
param set FW_P_ROLLFF 1
|
||||
param set FW_P_TC 0.3
|
||||
param set FW_RR_FF 0.3
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.03
|
||||
param set FW_R_LIM 40
|
||||
param set FW_R_RMAX 50
|
||||
param set FW_R_TC 0.3
|
||||
|
||||
# Bottom of bay and nominal zero-pitch attitude differ
|
||||
# the payload bay is pitched up about 7 degrees
|
||||
param set SENS_BOARD_Y_OFF 11.9
|
||||
|
||||
param set FW_L1_PERIOD 20.0
|
||||
fi
|
||||
|
||||
set MIXER phantom
|
||||
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
set PWM_DISARMED 1000
|
||||
@ -14,8 +14,7 @@ then
|
||||
param set FW_AIRSPD_MAX 20
|
||||
param set FW_AIRSPD_MIN 12
|
||||
param set FW_AIRSPD_TRIM 16
|
||||
param set FW_R_TC 0.3
|
||||
param set FW_P_TC 0.3
|
||||
param set FW_ATT_TC 0.3
|
||||
param set FW_L1_DAMPING 0.74
|
||||
param set FW_L1_PERIOD 16
|
||||
param set FW_LND_ANG 15
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Lumenier QAV250
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Mark Whitehorn <kd0aij@gmail.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/4001_quad_x
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.14
|
||||
param set MC_ROLLRATE_I 0.23
|
||||
param set MC_ROLLRATE_D 0.0025
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.235
|
||||
param set MC_PITCHRATE_I 0.17
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_YAW_P 4
|
||||
param set MC_YAWRATE_P 0.3
|
||||
param set MC_YAWRATE_I 0.2
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.5
|
||||
param set PWM_MIN 1075
|
||||
param set MPC_THR_MIN 0.06
|
||||
param set MPC_MANTHR_MIN 0.06
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
param set ATT_BIAS_MAX 0.0
|
||||
fi
|
||||
@ -30,3 +30,9 @@ then
|
||||
# DJI ESCs do not support calibration and need a higher min
|
||||
param set PWM_MIN 1230
|
||||
fi
|
||||
|
||||
# Transitional support: ensure suitable PWM min/max param values
|
||||
if param compare PWM_MIN 1075
|
||||
then
|
||||
param set PWM_MIN 1230
|
||||
fi
|
||||
|
||||
@ -15,14 +15,15 @@ sh /etc/init.d/4001_quad_x
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
# TODO REVIEW
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_P 0.16
|
||||
param set MC_ROLLRATE_I 0.05
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_D 0.01
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_P 0.16
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_D 0.01
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.3
|
||||
param set MC_YAWRATE_I 0.1
|
||||
@ -30,3 +31,9 @@ then
|
||||
# DJI ESCs do not support calibration and need a higher min
|
||||
param set PWM_MIN 1230
|
||||
fi
|
||||
|
||||
# Transitional support: ensure suitable PWM min/max param values
|
||||
if param compare PWM_MIN 1075
|
||||
then
|
||||
param set PWM_MIN 1230
|
||||
fi
|
||||
|
||||
@ -14,11 +14,11 @@ then
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.16
|
||||
param set MC_ROLLRATE_I 0.05
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_D 0.01
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.16
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_D 0.01
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.3
|
||||
param set MC_YAWRATE_I 0.1
|
||||
|
||||
@ -1,88 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name 3DR Solo
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
# tuning
|
||||
param set MC_PITCHRATE_P 0.11
|
||||
param set MC_ROLLRATE_P 0.11
|
||||
param set MPC_MANTHR_MIN 0.08
|
||||
param set MPC_XY_VEL_MAX 3.0
|
||||
param set MPC_Z_VEL_MAX 2.0
|
||||
|
||||
# INAV: higher GPS weights for better altitude control
|
||||
param set INAV_W_Z_BARO 0.3
|
||||
param set INAV_W_Z_GPS_P 0.8
|
||||
param set INAV_W_Z_GPS_V 0.8
|
||||
|
||||
# takeoff, land and RTL settings
|
||||
param set MIS_TAKEOFF_ALT 4.0
|
||||
param set COM_DISARM_LAND 1
|
||||
param set RTL_LAND_DELAY 1
|
||||
param set RTL_DESCEND_ALT 5.0
|
||||
param set RTL_RETURN_ALT 15.0
|
||||
param set MPC_TILTMAX_LND 8.0
|
||||
param set MPC_LAND_SPEED 0.4
|
||||
param set MPC_HOLD_MAX_Z 1.5
|
||||
param set MPC_TKO_JMPSPD 2.0
|
||||
param set MPC_TKO_SPEED 1.5
|
||||
|
||||
# setup
|
||||
# main board rotation: pitch 180
|
||||
param set SENS_BOARD_ROT 12
|
||||
# solo external mag rotation
|
||||
param set CAL_MAG0_ROT 30
|
||||
# no safety switch
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
# battery voltage not available yet
|
||||
param set CBRK_SUPPLY_CHK 894281
|
||||
|
||||
# RC configuration
|
||||
param set RC_MAP_MODE_SW 5
|
||||
param set RC_MAP_PITCH 2
|
||||
param set RC_MAP_ROLL 1
|
||||
param set RC_MAP_THROTTLE 3
|
||||
param set RC_MAP_YAW 4
|
||||
|
||||
param set RC1_DZ 10
|
||||
param set RC1_MAX 1988
|
||||
param set RC1_MIN 1003
|
||||
param set RC1_REV 1
|
||||
param set RC1_TRIM 1499
|
||||
param set RC2_DZ 10
|
||||
param set RC2_MAX 1987
|
||||
param set RC2_MIN 1023
|
||||
param set RC2_REV -1
|
||||
param set RC2_TRIM 1499
|
||||
param set RC3_DZ 10
|
||||
param set RC3_MAX 1877
|
||||
param set RC3_MIN 1023
|
||||
param set RC3_REV 1
|
||||
param set RC3_TRIM 1023
|
||||
param set RC4_DZ 10
|
||||
param set RC4_MAX 1998
|
||||
param set RC4_MIN 1012
|
||||
param set RC4_REV 1
|
||||
param set RC4_TRIM 1500
|
||||
param set RC5_DZ 10
|
||||
param set RC5_MAX 2000
|
||||
param set RC5_MIN 1000
|
||||
param set RC5_REV 1
|
||||
param set RC5_TRIM 1500
|
||||
fi
|
||||
|
||||
set MIXER solo
|
||||
|
||||
set PWM_OUT 1234
|
||||
set MIXER_AUX none
|
||||
|
||||
# enable high-speed link on telem 1
|
||||
set MAVLINK_F "-d /dev/ttyS1 -b 921600 -r 80000 -m onboard -x"
|
||||
@ -1,42 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Reaper 500 Quad
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
# @maintainer Blankered
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.14
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.14
|
||||
param set MC_PITCHRATE_I 0.09
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_YAW_P 4
|
||||
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
fi
|
||||
|
||||
set MIXER quad_h
|
||||
|
||||
set PWM_RATE 50
|
||||
set PWM_OUT 1234
|
||||
set PWM_MIN 1100
|
||||
set PWM_MAX 1900
|
||||
set PWM_DISARMED 1500
|
||||
|
||||
set MIXER_AUX pass
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
set PWM_AUX_DISARMED 950
|
||||
@ -1,45 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic 250 Racer
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Mark Whitehorn <kd0aij@gmail.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/4001_quad_x
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 8.0
|
||||
param set MC_ROLLRATE_P 0.19
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.0055
|
||||
param set MC_PITCH_P 8.0
|
||||
param set MC_PITCHRATE_P 0.24
|
||||
param set MC_PITCHRATE_I 0.1
|
||||
param set MC_PITCHRATE_D 0.0065
|
||||
param set MC_YAW_P 4.0
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_ROLLRATE_MAX 720.0
|
||||
param set MC_PITCHRATE_MAX 720.0
|
||||
param set MC_YAWRATE_MAX 400.0
|
||||
param set MC_ACRO_R_MAX 360.0
|
||||
param set MC_ACRO_P_MAX 360.0
|
||||
|
||||
param set PWM_MIN 1075
|
||||
|
||||
param set MPC_THR_MIN 0.06
|
||||
param set MPC_MANTHR_MIN 0.06
|
||||
|
||||
param set ATT_BIAS_MAX 0.0
|
||||
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
fi
|
||||
@ -1,23 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name DJI Matrice 100
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer James Goppert <james.goppert@gmail.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/4001_quad_x
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLLRATE_P 0.05
|
||||
param set MC_ROLLRATE_D 0.001
|
||||
param set MC_PITCHRATE_P 0.05
|
||||
param set MC_PITCHRATE_D 0.001
|
||||
param set BAT_N_CELLS 6
|
||||
fi
|
||||
19
ROMFS/px4fmu_common/init.d/INACTIVE_13001_caipirinha_vtol
Normal file
19
ROMFS/px4fmu_common/init.d/INACTIVE_13001_caipirinha_vtol
Normal file
@ -0,0 +1,19 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Duorotor Tailsitter
|
||||
#
|
||||
# @type VTOL Tailsitter
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
set MIXER caipirinha_vtol
|
||||
|
||||
set PWM_OUT 12
|
||||
set PWM_MAX 2000
|
||||
set PWM_RATE 400
|
||||
param set VT_MOT_COUNT 2
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
50
ROMFS/px4fmu_common/init.d/INACTIVE_13002_firefly6
Normal file
50
ROMFS/px4fmu_common/init.d/INACTIVE_13002_firefly6
Normal file
@ -0,0 +1,50 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name BirdsEyeView Aerobotics FireFly6
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.17
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.14
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set VT_TILT_MC 0.08
|
||||
param set VT_TILT_TRANS 0.5
|
||||
param set VT_TILT_FW 0.9
|
||||
fi
|
||||
|
||||
set MIXER firefly6
|
||||
set PWM_OUT 12345678
|
||||
|
||||
set MIXER_AUX firefly6
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1000
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
|
||||
set MAV_TYPE 21
|
||||
|
||||
param set VT_MOT_COUNT 6
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 1
|
||||
21
ROMFS/px4fmu_common/init.d/INACTIVE_13003_quad_tailsitter
Normal file
21
ROMFS/px4fmu_common/init.d/INACTIVE_13003_quad_tailsitter
Normal file
@ -0,0 +1,21 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Quadrotor X Tailsitter
|
||||
#
|
||||
# @type VTOL Tailsitter
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
set MIXER quad_x_vtol
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_MAX 2000
|
||||
set PWM_RATE 400
|
||||
set MAV_TYPE 20
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
param set VT_ELEV_MC_LOCK 1
|
||||
21
ROMFS/px4fmu_common/init.d/INACTIVE_13004_quad+_tailsitter
Normal file
21
ROMFS/px4fmu_common/init.d/INACTIVE_13004_quad+_tailsitter
Normal file
@ -0,0 +1,21 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Quadrotor + Tailsitter
|
||||
#
|
||||
# @type VTOL Tailsitter
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
set MIXER quad_+_vtol
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_MAX 2000
|
||||
set PWM_RATE 400
|
||||
set MAV_TYPE 20
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
param set VT_ELEV_MC_LOCK 1
|
||||
50
ROMFS/px4fmu_common/init.d/INACTIVE_13005_vtol_AAERT_quad
Normal file
50
ROMFS/px4fmu_common/init.d/INACTIVE_13005_vtol_AAERT_quad
Normal file
@ -0,0 +1,50 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic AAERT tailplane airframe with Quad VTOL.
|
||||
#
|
||||
# @type Standard VTOL
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_TRANS_THR 0.75
|
||||
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.12
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 12345678
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1000
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
@ -7,16 +7,17 @@ then
|
||||
#
|
||||
# Default parameters for FW
|
||||
#
|
||||
param set RTL_RETURN_ALT 100
|
||||
param set RTL_DESCEND_ALT 100
|
||||
param set RTL_LAND_DELAY -1
|
||||
|
||||
param set NAV_LAND_ALT 90
|
||||
param set NAV_RTL_ALT 100
|
||||
param set NAV_RTL_LAND_T -1
|
||||
param set NAV_ACC_RAD 50
|
||||
|
||||
param set PE_VELNE_NOISE 0.3
|
||||
param set PE_VELD_NOISE 0.35
|
||||
param set PE_POSNE_NOISE 0.5
|
||||
param set PE_POSD_NOISE 1.0
|
||||
param set PE_GBIAS_PNOISE 0.000001
|
||||
param set PE_ABIAS_PNOISE 0.0002
|
||||
fi
|
||||
|
||||
# This is the gimbal pass mixer
|
||||
|
||||
@ -45,10 +45,10 @@ then
|
||||
|
||||
if mixer load $OUTPUT_DEV $MIXER_FILE
|
||||
then
|
||||
echo "INFO [init] Mixer: $MIXER_FILE on $OUTPUT_DEV"
|
||||
echo "[i] Mixer: $MIXER_FILE on $OUTPUT_DEV"
|
||||
else
|
||||
echo "ERROR [init] Error loading mixer: $MIXER_FILE"
|
||||
echo "ERROR:[init] Could not load mixer: $MIXER_FILE" >> $LOG_FILE
|
||||
echo "[i] Error loading mixer: $MIXER_FILE"
|
||||
echo "ERROR: Could not load mixer: $MIXER_FILE" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
|
||||
@ -56,8 +56,8 @@ then
|
||||
else
|
||||
if [ $MIXER != skip ]
|
||||
then
|
||||
echo "ERROR [init] Mixer not defined"
|
||||
echo "ERROR [init] Mixer not defined" >> $LOG_FILE
|
||||
echo "[i] Mixer not defined"
|
||||
echo "ERROR: Mixer not defined" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@ -103,13 +103,7 @@ then
|
||||
set MIXER_AUX none
|
||||
fi
|
||||
|
||||
#MindPX has not aux mixer
|
||||
if ver hwcmp MINDPX_V2
|
||||
then
|
||||
set MIXER_AUX none
|
||||
fi
|
||||
|
||||
if [ $MIXER_AUX != none -a $AUX_MODE != none ]
|
||||
if [ $MIXER_AUX != none ]
|
||||
then
|
||||
#
|
||||
# Load aux mixer
|
||||
@ -129,18 +123,18 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $MIXER_AUX_FILE != none ]
|
||||
if [ $MIXER_AUX_FILE != none -a $FMU_MODE == pwm ]
|
||||
then
|
||||
if fmu mode_$AUX_MODE
|
||||
if fmu mode_pwm
|
||||
then
|
||||
if [ -e $OUTPUT_AUX_DEV ]
|
||||
then
|
||||
if mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE
|
||||
then
|
||||
echo "INFO [init] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
|
||||
echo "[i] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
|
||||
else
|
||||
echo "ERROR [init] Error loading mixer: $MIXER_AUX_FILE"
|
||||
echo "ERROR [init] Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
|
||||
echo "[i] Error loading mixer: $MIXER_AUX_FILE"
|
||||
echo "ERROR: Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
|
||||
fi
|
||||
else
|
||||
set PWM_AUX_OUT none
|
||||
@ -153,7 +147,6 @@ then
|
||||
set FAILSAFE_AUX none
|
||||
fi
|
||||
|
||||
# Set min / max for aux out and rates
|
||||
if [ $PWM_AUX_OUT != none ]
|
||||
then
|
||||
#
|
||||
@ -164,6 +157,13 @@ then
|
||||
pwm rate -c $PWM_AUX_OUT -r $PWM_AUX_RATE -d $OUTPUT_AUX_DEV
|
||||
fi
|
||||
|
||||
#
|
||||
# Set disarmed, min and max PWM_AUX values
|
||||
#
|
||||
if [ $PWM_AUX_DISARMED != none ]
|
||||
then
|
||||
pwm disarmed -c $PWM_AUX_OUT -p $PWM_AUX_DISARMED -d $OUTPUT_AUX_DEV
|
||||
fi
|
||||
if [ $PWM_AUX_MIN != none ]
|
||||
then
|
||||
pwm min -c $PWM_AUX_OUT -p $PWM_AUX_MIN -d $OUTPUT_AUX_DEV
|
||||
@ -174,23 +174,6 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set disarmed values for aux out
|
||||
|
||||
# Transitional support until all configs
|
||||
# are updated
|
||||
if [ $PWM_ACHDIS == none ]
|
||||
then
|
||||
set PWM_ACHDIS ${PWM_AUX_OUT}
|
||||
fi
|
||||
|
||||
#
|
||||
# Set disarmed, min and max PWM_AUX values
|
||||
#
|
||||
if [ $PWM_AUX_DISARMED != none -a $PWM_ACHDIS != none ]
|
||||
then
|
||||
pwm disarmed -c $PWM_ACHDIS -p $PWM_AUX_DISARMED -d $OUTPUT_AUX_DEV
|
||||
fi
|
||||
|
||||
if [ $FAILSAFE_AUX != none ]
|
||||
then
|
||||
pwm failsafe -d $OUTPUT_AUX_DEV $FAILSAFE
|
||||
@ -198,18 +181,5 @@ then
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
unset PWM_OUT
|
||||
unset PWM_RATE
|
||||
unset PWM_ACHDIS
|
||||
unset PWM_MIN
|
||||
unset PWM_MAX
|
||||
unset PWM_AUX_OUT
|
||||
unset PWM_AUX_RATE
|
||||
unset PWM_AUX_DISARMED
|
||||
unset PWM_AUX_MIN
|
||||
unset PWM_AUX_MAX
|
||||
unset FAILSAFE_AUX
|
||||
unset FAILSAFE
|
||||
unset OUTPUT_DEV
|
||||
unset OUTPUT_AUX_DEV
|
||||
|
||||
@ -18,4 +18,6 @@ fi
|
||||
|
||||
if px4io limit $PX4IO_LIMIT
|
||||
then
|
||||
else
|
||||
echo "[i] Set PX4IO update rate to $PX4IO_LIMIT Hz failed!"
|
||||
fi
|
||||
|
||||
18
ROMFS/px4fmu_common/init.d/rc.logging
Normal file
18
ROMFS/px4fmu_common/init.d/rc.logging
Normal file
@ -0,0 +1,18 @@
|
||||
#!nsh
|
||||
#
|
||||
# Initialize logging services.
|
||||
#
|
||||
|
||||
if [ -d /fs/microsd ]
|
||||
then
|
||||
if ver hwcmp PX4FMU_V1
|
||||
then
|
||||
if sdlog2 start -r 40 -a -b 3 -t
|
||||
then
|
||||
fi
|
||||
else
|
||||
if sdlog2 start -r 100 -a -b 12 -t
|
||||
then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -4,31 +4,28 @@
|
||||
# att & pos estimator, att & pos control.
|
||||
#
|
||||
|
||||
|
||||
#---------------------------------------
|
||||
# Estimator group selction
|
||||
#
|
||||
# INAV
|
||||
if param compare SYS_MC_EST_GROUP 0
|
||||
# The system is defaulting to INAV_ENABLED = 1
|
||||
# but users can alternatively try the EKF-based
|
||||
# filter by setting INAV_ENABLED = 0
|
||||
if param compare INAV_ENABLED 1
|
||||
then
|
||||
attitude_estimator_q start
|
||||
# The system is defaulting to EKF_ATT_ENABLED = 1
|
||||
# and uses the older EKF filter. However users can
|
||||
# enable the new quaternion based complimentary
|
||||
# filter by setting EKF_ATT_ENABLED = 0.
|
||||
# Note that on FMUv1, the EKF att estimator is not
|
||||
# available and the Q estimator runs instead.
|
||||
if param compare EKF_ATT_ENABLED 1
|
||||
then
|
||||
attitude_estimator_ekf start
|
||||
else
|
||||
attitude_estimator_q start
|
||||
fi
|
||||
position_estimator_inav start
|
||||
else
|
||||
ekf_att_pos_estimator start
|
||||
fi
|
||||
|
||||
# LPE
|
||||
if param compare SYS_MC_EST_GROUP 1
|
||||
then
|
||||
attitude_estimator_q start
|
||||
local_position_estimator start
|
||||
fi
|
||||
|
||||
# EKF
|
||||
if param compare SYS_MC_EST_GROUP 2
|
||||
then
|
||||
ekf2 start
|
||||
fi
|
||||
#---------------------------------------
|
||||
|
||||
if mc_att_control start
|
||||
then
|
||||
else
|
||||
|
||||
@ -8,6 +8,8 @@ then
|
||||
param set PE_VELD_NOISE 0.35
|
||||
param set PE_POSNE_NOISE 0.5
|
||||
param set PE_POSD_NOISE 1.25
|
||||
param set PE_GBIAS_PNOISE 0.000001
|
||||
param set PE_ABIAS_PNOISE 0.0001
|
||||
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
@ -15,8 +17,20 @@ then
|
||||
param set PWM_DISARMED 900
|
||||
param set PWM_MIN 1075
|
||||
param set PWM_MAX 1950
|
||||
fi
|
||||
|
||||
param set RTL_LAND_DELAY 0
|
||||
# Transitional support: ensure suitable PWM min/max param values
|
||||
if param compare PWM_MIN 1000
|
||||
then
|
||||
param set PWM_MIN 1075
|
||||
fi
|
||||
if param compare PWM_MAX 2000
|
||||
then
|
||||
param set PWM_MAX 1950
|
||||
fi
|
||||
if param compare PWM_DISARMED 0
|
||||
then
|
||||
param set PWM_DISARMED 900
|
||||
fi
|
||||
|
||||
# set environment variables (!= parameters)
|
||||
@ -33,17 +47,3 @@ set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1500
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
|
||||
# Transitional support: ensure suitable PWM min/max param values
|
||||
if param compare PWM_MIN 1000
|
||||
then
|
||||
param set PWM_MIN 1075
|
||||
fi
|
||||
if param compare PWM_MAX 2000
|
||||
then
|
||||
param set PWM_MAX 1950
|
||||
fi
|
||||
if param compare PWM_DISARMED 0
|
||||
then
|
||||
param set PWM_DISARMED 900
|
||||
fi
|
||||
|
||||
@ -1,27 +1,10 @@
|
||||
#!nsh
|
||||
#
|
||||
# Standard startup script for PX4FMU v1, v2, v3, v4 onboard sensor drivers.
|
||||
# Standard startup script for PX4FMU v1, v2, v3 onboard sensor drivers.
|
||||
#
|
||||
|
||||
if ver hwcmp PX4FMU_V1
|
||||
if ms5611 start
|
||||
then
|
||||
if ms5611 start
|
||||
then
|
||||
fi
|
||||
else
|
||||
# Configure all I2C buses to 100 KHz as they
|
||||
# are all external or slow
|
||||
fmu i2c 1 100000
|
||||
fmu i2c 2 100000
|
||||
|
||||
if ms5611 -s start
|
||||
then
|
||||
fi
|
||||
|
||||
# Blacksheep telemetry
|
||||
if bst start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
if adc start
|
||||
@ -35,11 +18,6 @@ then
|
||||
then
|
||||
fi
|
||||
|
||||
# External I2C bus
|
||||
if lis3mdl -X start
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal I2C bus
|
||||
if hmc5883 -C -T -I -R 4 start
|
||||
then
|
||||
@ -74,10 +52,6 @@ then
|
||||
then
|
||||
fi
|
||||
|
||||
if meas_airspeed start -b 2
|
||||
then
|
||||
fi
|
||||
|
||||
else
|
||||
# FMUv2
|
||||
if mpu6000 start
|
||||
@ -92,37 +66,7 @@ then
|
||||
then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
# External I2C bus
|
||||
if hmc5883 -C -T -X start
|
||||
then
|
||||
fi
|
||||
|
||||
if lis3mdl -R 2 start
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal SPI bus is rotated 90 deg yaw
|
||||
if hmc5883 -C -T -S -R 2 start
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
|
||||
if mpu6000 -R 2 -T 20608 start
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal SPI bus mpu9250 is rotated 90 deg yaw
|
||||
if mpu9250 -R 2 start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V1
|
||||
then
|
||||
else
|
||||
# FMUv1
|
||||
if mpu6000 start
|
||||
then
|
||||
@ -154,30 +98,6 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if ver hwcmp MINDPX_V2
|
||||
then
|
||||
if mpu6500 start
|
||||
then
|
||||
fi
|
||||
|
||||
if lsm303d start
|
||||
then
|
||||
fi
|
||||
|
||||
if l3gd20 start
|
||||
then
|
||||
fi
|
||||
|
||||
# External I2C bus
|
||||
if hmc5883 -C -T -X start
|
||||
then
|
||||
fi
|
||||
|
||||
if lis3mdl -R 2 start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
if meas_airspeed start
|
||||
then
|
||||
else
|
||||
@ -190,12 +110,12 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if sf10a start
|
||||
if ll40ls start
|
||||
then
|
||||
fi
|
||||
|
||||
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
|
||||
usleep 20000
|
||||
if sensors start
|
||||
then
|
||||
fi
|
||||
#
|
||||
# Start sensors
|
||||
#
|
||||
sensors start
|
||||
|
||||
|
||||
@ -3,10 +3,26 @@
|
||||
# UAVCAN initialization script.
|
||||
#
|
||||
|
||||
#
|
||||
# Mirriring the UAVCAN_ENABLE param value to an eponymous environment variable.
|
||||
# TODO there should be a smarter way.
|
||||
#
|
||||
set UAVCAN_ENABLE 0
|
||||
if param compare UAVCAN_ENABLE 1
|
||||
then
|
||||
set UAVCAN_ENABLE 1
|
||||
fi
|
||||
if param compare UAVCAN_ENABLE 2
|
||||
then
|
||||
set UAVCAN_ENABLE 2
|
||||
fi
|
||||
|
||||
echo "[i] UAVCAN_ENABLE is $UAVCAN_ENABLE"
|
||||
|
||||
#
|
||||
# Starting stuff according to UAVCAN_ENABLE value
|
||||
#
|
||||
if param greater UAVCAN_ENABLE 0
|
||||
if [ $UAVCAN_ENABLE -ge 1 ]
|
||||
then
|
||||
if uavcan start
|
||||
then
|
||||
@ -17,7 +33,7 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if param greater UAVCAN_ENABLE 1
|
||||
if [ $UAVCAN_ENABLE -ge 2 ]
|
||||
then
|
||||
if uavcan start fw
|
||||
then
|
||||
@ -27,3 +43,10 @@ then
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $UAVCAN_ENABLE -ge 1 ]
|
||||
then
|
||||
# First sensor publisher to initialize takes lowest instance ID
|
||||
# This delay ensures that UAVCAN-interfaced sensors will be allocated on lowest instance IDs
|
||||
sleep 8
|
||||
fi
|
||||
|
||||
@ -3,42 +3,13 @@
|
||||
# Standard apps for vtol:
|
||||
# att & pos estimator, att & pos control.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
#---------------------------------------
|
||||
# Estimator group selction
|
||||
#
|
||||
# INAV
|
||||
if param compare SYS_MC_EST_GROUP 0
|
||||
then
|
||||
attitude_estimator_q start
|
||||
position_estimator_inav start
|
||||
fi
|
||||
|
||||
# LPE
|
||||
if param compare SYS_MC_EST_GROUP 1
|
||||
then
|
||||
attitude_estimator_q start
|
||||
local_position_estimator start
|
||||
fi
|
||||
|
||||
# EKF
|
||||
if param compare SYS_MC_EST_GROUP 2
|
||||
then
|
||||
ekf2 start
|
||||
fi
|
||||
#---------------------------------------
|
||||
|
||||
attitude_estimator_q start
|
||||
#ekf_att_pos_estimator start
|
||||
position_estimator_inav start
|
||||
|
||||
vtol_att_control start
|
||||
mc_att_control start
|
||||
mc_pos_control start
|
||||
fw_att_control start
|
||||
fw_pos_control_l1 start
|
||||
|
||||
#
|
||||
# Start Land Detector
|
||||
# Multicopter for now until we have something for VTOL
|
||||
#
|
||||
land_detector start vtol
|
||||
|
||||
@ -4,46 +4,43 @@ set VEHICLE_TYPE vtol
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
#
|
||||
#Default controller parameters for MC
|
||||
#
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.1
|
||||
param set MC_ROLLRATE_I 0.0
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.2
|
||||
param set MC_PITCHRATE_I 0.0
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_YAW_P 4
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.3
|
||||
|
||||
#
|
||||
# Default parameters for FW
|
||||
#
|
||||
param set FW_PR_FF 0.3
|
||||
param set FW_PR_I 0.000
|
||||
param set FW_PR_IMAX 0.2
|
||||
param set FW_PR_P 0.02
|
||||
param set FW_RR_FF 0.3
|
||||
param set FW_RR_I 0.00
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.02
|
||||
|
||||
param set PE_VELNE_NOISE 0.5
|
||||
param set PE_VELD_NOISE 0.3
|
||||
param set PE_POSNE_NOISE 0.5
|
||||
param set PE_POSD_NOISE 1.25
|
||||
param set PE_GBIAS_PNOISE 0.000001
|
||||
param set PE_ABIAS_PNOISE 0.0001
|
||||
|
||||
#
|
||||
# Default parameters for mission and position handling
|
||||
#
|
||||
param set NAV_ACC_RAD 3
|
||||
param set MPC_TKO_SPEED 1.0
|
||||
param set MPC_LAND_SPEED 0.7
|
||||
param set MPC_Z_VEL_MAX 1.5
|
||||
param set MPC_XY_VEL_MAX 4.0
|
||||
param set MIS_YAW_TMT 10
|
||||
param set MPC_ACC_HOR_MAX 2.0
|
||||
param set RTL_LAND_DELAY 0
|
||||
fi
|
||||
|
||||
# set environment variables (!= parameters)
|
||||
set PWM_RATE 400
|
||||
# tell the mixer to use parameters for these instead
|
||||
set PWM_DISARMED p:PWM_DISARMED
|
||||
set PWM_MIN p:PWM_MIN
|
||||
set PWM_MAX p:PWM_MAX
|
||||
|
||||
# Transitional support: ensure suitable PWM min/max param values
|
||||
if param compare PWM_MIN 1000
|
||||
then
|
||||
param set PWM_MIN 1075
|
||||
fi
|
||||
if param compare PWM_MAX 2000
|
||||
then
|
||||
param set PWM_MAX 1950
|
||||
fi
|
||||
if param compare PWM_DISARMED 0
|
||||
then
|
||||
param set PWM_DISARMED 900
|
||||
fi
|
||||
set PWM_DISARMED 900
|
||||
set PWM_MIN 1000
|
||||
set PWM_MAX 2000
|
||||
|
||||
@ -15,6 +15,8 @@ sercon
|
||||
#
|
||||
set MODE autostart
|
||||
|
||||
set FRC /fs/microsd/etc/rc.txt
|
||||
set FCONFIG /fs/microsd/etc/config.txt
|
||||
set TUNE_ERR ML<<CP4CP4CP4CP4CP4
|
||||
set LOG_FILE /fs/microsd/bootlog.txt
|
||||
|
||||
@ -24,6 +26,7 @@ set LOG_FILE /fs/microsd/bootlog.txt
|
||||
# REBOOTWORK this needs to start after the flight control loop
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
echo "[i] microSD mounted: /fs/microsd"
|
||||
# Start playing the startup tune
|
||||
tone_alarm start
|
||||
else
|
||||
@ -32,9 +35,9 @@ else
|
||||
then
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
echo "INFO [init] MicroSD card formatted"
|
||||
echo "[i] microSD card formatted"
|
||||
else
|
||||
echo "ERROR [init] Format failed"
|
||||
echo "[i] format failed"
|
||||
tone_alarm MNBG
|
||||
set LOG_FILE /dev/null
|
||||
fi
|
||||
@ -47,10 +50,9 @@ fi
|
||||
# Look for an init script on the microSD card.
|
||||
# Disable autostart if the script found.
|
||||
#
|
||||
set FRC /fs/microsd/etc/rc.txt
|
||||
if [ -f $FRC ]
|
||||
then
|
||||
echo "INFO [init] Executing script: $FRC"
|
||||
echo "[i] Executing script: $FRC"
|
||||
sh $FRC
|
||||
set MODE custom
|
||||
fi
|
||||
@ -58,6 +60,9 @@ unset FRC
|
||||
|
||||
if [ $MODE == autostart ]
|
||||
then
|
||||
# Try to get an USB console
|
||||
# REBOOTWORK this needs to start after the flight control loop
|
||||
nshterm /dev/ttyACM0 &
|
||||
|
||||
#
|
||||
# Start the ORB (first app to start)
|
||||
@ -76,7 +81,9 @@ then
|
||||
param select $PARAM_FILE
|
||||
if param load
|
||||
then
|
||||
echo "[param] Loaded: $PARAM_FILE"
|
||||
else
|
||||
echo "[param] FAILED loading $PARAM_FILE"
|
||||
if param reset
|
||||
then
|
||||
fi
|
||||
@ -99,18 +106,6 @@ then
|
||||
#then
|
||||
#fi
|
||||
|
||||
#
|
||||
# Set AUTOCNF flag to use it in AUTOSTART scripts
|
||||
#
|
||||
if param compare SYS_AUTOCONFIG 1
|
||||
then
|
||||
# Wipe out params except RC*
|
||||
param reset_nostart RC*
|
||||
set AUTOCNF yes
|
||||
else
|
||||
set AUTOCNF no
|
||||
fi
|
||||
|
||||
#
|
||||
# Set default values
|
||||
#
|
||||
@ -126,73 +121,59 @@ then
|
||||
set PWM_MAX none
|
||||
set PWM_AUX_OUT none
|
||||
set PWM_AUX_RATE none
|
||||
set PWM_ACHDIS none
|
||||
set PWM_AUX_DISARMED none
|
||||
set PWM_AUX_MIN none
|
||||
set PWM_AUX_MAX none
|
||||
set FAILSAFE_AUX none
|
||||
set MK_MODE none
|
||||
set FMU_MODE pwm
|
||||
set AUX_MODE pwm
|
||||
set MAVLINK_F default
|
||||
set EXIT_ON_END no
|
||||
set MAV_TYPE none
|
||||
set LOAD_DAPPS yes
|
||||
set GPS yes
|
||||
set GPS_FAKE no
|
||||
set FAILSAFE none
|
||||
set USE_IO yes
|
||||
|
||||
#
|
||||
# Set AUTOCNF flag to use it in AUTOSTART scripts
|
||||
#
|
||||
if param compare SYS_AUTOCONFIG 1
|
||||
then
|
||||
# Wipe out params except RC*
|
||||
param reset_nostart RC*
|
||||
set AUTOCNF yes
|
||||
else
|
||||
set AUTOCNF no
|
||||
fi
|
||||
|
||||
#
|
||||
# Set USE_IO flag
|
||||
#
|
||||
if param compare SYS_USE_IO 1
|
||||
then
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
set USE_IO no
|
||||
fi
|
||||
|
||||
if ver hwcmp MINDPX_V2
|
||||
then
|
||||
set USE_IO no
|
||||
fi
|
||||
set USE_IO yes
|
||||
else
|
||||
set USE_IO no
|
||||
fi
|
||||
|
||||
# should set to 0.8 for mindpx-v2 borad.
|
||||
if param compare INAV_LIDAR_ERR 0.5
|
||||
then
|
||||
if ver hwcmp MINDPX_V2
|
||||
then
|
||||
param set INAV_LIDAR_ERR 0.8
|
||||
param save
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Set parameters and env variables for selected AUTOSTART
|
||||
#
|
||||
if param compare SYS_AUTOSTART 0
|
||||
then
|
||||
echo "INFO [init] No autostart"
|
||||
echo "[i] No autostart"
|
||||
else
|
||||
sh /etc/init.d/rc.autostart
|
||||
fi
|
||||
unset MODE
|
||||
|
||||
#
|
||||
# Wipe incompatible settings for boards not having two outputs
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
set MIXER_AUX none
|
||||
fi
|
||||
|
||||
#
|
||||
# Override parameters from user configuration file
|
||||
#
|
||||
set FCONFIG /fs/microsd/etc/config.txt
|
||||
if [ -f $FCONFIG ]
|
||||
then
|
||||
echo "INFO [init] Custom: $FCONFIG"
|
||||
echo "[i] Custom config: $FCONFIG"
|
||||
sh $FCONFIG
|
||||
fi
|
||||
unset FCONFIG
|
||||
@ -214,19 +195,21 @@ then
|
||||
#
|
||||
# Check if PX4IO present and update firmware if needed
|
||||
#
|
||||
if [ -f /etc/extras/px4io-v2.bin ]
|
||||
if [ -f /etc/extras/px4io-v2_default.bin ]
|
||||
then
|
||||
set IO_FILE /etc/extras/px4io-v2.bin
|
||||
set IO_FILE /etc/extras/px4io-v2_default.bin
|
||||
else
|
||||
set IO_FILE /etc/extras/px4io-v1.bin
|
||||
set IO_FILE /etc/extras/px4io-v1_default.bin
|
||||
fi
|
||||
|
||||
if px4io checkcrc ${IO_FILE}
|
||||
then
|
||||
echo "INFO [init] PX4IO CRC OK" >> $LOG_FILE
|
||||
echo "PX4IO CRC OK" >> $LOG_FILE
|
||||
|
||||
set IO_PRESENT yes
|
||||
else
|
||||
echo "PX4IO Trying to update" >> $LOG_FILE
|
||||
|
||||
tone_alarm MLL32CP8MB
|
||||
|
||||
if px4io start
|
||||
@ -246,16 +229,16 @@ then
|
||||
usleep 500000
|
||||
if px4io checkcrc $IO_FILE
|
||||
then
|
||||
echo "INFO [init] PX4IO CRC OK after updating" >> $LOG_FILE
|
||||
echo "PX4IO CRC OK after updating" >> $LOG_FILE
|
||||
tone_alarm MLL8CDE
|
||||
|
||||
set IO_PRESENT yes
|
||||
else
|
||||
echo "ERROR [init] PX4IO update failed" >> $LOG_FILE
|
||||
echo "ERROR: PX4IO update failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
else
|
||||
echo "ERROR [init] PX4IO update failed" >> $LOG_FILE
|
||||
echo "ERROR: PX4IO update failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@ -263,7 +246,8 @@ then
|
||||
|
||||
if [ $IO_PRESENT == no ]
|
||||
then
|
||||
echo "ERROR [init] PX4IO not found" >> $LOG_FILE
|
||||
echo "[i] ERROR: PX4IO not found"
|
||||
echo "ERROR: PX4IO not found" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@ -285,6 +269,7 @@ then
|
||||
then
|
||||
# Need IO for output but it not present, disable output
|
||||
set OUTPUT_MODE none
|
||||
echo "[i] ERROR: PX4IO not found, disabling output"
|
||||
|
||||
# Avoid using ttyS0 for MAVLink on FMUv1
|
||||
if ver hwcmp PX4FMU_V1
|
||||
@ -301,15 +286,13 @@ then
|
||||
if [ $HIL == yes ]
|
||||
then
|
||||
set OUTPUT_MODE hil
|
||||
set GPS no
|
||||
if ver hwcmp PX4FMU_V1
|
||||
then
|
||||
set FMU_MODE serial
|
||||
fi
|
||||
unset HIL
|
||||
else
|
||||
unset HIL
|
||||
gps start
|
||||
fi
|
||||
unset HIL
|
||||
|
||||
# waypoint storage
|
||||
# REBOOTWORK this needs to start in parallel
|
||||
@ -317,37 +300,37 @@ then
|
||||
then
|
||||
fi
|
||||
|
||||
#
|
||||
# UAVCAN
|
||||
#
|
||||
sh /etc/init.d/rc.uavcan
|
||||
|
||||
#
|
||||
# Sensors System (start before Commander so Preflight checks are properly run)
|
||||
#
|
||||
sh /etc/init.d/rc.sensors
|
||||
|
||||
if [ $GPS == yes ]
|
||||
then
|
||||
if [ $GPS_FAKE == yes ]
|
||||
then
|
||||
echo "[i] Faking GPS"
|
||||
gps start -f
|
||||
else
|
||||
gps start
|
||||
fi
|
||||
fi
|
||||
unset GPS
|
||||
unset GPS_FAKE
|
||||
|
||||
# Needs to be this early for in-air-restarts
|
||||
if [ $OUTPUT_MODE == hil ]
|
||||
then
|
||||
commander start -hil
|
||||
else
|
||||
commander start
|
||||
fi
|
||||
|
||||
#
|
||||
# Start CPU load monitor
|
||||
#
|
||||
load_mon start
|
||||
commander start
|
||||
|
||||
#
|
||||
# Start primary output
|
||||
#
|
||||
set TTYS1_BUSY no
|
||||
|
||||
#
|
||||
# Check if UAVCAN is enabled, default to it for ESCs
|
||||
#
|
||||
if param greater UAVCAN_ENABLE 2
|
||||
then
|
||||
set OUTPUT_MODE uavcan_esc
|
||||
fi
|
||||
|
||||
# If OUTPUT_MODE == none then something is wrong with setup and we shouldn't try to enable output
|
||||
if [ $OUTPUT_MODE != none ]
|
||||
then
|
||||
@ -355,7 +338,7 @@ then
|
||||
then
|
||||
if param compare UAVCAN_ENABLE 0
|
||||
then
|
||||
echo "INFO [init] OVERRIDING UAVCAN_ENABLE = 1" >> $LOG_FILE
|
||||
echo "[i] OVERRIDING UAVCAN_ENABLE = 1"
|
||||
param set UAVCAN_ENABLE 1
|
||||
fi
|
||||
fi
|
||||
@ -366,7 +349,7 @@ then
|
||||
then
|
||||
sh /etc/init.d/rc.io
|
||||
else
|
||||
echo "INFO [init] PX4IO start failed" >> $LOG_FILE
|
||||
echo "ERROR: PX4IO start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@ -375,8 +358,10 @@ then
|
||||
then
|
||||
if fmu mode_$FMU_MODE
|
||||
then
|
||||
echo "[i] FMU mode_$FMU_MODE started"
|
||||
else
|
||||
echo "ERR [init] FMU start failed" >> $LOG_FILE
|
||||
echo "[i] ERROR: FMU mode_$FMU_MODE start failed"
|
||||
echo "ERROR: FMU start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
|
||||
@ -407,8 +392,10 @@ then
|
||||
|
||||
if mkblctrl $MKBLCTRL_ARG
|
||||
then
|
||||
echo "[i] MK started"
|
||||
else
|
||||
echo "ERROR [init] MK start failed" >> $LOG_FILE
|
||||
echo "[i] ERROR: MK start failed"
|
||||
echo "ERROR: MK start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
unset MKBLCTRL_ARG
|
||||
@ -417,10 +404,12 @@ then
|
||||
|
||||
if [ $OUTPUT_MODE == hil ]
|
||||
then
|
||||
if pwm_out_sim mode_port2_pwm8
|
||||
if hil mode_port2_pwm8
|
||||
then
|
||||
echo "[i] HIL output started"
|
||||
else
|
||||
echo "ERROR [init] PWM SIM start failed" >> $LOG_FILE
|
||||
echo "[i] ERROR: HIL output start failed"
|
||||
echo "ERROR: HIL output start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@ -434,9 +423,11 @@ then
|
||||
then
|
||||
if px4io start
|
||||
then
|
||||
echo "[i] PX4IO started"
|
||||
sh /etc/init.d/rc.io
|
||||
else
|
||||
echo "ERROR [init] PX4IO start failed" >> $LOG_FILE
|
||||
echo "[i] ERROR: PX4IO start failed"
|
||||
echo "ERROR: PX4IO start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@ -445,8 +436,10 @@ then
|
||||
then
|
||||
if fmu mode_$FMU_MODE
|
||||
then
|
||||
echo "[i] FMU mode_$FMU_MODE started"
|
||||
else
|
||||
echo "ERROR [init] FMU mode_$FMU_MODE start failed" >> $LOG_FILE
|
||||
echo "[i] ERROR: FMU mode_$FMU_MODE start failed"
|
||||
echo "ERROR: FMU mode_$FMU_MODE start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
|
||||
@ -476,14 +469,8 @@ then
|
||||
# Exit from nsh to free port for mavlink
|
||||
set EXIT_ON_END yes
|
||||
else
|
||||
# Start MAVLink on default port: ttyS1
|
||||
set MAVLINK_F "-r 1200"
|
||||
# Avoid using ttyS1 for MAVLink on FMUv4
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
set MAVLINK_F "-r 1200 -d /dev/ttyS1"
|
||||
# Start MAVLink on Wifi (ESP8266 port)
|
||||
mavlink start -r 20000 -m config -b 921600 -d /dev/ttyS0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -493,15 +480,10 @@ then
|
||||
#
|
||||
# MAVLink onboard / TELEM2
|
||||
#
|
||||
if ver hwcmp PX4FMU_V1
|
||||
if ver hwcmp PX4FMU_V2
|
||||
then
|
||||
else
|
||||
# XXX We need a better way for runtime eval of shell variables,
|
||||
# but this works for now
|
||||
if param compare SYS_COMPANION 10
|
||||
then
|
||||
frsky_telemetry start -d /dev/ttyS2
|
||||
fi
|
||||
if param compare SYS_COMPANION 921600
|
||||
then
|
||||
mavlink start -d /dev/ttyS2 -b 921600 -m onboard -r 80000 -x
|
||||
@ -514,136 +496,12 @@ then
|
||||
then
|
||||
mavlink start -d /dev/ttyS2 -b 57600 -m osd -r 1000
|
||||
fi
|
||||
if param compare SYS_COMPANION 257600
|
||||
then
|
||||
mavlink start -d /dev/ttyS2 -b 57600 -m magic -r 5000 -x
|
||||
fi
|
||||
if param compare SYS_COMPANION 357600
|
||||
then
|
||||
mavlink start -d /dev/ttyS2 -b 57600 -r 1000
|
||||
fi
|
||||
if param compare SYS_COMPANION 1921600
|
||||
then
|
||||
mavlink start -d /dev/ttyS2 -b 921600 -r 20000
|
||||
fi
|
||||
# Sensors on the PWM interface bank
|
||||
# clear pins 5 and 6
|
||||
if param compare SENS_EN_LL40LS 1
|
||||
then
|
||||
set AUX_MODE pwm4
|
||||
fi
|
||||
if param greater TRIG_MODE 0
|
||||
then
|
||||
# Get FMU driver out of the way
|
||||
set MIXER_AUX none
|
||||
set AUX_MODE none
|
||||
camera_trigger start
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Starting stuff according to UAVCAN_ENABLE value
|
||||
#
|
||||
if param greater UAVCAN_ENABLE 0
|
||||
then
|
||||
if uavcan start
|
||||
then
|
||||
else
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
|
||||
if param greater UAVCAN_ENABLE 1
|
||||
then
|
||||
if uavcan start fw
|
||||
then
|
||||
else
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Optional drivers
|
||||
#
|
||||
|
||||
# Sensors on the PWM interface bank
|
||||
if param compare SENS_EN_LL40LS 1
|
||||
then
|
||||
if pwm_input start
|
||||
then
|
||||
if ll40ls start pwm
|
||||
then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# sf0x lidar sensor
|
||||
if param compare SENS_EN_SF0X 1
|
||||
then
|
||||
sf0x start
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
frsky_telemetry start -d /dev/ttyS6
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V2
|
||||
then
|
||||
# Check for flow sensor - as it is a background task, launch it last
|
||||
px4flow start &
|
||||
fi
|
||||
|
||||
if ver hwcmp MINDPX_V2
|
||||
then
|
||||
#mindxp also need flow
|
||||
px4flow start &
|
||||
fi
|
||||
|
||||
# Start USB shell if no microSD present, MAVLink else
|
||||
if [ $LOG_FILE == /dev/null ]
|
||||
then
|
||||
# Try to get an USB console
|
||||
nshterm /dev/ttyACM0 &
|
||||
else
|
||||
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
|
||||
fi
|
||||
|
||||
#
|
||||
# Logging
|
||||
#
|
||||
if ver hwcmp PX4FMU_V1
|
||||
then
|
||||
if sdlog2 start -r 30 -a -b 2 -t
|
||||
then
|
||||
fi
|
||||
else
|
||||
# check if we should increase logging rate for ekf2 replay message logging
|
||||
if param greater EKF2_REC_RPL 0
|
||||
then
|
||||
if param compare SYS_LOGGER 0
|
||||
then
|
||||
if sdlog2 start -r 500 -e -b 18 -t
|
||||
then
|
||||
fi
|
||||
else
|
||||
if logger start -r 500
|
||||
then
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if param compare SYS_LOGGER 0
|
||||
then
|
||||
if sdlog2 start -r 100 -a -b 9 -t
|
||||
then
|
||||
fi
|
||||
else
|
||||
if logger start -b 12
|
||||
then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
sh /etc/init.d/rc.logging
|
||||
|
||||
#
|
||||
# Start up ARDrone Motor interface
|
||||
@ -658,7 +516,7 @@ then
|
||||
#
|
||||
if [ $VEHICLE_TYPE == fw ]
|
||||
then
|
||||
echo "INFO [init] Fixedwing"
|
||||
echo "[i] FIXED WING"
|
||||
|
||||
if [ $MIXER == none ]
|
||||
then
|
||||
@ -678,7 +536,10 @@ then
|
||||
sh /etc/init.d/rc.interface
|
||||
|
||||
# Start standard fixedwing apps
|
||||
sh /etc/init.d/rc.fw_apps
|
||||
if [ $LOAD_DAPPS == yes ]
|
||||
then
|
||||
sh /etc/init.d/rc.fw_apps
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
@ -686,11 +547,11 @@ then
|
||||
#
|
||||
if [ $VEHICLE_TYPE == mc ]
|
||||
then
|
||||
echo "INFO [init] Multicopter"
|
||||
echo "[i] MULTICOPTER"
|
||||
|
||||
if [ $MIXER == none ]
|
||||
then
|
||||
echo "INFO [init] Mixer undefined"
|
||||
echo "Mixer undefined"
|
||||
fi
|
||||
|
||||
if [ $MAV_TYPE == none ]
|
||||
@ -704,10 +565,6 @@ then
|
||||
then
|
||||
set MAV_TYPE 2
|
||||
fi
|
||||
if [ $MIXER == quad_h ]
|
||||
then
|
||||
set MAV_TYPE 2
|
||||
fi
|
||||
if [ $MIXER == tri_y_yaw- -o $MIXER == tri_y_yaw+ ]
|
||||
then
|
||||
set MAV_TYPE 15
|
||||
@ -724,20 +581,16 @@ then
|
||||
then
|
||||
set MAV_TYPE 14
|
||||
fi
|
||||
if [ $MIXER == octo_cox -o $MIXER == octo_cox_w ]
|
||||
if [ $MIXER == octo_cox ]
|
||||
then
|
||||
set MAV_TYPE 14
|
||||
fi
|
||||
if [ $MIXER == coax ]
|
||||
then
|
||||
set MAV_TYPE 3
|
||||
fi
|
||||
fi
|
||||
|
||||
# Still no MAV_TYPE found
|
||||
if [ $MAV_TYPE == none ]
|
||||
then
|
||||
echo "WARN [init] Unknown MAV_TYPE"
|
||||
echo "Unknown MAV_TYPE"
|
||||
param set MAV_TYPE 2
|
||||
else
|
||||
param set MAV_TYPE $MAV_TYPE
|
||||
@ -747,7 +600,10 @@ then
|
||||
sh /etc/init.d/rc.interface
|
||||
|
||||
# Start standard multicopter apps
|
||||
sh /etc/init.d/rc.mc_apps
|
||||
if [ $LOAD_DAPPS == yes ]
|
||||
then
|
||||
sh /etc/init.d/rc.mc_apps
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
@ -755,11 +611,11 @@ then
|
||||
#
|
||||
if [ $VEHICLE_TYPE == vtol ]
|
||||
then
|
||||
echo "INFO [init] VTOL"
|
||||
echo "[init] Vehicle type: VTOL"
|
||||
|
||||
if [ $MIXER == none ]
|
||||
then
|
||||
echo "WARN [init] VTOL mixer undefined"
|
||||
echo "Default mixer for vtol not defined"
|
||||
fi
|
||||
|
||||
if [ $MAV_TYPE == none ]
|
||||
@ -782,7 +638,7 @@ then
|
||||
# Still no MAV_TYPE found
|
||||
if [ $MAV_TYPE == none ]
|
||||
then
|
||||
echo "WARN [init] Unknown MAV_TYPE"
|
||||
echo "Unknown MAV_TYPE"
|
||||
param set MAV_TYPE 19
|
||||
else
|
||||
param set MAV_TYPE $MAV_TYPE
|
||||
@ -792,7 +648,10 @@ then
|
||||
sh /etc/init.d/rc.interface
|
||||
|
||||
# Start standard vtol apps
|
||||
sh /etc/init.d/rc.vtol_apps
|
||||
if [ $LOAD_DAPPS == yes ]
|
||||
then
|
||||
sh /etc/init.d/rc.vtol_apps
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
@ -807,51 +666,14 @@ then
|
||||
sh /etc/init.d/rc.interface
|
||||
|
||||
# Start standard rover apps
|
||||
sh /etc/init.d/rc.axialracing_ax10_apps
|
||||
if [ $LOAD_DAPPS == yes ]
|
||||
then
|
||||
sh /etc/init.d/rc.axialracing_ax10_apps
|
||||
fi
|
||||
|
||||
param set MAV_TYPE 10
|
||||
fi
|
||||
|
||||
#
|
||||
# For snapdragon, we need a passthrough mode
|
||||
# Do not run any mavlink instances since we need the serial port for
|
||||
# communication with Snapdragon.
|
||||
#
|
||||
if [ $VEHICLE_TYPE == passthrough ]
|
||||
then
|
||||
mavlink stop-all
|
||||
commander stop
|
||||
|
||||
# Stop multicopter attitude controller if it is running, the controls come
|
||||
# from Snapdragon.
|
||||
if mc_att_control stop
|
||||
then
|
||||
fi
|
||||
|
||||
# Start snapdragon interface on serial port.
|
||||
if ver hwcmp PX4FMU_V2
|
||||
then
|
||||
# On Pixfalcon use the standard telemetry port (Telem 1).
|
||||
snapdragon_rc_pwm start -d /dev/ttyS1
|
||||
px4io start
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
# On Pixracer use Telem 2 port (TL2).
|
||||
snapdragon_rc_pwm start -d /dev/ttyS2
|
||||
fmu mode_pwm4
|
||||
fi
|
||||
|
||||
pwm failsafe -c 1234 -p 900
|
||||
pwm disarmed -c 1234 -p 900
|
||||
|
||||
# Arm straightaway.
|
||||
pwm arm
|
||||
# Use 400 Hz PWM on all channels.
|
||||
pwm rate -a -r 400
|
||||
fi
|
||||
|
||||
unset MIXER
|
||||
unset MAV_TYPE
|
||||
unset OUTPUT_MODE
|
||||
@ -866,14 +688,15 @@ then
|
||||
#
|
||||
if [ $VEHICLE_TYPE == none ]
|
||||
then
|
||||
echo "WARN [init] No autostart ID found"
|
||||
echo "[i] No autostart ID found"
|
||||
|
||||
fi
|
||||
|
||||
# Start any custom addons
|
||||
set FEXTRAS /fs/microsd/etc/extras.txt
|
||||
if [ -f $FEXTRAS ]
|
||||
then
|
||||
echo "INFO [init] Addons script: $FEXTRAS"
|
||||
echo "[i] Addons script: $FEXTRAS"
|
||||
sh $FEXTRAS
|
||||
fi
|
||||
unset FEXTRAS
|
||||
@ -881,6 +704,7 @@ then
|
||||
# Run no SD alarm
|
||||
if [ $LOG_FILE == /dev/null ]
|
||||
then
|
||||
echo "[i] No microSD card found"
|
||||
# Play SOS
|
||||
tone_alarm error
|
||||
fi
|
||||
@ -895,9 +719,15 @@ unset TUNE_ERR
|
||||
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
|
||||
mavlink boot_complete
|
||||
|
||||
if ver hwcmp PX4FMU_V2
|
||||
then
|
||||
# Check for flow sensor - as it is a background task, launch it last
|
||||
px4flow start &
|
||||
fi
|
||||
|
||||
if [ $EXIT_ON_END == yes ]
|
||||
then
|
||||
echo "INFO [init] NSH exit"
|
||||
echo "Exit from nsh"
|
||||
exit
|
||||
fi
|
||||
unset EXIT_ON_END
|
||||
|
||||
@ -1,96 +0,0 @@
|
||||
Aileron/rudder/elevator/throttle/wheel/flaps mixer for PX4FMU
|
||||
=======================================================
|
||||
|
||||
This file defines mixers suitable for controlling a fixed wing aircraft with
|
||||
aileron, rudder, elevator, throttle and steerable wheel controls using PX4FMU.
|
||||
The configuration assumes the aileron servo(s) are connected to PX4FMU servo
|
||||
output 0 and 1, the elevator to output 2, the rudder to output 3, the throttle
|
||||
to output 4 and the wheel to output 5.
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch), 2 (yaw) and 3 (thrust) 4 (flaps) 6 (flaperon).
|
||||
|
||||
Aileron mixer (roll + flaperon)
|
||||
---------------------------------
|
||||
|
||||
This mixer assumes that the aileron servos are set up correctly mechanically;
|
||||
depending on the actual configuration it may be necessary to reverse the scaling
|
||||
factors (to reverse the servo movement) and adjust the offset, scaling and
|
||||
endpoints to suit.
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 10000 10000 0 -10000 10000
|
||||
S: 0 6 -10000 -10000 0 -10000 10000
|
||||
|
||||
Elevator mixer
|
||||
------------
|
||||
Two scalers total (output, roll).
|
||||
|
||||
This mixer assumes that the elevator servo is set up correctly mechanically;
|
||||
depending on the actual configuration it may be necessary to reverse the scaling
|
||||
factors (to reverse the servo movement) and adjust the offset, scaling and
|
||||
endpoints to suit.
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 1 -10000 -10000 0 -10000 10000
|
||||
|
||||
Rudder mixer
|
||||
------------
|
||||
Two scalers total (output, yaw).
|
||||
|
||||
This mixer assumes that the rudder servo is set up correctly mechanically;
|
||||
depending on the actual configuration it may be necessary to reverse the scaling
|
||||
factors (to reverse the servo movement) and adjust the offset, scaling and
|
||||
endpoints to suit.
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
Motor speed mixer
|
||||
-----------------
|
||||
Two scalers total (output, thrust).
|
||||
|
||||
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
|
||||
range. Inputs below zero are treated as zero.
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
Wheel mixer
|
||||
------------
|
||||
Two scalers total (output, yaw).
|
||||
|
||||
This mixer assumes that the wheel servo is set up correctly mechanically;
|
||||
depending on the actual configuration it may be necessary to reverse the scaling
|
||||
factors (to reverse the servo movement) and adjust the offset, scaling and
|
||||
endpoints to suit.
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
Flaps / gimbal / payload mixer for last three channels,
|
||||
using the payload control group
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 0 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 2 10000 10000 0 -10000 10000
|
||||
@ -1,84 +0,0 @@
|
||||
Aileron/v-tail/throttle/wheel/flaps mixer for PX4FMU
|
||||
=======================================================
|
||||
|
||||
This file defines mixers suitable for controlling a fixed wing aircraft with
|
||||
aileron, v-tail (rudder, elevator), throttle, steerable wheel and flaps
|
||||
using PX4FMU.
|
||||
The configuration assumes the aileron servos are connected to PX4FMU servo
|
||||
output 0 and 1, the tail servos to output 2 and 3, the throttle
|
||||
to output 4, the wheel to output 5 and the flaps to output 6 and 7.
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch), 2 (yaw) and 3 (thrust) 4 (flaps) 6 (flaperon).
|
||||
|
||||
Aileron mixer (roll + flaperon)
|
||||
---------------------------------
|
||||
|
||||
This mixer assumes that the aileron servos are set up correctly mechanically;
|
||||
depending on the actual configuration it may be necessary to reverse the scaling
|
||||
factors (to reverse the servo movement) and adjust the offset, scaling and
|
||||
endpoints to suit.
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 10000 10000 0 -10000 10000
|
||||
S: 0 6 -10000 -10000 0 -10000 10000
|
||||
|
||||
V-tail mixers
|
||||
-------------
|
||||
Three scalers total (output, roll, pitch).
|
||||
|
||||
On the assumption that the two tail servos are physically reversed, the pitch
|
||||
input is inverted between the two servos.
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 -7000 -7000 0 -10000 10000
|
||||
S: 0 1 -8000 -8000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 -7000 -7000 0 -10000 10000
|
||||
S: 0 1 8000 8000 0 -10000 10000
|
||||
|
||||
Motor speed mixer
|
||||
-----------------
|
||||
Two scalers total (output, thrust).
|
||||
|
||||
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
|
||||
range. Inputs below zero are treated as zero.
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
Wheel mixer
|
||||
------------
|
||||
Two scalers total (output, yaw).
|
||||
|
||||
This mixer assumes that the wheel servo is set up correctly mechanically;
|
||||
depending on the actual configuration it may be necessary to reverse the scaling
|
||||
factors (to reverse the servo movement) and adjust the offset, scaling and
|
||||
endpoints to suit.
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 -10000 -10000 0 -10000 10000
|
||||
|
||||
Flaps mixer
|
||||
------------
|
||||
Flap servos are physically reversed.
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 0 5000 -10000 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 0 -5000 10000 -10000 10000
|
||||
|
||||
@ -62,3 +62,24 @@ range. Inputs below zero are treated as zero.
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
|
||||
Gimbal / flaps / payload mixer for last four channels,
|
||||
using the payload control group
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 0 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 1 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 2 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 3 10000 10000 0 -10000 10000
|
||||
|
||||
@ -58,3 +58,23 @@ range. Inputs below zero are treated as zero.
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
|
||||
Gimbal / flaps / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
@ -62,3 +62,23 @@ endpoints to suit.
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
Gimbal / flaps / payload mixer for last four channels,
|
||||
using the payload control group
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 0 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 1 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 2 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 2 3 10000 10000 0 -10000 10000
|
||||
|
||||
0
ROMFS/px4fmu_common/mixers/FX79.main.mix
Normal file → Executable file
0
ROMFS/px4fmu_common/mixers/FX79.main.mix
Normal file → Executable file
@ -49,3 +49,22 @@ range. Inputs below zero are treated as zero.
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
Gimbal / flaps / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
@ -34,7 +34,7 @@ collection of mixers in order to achieve a specific pattern of actuator outputs.
|
||||
|
||||
The null mixer definition has the form:
|
||||
|
||||
Z:
|
||||
Z:
|
||||
|
||||
#### Simple Mixer ####
|
||||
|
||||
@ -44,8 +44,8 @@ applying an output scaler.
|
||||
|
||||
A simple mixer definition begins with:
|
||||
|
||||
M: <control count>
|
||||
O: <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
|
||||
M: <control count>
|
||||
O: <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
|
||||
|
||||
If <control count> is zero, the sum is effectively zero and the mixer will
|
||||
output a fixed value that is <offset> constrained by <lower limit> and <upper
|
||||
@ -59,7 +59,7 @@ offset of -0.5 is encoded as -5000.
|
||||
The definition continues with <control count> entries describing the control
|
||||
inputs and their scaling, in the form:
|
||||
|
||||
S: <group> <index> <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
|
||||
S: <group> <index> <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
|
||||
|
||||
The <group> value identifies the control group from which the scaler will read,
|
||||
and the <index> value an offset within that group. These values are specific to
|
||||
@ -81,16 +81,16 @@ into a set of actuator outputs intended to drive motor speed controllers.
|
||||
|
||||
The mixer definition is a single line of the form:
|
||||
|
||||
R: <geometry> <roll scale> <pitch scale> <yaw scale> <deadband>
|
||||
R: <geometry> <roll scale> <pitch scale> <yaw scale> <deadband>
|
||||
|
||||
The supported geometries include:
|
||||
|
||||
* 4x - quadrotor in X configuration
|
||||
* 4+ - quadrotor in + configuration
|
||||
* 6x - hexcopter in X configuration
|
||||
* 6+ - hexcopter in + configuration
|
||||
* 8x - octocopter in X configuration
|
||||
* 8+ - octocopter in + configuration
|
||||
4x - quadrotor in X configuration
|
||||
4+ - quadrotor in + configuration
|
||||
6x - hexcopter in X configuration
|
||||
6+ - hexcopter in + configuration
|
||||
8x - octocopter in X configuration
|
||||
8+ - octocopter in + configuration
|
||||
|
||||
Each of the roll, pitch and yaw scale values determine scaling of the roll,
|
||||
pitch and yaw controls relative to the thrust control. Whilst the calculations
|
||||
@ -102,4 +102,4 @@ thrust input ranges from 0.0 to 1.0. Output for each actuator is in the
|
||||
range -1.0 to 1.0.
|
||||
|
||||
In the case where an actuator saturates, all actuator values are rescaled so that
|
||||
the saturating actuator is limited to 1.0.
|
||||
the saturating actuator is limited to 1.0.
|
||||
@ -51,3 +51,23 @@ range. Inputs below zero are treated as zero.
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
|
||||
Gimbal / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
0
ROMFS/px4fmu_common/mixers/Viper.main.mix
Normal file → Executable file
0
ROMFS/px4fmu_common/mixers/Viper.main.mix
Normal file → Executable file
@ -47,3 +47,22 @@ range. Inputs below zero are treated as zero.
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
Gimbal / flaps / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
@ -1,39 +1,16 @@
|
||||
Caipirinha tailsitter mixer
|
||||
============================
|
||||
|
||||
This file defines a mixer for the TBS Caipirinha tailsitter edition. This vehicle
|
||||
has two motors in total, one attached to each wing. It also has two elevons which
|
||||
are located in the slipstream of the propellers. This mixer generates 4 PWM outputs
|
||||
on the main PWM ouput port, two at 400Hz for the motors, and two at 50Hz for the
|
||||
elevon servos. Channels 1-4 are configured to run at 400Hz, while channels 5-8 run
|
||||
at the default rate of 50Hz. Note that channels 3 and 4 are assigned but not used.
|
||||
|
||||
Motor mixer
|
||||
------------
|
||||
Channel 1 connects to the right (starboard) motor.
|
||||
Channel 2 connects to the left (port) motor.
|
||||
|
||||
#!nsh
|
||||
# Caipirinha vtol mixer for PX4FMU
|
||||
#
|
||||
#===========================
|
||||
R: 2- 10000 10000 10000 0
|
||||
|
||||
Zero mixer (2x)
|
||||
---------------
|
||||
Channels 3,4 are unused.
|
||||
|
||||
Z:
|
||||
|
||||
Z:
|
||||
|
||||
Elevons mixer
|
||||
--------------
|
||||
Channel 5 connects to the right (starboard) elevon.
|
||||
Channel 6 connects to the left (port) elevon.
|
||||
#mixer for the elevons
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 10000 10000 0 -10000 10000
|
||||
S: 1 1 10000 10000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 7500 7500 0 -10000 10000
|
||||
S: 1 0 -10000 -10000 0 -10000 10000
|
||||
S: 1 1 10000 10000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 7500 7500 0 -10000 10000
|
||||
S: 1 0 -10000 -10000 0 -10000 10000
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 10000 10000 0 -10000 10000
|
||||
S: 1 1 -10000 -10000 0 -10000 10000
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
Coaxial helicopter mixer
|
||||
- Two servomotors act on the swashplate (90° angle on the swashplate, decoupled effect on roll and pitch).
|
||||
- No collective pitch.
|
||||
- One motor per rotor.
|
||||
===========================
|
||||
|
||||
Left swashplate servomotor, pitch axis
|
||||
-------------
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 1 -10000 -10000 0 -10000 10000
|
||||
|
||||
Right swashplate servomotor, roll axis
|
||||
-------------
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 10000 10000 0 -10000 10000
|
||||
|
||||
Upper rotor (CCW)
|
||||
Mixing between yaw and thrust
|
||||
-------------
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
Lower rotor (CW)
|
||||
Mixing between yaw and thrust
|
||||
-------------
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 -10000 -10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
@ -47,3 +47,24 @@ range. Inputs below zero are treated as zero.
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
|
||||
Gimbal / flaps / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
# Octo coaxial with wide arms
|
||||
|
||||
R: 8cw 10000 10000 10000 0
|
||||
@ -46,3 +46,22 @@ range. Inputs below zero are treated as zero.
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
Gimbal / flaps / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
Mixer for SITL plane, using the VTOL airframe for now
|
||||
=========================================================
|
||||
|
||||
Z:
|
||||
|
||||
Z:
|
||||
|
||||
Z:
|
||||
|
||||
Z:
|
||||
|
||||
# mixer for the elevons
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 5000 5000 0 -10000 10000
|
||||
S: 0 1 -5000 -5000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 5000 5000 0 -10000 10000
|
||||
S: 0 1 5000 5000 0 -10000 10000
|
||||
|
||||
# mixer for the pusher/puller throttle
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
@ -6,13 +6,22 @@ are mixed 100%.
|
||||
|
||||
R: 4+ 10000 10000 10000 0
|
||||
|
||||
Gimbal / payload mixer for last two channels
|
||||
|
||||
Gimbal / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 5 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 6 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
Multirotor mixer for PX4FMU
|
||||
===========================
|
||||
|
||||
This file defines a single mixer for a quadrotor in the H configuration. All controls
|
||||
are mixed 100%.
|
||||
|
||||
R: 4h 10000 10000 10000 0
|
||||
|
||||
Gimbal / payload mixer for last two channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 6 10000 10000 0 -10000 10000
|
||||
@ -1,25 +0,0 @@
|
||||
Multirotor mixer for TEST
|
||||
===========================
|
||||
|
||||
This file defines a single mixer for a quadrotor with a wide configuration. All controls are mixed 100%.
|
||||
|
||||
R: 4w 10000 10000 10000 0
|
||||
|
||||
Gimbal / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
@ -6,13 +6,21 @@ are mixed 100%.
|
||||
|
||||
R: 4v 10000 10000 10000 0
|
||||
|
||||
Gimbal / payload mixer for last two channels
|
||||
Gimbal / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 5 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 6 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
@ -5,13 +5,21 @@ This file defines a single mixer for a quadrotor with a wide configuration. All
|
||||
|
||||
R: 4w 10000 10000 10000 0
|
||||
|
||||
Gimbal / payload mixer for last two channels
|
||||
Gimbal / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 5 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 6 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
@ -1,7 +1,26 @@
|
||||
Multirotor mixer for PX4FMU
|
||||
===========================
|
||||
|
||||
This file defines a single mixer for a quadrotor in the X configuration. All controls
|
||||
are mixed 100%.
|
||||
|
||||
R: 4x 10000 10000 10000 0
|
||||
|
||||
Gimbal / payload mixer for last four channels
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 5 10000 10000 0 -10000 10000
|
||||
S: 0 4 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 6 10000 10000 0 -10000 10000
|
||||
S: 0 5 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 6 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 7 10000 10000 0 -10000 10000
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user