mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-19 13:50:35 +08:00
Compare commits
516 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 545152f676 | |||
| 96384bdc29 | |||
| eede43a786 | |||
| b8e247a018 | |||
| 441a05d976 | |||
| 528ca931af | |||
| df53fb0fde | |||
| eae1585e38 | |||
| aefd217fc0 | |||
| 6b4c24fb12 | |||
| e2afb0be6b | |||
| d404359888 | |||
| 14ed65f0e4 | |||
| 0127f4017a | |||
| fadac79617 | |||
| 1fffd731b1 | |||
| 79678c5f25 | |||
| 7f04e3c759 | |||
| 75c95955fc | |||
| 1b5964dc42 | |||
| 7579ebf4e8 | |||
| 62297c3d86 | |||
| 821d7062df | |||
| 306a911dc9 | |||
| c3c8fa55b3 | |||
| fe62c259e8 | |||
| 90b509a73f | |||
| 372d16ee5e | |||
| 569e87d46b | |||
| 192cde408a | |||
| 818840b576 | |||
| d32a7ffb8d | |||
| 24e90e3c90 | |||
| d12be196a2 | |||
| 2784c3c5f0 | |||
| 64d7946cdc | |||
| 36efc8c83e | |||
| 61ffc6c432 | |||
| 2fad9a6397 | |||
| 42031ab572 | |||
| e27d3f4e13 | |||
| 2ba70c5d89 | |||
| 211c2b9ca6 | |||
| 9181f97f71 | |||
| a1f89e4fd9 | |||
| a8d3b15d73 | |||
| ae00abe468 | |||
| dfed00d870 | |||
| 03e5d7490f | |||
| 7d4e7aff20 | |||
| a962098645 | |||
| 021da9b2e1 | |||
| 3daf4a3a67 | |||
| 9fe95275bb | |||
| 70cd06bc84 | |||
| a97c5ec4e1 | |||
| 3d1f1522d9 | |||
| 1efe011522 | |||
| 5bb36162be | |||
| e6834579e5 | |||
| 7afa21ebb7 | |||
| f1a1c9d7da | |||
| 5c78af0f36 | |||
| 31e634b082 | |||
| e3557e0d3e | |||
| ce27cc8326 | |||
| 9f9c51eab3 | |||
| 7472c9033b | |||
| 73362f325b | |||
| 39ce001c41 | |||
| d810726c6e | |||
| a7ad722b98 | |||
| 7cc0b32e74 | |||
| 5786b73772 | |||
| a130b6a65c | |||
| 1a9688c42f | |||
| 8934aaa912 | |||
| eceb7e21b2 | |||
| 8b66a76432 | |||
| 4b9e1d58f7 | |||
| 0c9ead44f1 | |||
| e6dcc0a2ed | |||
| 90b5fcc1ec | |||
| 7ef8d197c6 | |||
| b36d705688 | |||
| bedf081d92 | |||
| 5d0f57d61e | |||
| 0551275b9c | |||
| ed6c63e48f | |||
| f231feb0f6 | |||
| 39303aa87a | |||
| ac1003875a | |||
| 6f973f1d6c | |||
| b9d93f2cad | |||
| 6173649c43 | |||
| 8bd4a624a7 | |||
| d21023c966 | |||
| 2fad39aaae | |||
| 3fff9e5826 | |||
| 3203d3f770 | |||
| 7e878e221c | |||
| 5678b4cc83 | |||
| 957b01a8eb | |||
| 63275ef92f | |||
| c3022bf713 | |||
| 1c0a494b4d | |||
| 64e47f2fae | |||
| a52d0ca00a | |||
| 2e44fe9edd | |||
| 5175d45e74 | |||
| 5eaf104318 | |||
| 853a5b77fd | |||
| 9087ef5990 | |||
| ae533b01b6 | |||
| deeefe5dd1 | |||
| 17561daefb | |||
| 9f4a91ab19 | |||
| 6f7b78821a | |||
| c62b886da5 | |||
| b8c377b91a | |||
| a664747d0a | |||
| 43f772154c | |||
| aae3a37983 | |||
| 12a5ce7a0a | |||
| 630cebeabc | |||
| e24d18f810 | |||
| 207a04bba0 | |||
| ead8e31de4 | |||
| 7b5917567a | |||
| 8b9bef3872 | |||
| ba047f234d | |||
| 393acf2231 | |||
| 0e9c352927 | |||
| c5e11cd16f | |||
| e8ae0fe13c | |||
| 5f342c3b5f | |||
| a0cad961b3 | |||
| 58135d892b | |||
| 990304ee22 | |||
| a73d5037f2 | |||
| cf776aeb0a | |||
| 148b6e6135 | |||
| cba4bcd2fb | |||
| ee5cdab963 | |||
| cff9e90bec | |||
| 4049ec2e96 | |||
| d4196f7f0c | |||
| 8f01324890 | |||
| 968a3d499b | |||
| a260a6eead | |||
| 61d5d8ce2a | |||
| 3cc64b3b7b | |||
| fb4c620f94 | |||
| 68986604e9 | |||
| 1dd2c94949 | |||
| 2a15578f8d | |||
| aa3ffa28c8 | |||
| 5920711c20 | |||
| eded7bf772 | |||
| 9a5f88d6bf | |||
| ff647e7bc8 | |||
| 3049b9af01 | |||
| 40ba3f5131 | |||
| c0e3ab632e | |||
| b86cf2b017 | |||
| 7280f71cef | |||
| 45a0a7c5ab | |||
| 2dd29ec4a1 | |||
| c97a18b6a4 | |||
| 3deefb1a79 | |||
| 124e1c26d9 | |||
| 9398a4819f | |||
| 3e87ec5153 | |||
| c76c8fda04 | |||
| bcd5f98cb1 | |||
| 278b607f62 | |||
| 37230f4c5d | |||
| 102f5b54d7 | |||
| bbe3525377 | |||
| 6ac79aa55f | |||
| 08f5ece306 | |||
| 699b6a2cb3 | |||
| bc7178c538 | |||
| e8a87538b8 | |||
| 95e80cc29b | |||
| a956429c4c | |||
| 8566cabd76 | |||
| a3a855203c | |||
| 8351afdca8 | |||
| 6aa8fcdf53 | |||
| 0b7fa4f5ad | |||
| e600e29ea4 | |||
| 0481c002df | |||
| 074a71173b | |||
| db174cf8b1 | |||
| 815c367294 | |||
| 8aa3b245a5 | |||
| aaeeb1684d | |||
| aa0c89c3ec | |||
| b4d9f44904 | |||
| 078aca1966 | |||
| 6689a3d1b1 | |||
| 6d3aba1c5f | |||
| 49844f52d5 | |||
| 00d4eae373 | |||
| ea9c8b968a | |||
| d748f6ca71 | |||
| cfa203ca22 | |||
| 422cf7e21c | |||
| eeb73888fd | |||
| f3c5c2c5a9 | |||
| feccb9bfc1 | |||
| 5b06b40ed9 | |||
| e287b05d67 | |||
| 547592fddf | |||
| 391eb7f8df | |||
| 579d420db1 | |||
| 86d1488e52 | |||
| d089c427ec | |||
| 6f1eda2b18 | |||
| 92ddc30b69 | |||
| 92185945bc | |||
| 0cc44a82c5 | |||
| 45a4472a47 | |||
| bae5416819 | |||
| 033e9e140d | |||
| e2d1524a7a | |||
| 670b0f7c6d | |||
| 437221bec2 | |||
| c22e7ed5c9 | |||
| aefa319fc4 | |||
| 457526ebe7 | |||
| a58c2f416f | |||
| ccea9c9e6f | |||
| 623b99327d | |||
| 5710a0c040 | |||
| a38263b8e7 | |||
| dd70b3752a | |||
| d809faec63 | |||
| 21bc5d1716 | |||
| 4e81263d3a | |||
| 11f1a11934 | |||
| a1c8585342 | |||
| c835fb36a6 | |||
| 0d80a77e46 | |||
| 8f1d350d3c | |||
| 6bf4bd5f35 | |||
| 50cac88e5b | |||
| 9f928308c4 | |||
| 3d0fa410a8 | |||
| fd6ad6565c | |||
| f7ad8c03b4 | |||
| 93acff8641 | |||
| 740bfc0b32 | |||
| ee1669e174 | |||
| f365832c0b | |||
| 401d807261 | |||
| 36299c59b4 | |||
| 788f04ea58 | |||
| 94fc8bda02 | |||
| 2bca19fc5e | |||
| e4f20f98cd | |||
| b5ef5cabb5 | |||
| 5f16c97662 | |||
| 390a7165dd | |||
| 5a262ec6bc | |||
| a18eabead4 | |||
| 2de66b1a9d | |||
| ad2a13dcc8 | |||
| 0fa3bd4691 | |||
| 1b0f41e36e | |||
| fa421a91e2 | |||
| 6ab9dc0acf | |||
| 99aa5f49fc | |||
| 6aa935fed6 | |||
| e70223c2be | |||
| 1f1839d978 | |||
| 9ece090dbe | |||
| 499d362b8b | |||
| 302719527a | |||
| e8d44da2c0 | |||
| 2241ab9cac | |||
| 78a9472b25 | |||
| dcb7c0e4c2 | |||
| 79a1b84b09 | |||
| de76c398ca | |||
| ec035b7268 | |||
| 57b3bbf657 | |||
| 31d5c59ab7 | |||
| a9a5f3a19e | |||
| 55d21242fe | |||
| b6a9ff756c | |||
| 3b7ba915a8 | |||
| 9f5b081257 | |||
| 4b414d96eb | |||
| 0ce08ed9f8 | |||
| ce3749d04f | |||
| 0cf77a30b1 | |||
| 415fbae31e | |||
| 50a14cfd29 | |||
| 3a0f4c84a5 | |||
| cbcbce3a28 | |||
| 6245a9b134 | |||
| d660fb094b | |||
| d6d3a56116 | |||
| c55c978145 | |||
| 4045068187 | |||
| 8602ff7856 | |||
| 3f9f320f18 | |||
| a8e28c7232 | |||
| 632e4630b1 | |||
| a71cfe92f1 | |||
| 664092b7d4 | |||
| 3289e0cee6 | |||
| d63870ad71 | |||
| f4e35873a1 | |||
| c4eb65862f | |||
| a9cb2d2fbe | |||
| c4cb916afa | |||
| 4656b34244 | |||
| 4fa59c3cde | |||
| b6e57e1347 | |||
| 83feb83fe2 | |||
| c3b58822a8 | |||
| 50175ca7ea | |||
| aea7bd5b47 | |||
| f069880504 | |||
| 254358ef86 | |||
| 89a2f5057f | |||
| 6ff65cd8b2 | |||
| 0a997577f5 | |||
| 9f7f6e4d3d | |||
| 6226a0c77d | |||
| ec334f7c9b | |||
| 8c8120e2fc | |||
| fd51bf44d5 | |||
| e3f3233ee4 | |||
| 880fa47ba2 | |||
| 7458f1e07d | |||
| 563122f5d3 | |||
| 4f62a35993 | |||
| 05315abc89 | |||
| 5cee3fa0e1 | |||
| 76d74640ae | |||
| 7399e60e96 | |||
| a4ef364f80 | |||
| 0730e681bc | |||
| 2b93f16118 | |||
| 317fd270d1 | |||
| b99f51a035 | |||
| ae66085f89 | |||
| 1fc8e38157 | |||
| 7d11b32981 | |||
| 2197bf518d | |||
| 28de6d2cbd | |||
| d94bdb0829 | |||
| e73d8d73e1 | |||
| 8ab841e046 | |||
| 03b3bfa98d | |||
| 2c0c30eadf | |||
| 38e4882b5f | |||
| 0f6a6f7150 | |||
| 9a8c092116 | |||
| 5ded579bf3 | |||
| 7b52eced66 | |||
| a420d47797 | |||
| 5b85fdb636 | |||
| 9fcf121380 | |||
| 981353f439 | |||
| fa614a3cc1 | |||
| 2bf40efe8b | |||
| 17be06cf1a | |||
| 1939b88a33 | |||
| f241518d0e | |||
| d733fc9139 | |||
| a1b710025b | |||
| ee58f0d11d | |||
| b48c081e5c | |||
| 87e964ec10 | |||
| f430c39f5b | |||
| 1cfa429efe | |||
| 33e4f38d82 | |||
| e2a6ae676f | |||
| 4a199c1360 | |||
| f1b8bed5df | |||
| 8a2df2a458 | |||
| 5d1bd6fb2c | |||
| 8d13dba0cc | |||
| 5e8d6375c9 | |||
| 39ce201efe | |||
| 78bc7d850b | |||
| 3ed8b735c2 | |||
| 399d4ef833 | |||
| eda2915f0b | |||
| d9343fa925 | |||
| 8345a0368b | |||
| 8ded6a58ab | |||
| 314ee6b7e0 | |||
| 631ce1fc55 | |||
| af8cd3f880 | |||
| 13905c2480 | |||
| 08bbd6dbfa | |||
| 71e2a43790 | |||
| f0dd5a103c | |||
| 784883af22 | |||
| 7718343b27 | |||
| de14418e93 | |||
| ebce725720 | |||
| 59b4350aa0 | |||
| 7419151314 | |||
| 0576031a81 | |||
| f8382a2713 | |||
| 5cc58fa067 | |||
| 817f695297 | |||
| a740d80a20 | |||
| 021f0840ae | |||
| 4fa2c54485 | |||
| c9652fd42a | |||
| 4ec9e53deb | |||
| 68e14ceb29 | |||
| 49614cfe38 | |||
| db13ac4c53 | |||
| e9726af54c | |||
| 80134d2b7d | |||
| 71d150f6ec | |||
| c7130081cc | |||
| 02b3adc4a7 | |||
| 18330f7ab7 | |||
| d2194d787f | |||
| f39d284193 | |||
| 7601788c43 | |||
| 8b3045baa2 | |||
| c0a406b81f | |||
| 826eaed2ee | |||
| 4f875560b7 | |||
| 07384d6b5a | |||
| 19b56c1574 | |||
| 5bd574dd05 | |||
| f69e9a3d37 | |||
| a23785842c | |||
| ea4d9a34fd | |||
| a36f392b58 | |||
| da96144e80 | |||
| 5de19500c2 | |||
| 09227526b6 | |||
| 7afe2e8dd8 | |||
| eb6af9afb9 | |||
| 38652ec940 | |||
| 3c11c0d8d8 | |||
| 2317589950 | |||
| e86c1851a7 | |||
| ddba274496 | |||
| 544ea72d4c | |||
| 03dbcf5464 | |||
| 772dc302b6 | |||
| fe91527604 | |||
| 5f18f9bbba | |||
| 1631cfdc83 | |||
| f7bb43b20b | |||
| 168c744232 | |||
| 6e44760819 | |||
| 84a1a10006 | |||
| 28ad6066aa | |||
| ffcefd9047 | |||
| 4252511b8e | |||
| 9974b6f747 | |||
| 15880f8d13 | |||
| aa77e8ee23 | |||
| 50b93b161c | |||
| 78f7f00ae2 | |||
| 4683e20187 | |||
| 9c73eae941 | |||
| 8e136779ec | |||
| c5ea4b43be | |||
| c66f26245c | |||
| 30301187f0 | |||
| d846ad5dac | |||
| c50d267bfb | |||
| 0c30ee8d37 | |||
| b4ecc5a8d9 | |||
| c407123a72 | |||
| 2c2477a07d | |||
| ac45c9001b | |||
| 78b45c4778 | |||
| ddc4d70d51 | |||
| 1d5c5497b5 | |||
| 056f73f5d2 | |||
| 703141d650 | |||
| 332f669d9b | |||
| 7ed0eba50e | |||
| 8a2155f2af | |||
| 96f053273c | |||
| 09ecc84cc7 | |||
| 7e883809e3 | |||
| c38f23c0e1 | |||
| 9c0ed52bb8 | |||
| 09ddc24801 | |||
| 3524fd7d24 | |||
| e342299204 | |||
| c4e77cf411 | |||
| c94fe845ec | |||
| a455962e17 | |||
| dc1f343501 | |||
| 7f89994785 | |||
| a9a3050682 | |||
| 8d254058fa | |||
| d96810f250 | |||
| 29be7c3003 | |||
| 9131647566 | |||
| 00243a9842 | |||
| 97d9fd38be | |||
| bc6e83f5e3 | |||
| d85e416680 | |||
| 9258bb2ae8 | |||
| 88cf8f23f6 | |||
| fd17c87eb4 |
@@ -64,7 +64,6 @@ CMakeLists.txt.user
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
*.config
|
||||
*.creator
|
||||
*.creator.user
|
||||
*.files
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ matrix:
|
||||
include:
|
||||
- os: linux
|
||||
sudo: required
|
||||
env: GCC_VER=4.8 DOCKER_REPO="px4io/px4-dev-base"
|
||||
env: GCC_VER=4.8 DOCKER_REPO="px4io/px4-dev-base:2016-07-14"
|
||||
services:
|
||||
- docker
|
||||
- os: osx
|
||||
@@ -63,7 +63,7 @@ script:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
docker run --rm -v `pwd`:`pwd`:rw -v $HOME/.ccache:$HOME/.ccache:rw -e CCACHE_DIR=$HOME/.ccache -e GIT_SUBMODULES_ARE_EVIL=1 -w=`pwd` --user=$UID -it ${DOCKER_REPO} /bin/bash -c "make check_qgc_firmware VECTORCONTROL=1";
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
make check_posix_sitl_default;
|
||||
make tests;
|
||||
fi
|
||||
- ccache -s
|
||||
|
||||
|
||||
+48
-18
@@ -121,6 +121,9 @@
|
||||
# and leads to wrong toolchain detection
|
||||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
|
||||
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
# Use clang
|
||||
#SET (CMAKE_C_COMPILER /usr/bin/clang-3.6)
|
||||
#SET (CMAKE_CXX_COMPILER /usr/bin/clang++-3.6)
|
||||
@@ -132,7 +135,7 @@ cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
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")
|
||||
set(CONFIG "posix_sitl_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
|
||||
@@ -152,12 +155,19 @@ set(target_name "${OS}-${BOARD}-${LABEL}")
|
||||
|
||||
message(STATUS "${target_name}")
|
||||
|
||||
# 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
|
||||
# Define GNU standard installation directories
|
||||
include(GNUInstallDirs)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
# Setup install paths
|
||||
if(NOT CMAKE_INSTALL_PREFIX)
|
||||
if (${OS} STREQUAL "posix")
|
||||
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
|
||||
message(STATUS "cmake module path: ${CMAKE_MODULE_PATH}")
|
||||
set(config_module "configs/${CONFIG}")
|
||||
include(${config_module})
|
||||
|
||||
@@ -202,7 +212,7 @@ if (NOT ${CMAKE_VERSION} VERSION_LESS 3.1.0)
|
||||
endif()
|
||||
|
||||
set(version_major 1)
|
||||
set(version_minor 0)
|
||||
set(version_minor 4)
|
||||
set(version_patch 1)
|
||||
set(version "${version_major}.${version_minor}.${version_patch}")
|
||||
set(package-contact "px4users@googlegroups.com")
|
||||
@@ -217,6 +227,11 @@ find_package(PythonInterp REQUIRED)
|
||||
#
|
||||
enable_testing()
|
||||
|
||||
#=============================================================================
|
||||
# generate compile command database
|
||||
#
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
#=============================================================================
|
||||
# check required toolchain variables
|
||||
#
|
||||
@@ -235,7 +250,7 @@ endforeach()
|
||||
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_gtest PATH "unittests/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")
|
||||
@@ -246,7 +261,7 @@ 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}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
COMMAND git submodule deinit -f .
|
||||
COMMAND rm -rf .git/modules/*
|
||||
)
|
||||
@@ -256,12 +271,12 @@ add_custom_target(submodule_clean
|
||||
#
|
||||
add_custom_target(check_format
|
||||
COMMAND Tools/check_code_style.sh
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(config
|
||||
COMMAND cmake-gui .
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR}
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
@@ -310,7 +325,7 @@ add_custom_target(xml_gen
|
||||
# external projects
|
||||
#
|
||||
|
||||
set(ep_base ${CMAKE_BINARY_DIR}/external)
|
||||
set(ep_base ${PX4_BINARY_DIR}/external)
|
||||
set_property(DIRECTORY PROPERTY EP_BASE ${ep_base})
|
||||
|
||||
# add external project install folders to build
|
||||
@@ -339,7 +354,7 @@ foreach(module ${config_module_list})
|
||||
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})
|
||||
add_subdirectory(${module} ${PX4_BINARY_DIR}/${EXT_MODULE_PREFIX})
|
||||
else()
|
||||
add_subdirectory(src/${module})
|
||||
endif()
|
||||
@@ -364,19 +379,34 @@ endif()
|
||||
#=============================================================================
|
||||
# generate git version
|
||||
#
|
||||
px4_create_git_hash_header(HEADER ${CMAKE_BINARY_DIR}/build_git_version.h)
|
||||
px4_create_git_hash_header(HEADER ${PX4_BINARY_DIR}/build_git_version.h)
|
||||
|
||||
#=============================================================================
|
||||
# packaging
|
||||
#
|
||||
# Important to having packaging at end of cmake file.
|
||||
#
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${CONFIG})
|
||||
set(CPACK_PACKAGE_VERSION ${version})
|
||||
set(CPACK_PACKAGE_CONTACT ${package_contact})
|
||||
set(CPACK_PACKAGE_CONTACT ${package-contact})
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||
set(short-description "The px4 autopilot.")
|
||||
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${short-description})
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${version}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${version}")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
|
||||
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
find_program(DPKG_PROGRAM dpkg)
|
||||
if (EXISTS ${DPKG_PROGRAM})
|
||||
list (APPEND CPACK_GENERATOR "DEB")
|
||||
endif()
|
||||
endif()
|
||||
if (${OS} STREQUAL "posix")
|
||||
set(CPACK_SET_DESTDIR "ON")
|
||||
endif()
|
||||
include(CPack)
|
||||
|
||||
endif() # ros alternative endif
|
||||
|
||||
# vim: set noet fenc=utf-8 ff=unix ft=cmake :
|
||||
|
||||
@@ -66,8 +66,8 @@ Linux or Eagle with a working IP interface (?? does this need further instructio
|
||||
> adb shell
|
||||
# bash
|
||||
root@linaro-developer:/# cd ???
|
||||
root@linaro-developer:/# ./mainapp
|
||||
App name: mainapp
|
||||
root@linaro-developer:/# ./px4
|
||||
App name: px4
|
||||
Enter a command and its args:
|
||||
uorb start
|
||||
muorb start
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 65,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the ASCv1 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "ASCv1",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 64,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the TAPv1 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "TAPv1",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -42,7 +42,7 @@ 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 On Ubuntu 16.04, install or upgrade via:)
|
||||
$(warning )
|
||||
$(warning 3rd party PPA:)
|
||||
$(warning sudo add-apt-repository ppa:george-edison55/cmake-3.x -y)
|
||||
@@ -77,7 +77,7 @@ endif
|
||||
# in that directory with the target upload.
|
||||
|
||||
# explicity set default build target
|
||||
all: px4fmu-v2_default
|
||||
all: posix_sitl_default
|
||||
|
||||
# Parsing
|
||||
# --------------------------------------------------------------------
|
||||
@@ -104,20 +104,27 @@ endif
|
||||
PX4_MAKE_ARGS = -j$(j) --no-print-directory
|
||||
endif
|
||||
|
||||
# check if replay env variable is set & set build dir accordingly
|
||||
ifdef replay
|
||||
BUILD_DIR_SUFFIX := _replay
|
||||
else
|
||||
BUILD_DIR_SUFFIX :=
|
||||
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
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e ./build_$@$(BUILD_DIR_SUFFIX)/Makefile ]; then rm -rf ./build_$@$(BUILD_DIR_SUFFIX); fi
|
||||
+@if [ ! -e ./build_$@$(BUILD_DIR_SUFFIX)/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p ./build_$@$(BUILD_DIR_SUFFIX) && cd ./build_$@$(BUILD_DIR_SUFFIX) && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf ./build_$@$(BUILD_DIR_SUFFIX)); fi
|
||||
+@Tools/check_submodules.sh
|
||||
+@(echo "PX4 CONFIG: $@" && cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
+@(echo "PX4 CONFIG: $@$(BUILD_DIR_SUFFIX)" && cd ./build_$@$(BUILD_DIR_SUFFIX) && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
endef
|
||||
|
||||
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))
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e ./build_$@/Makefile ]; then rm -rf ./build_$@; fi
|
||||
+@if [ ! -e ./build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p ./build_$@ && cd ./build_$@ && cmake $(2) -G$(PX4_CMAKE_GENERATOR) || (cd .. && rm -rf ./build_$@); fi
|
||||
+@(cd ./build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
endef
|
||||
|
||||
# create empty targets to avoid msgs for targets passed to cmake
|
||||
@@ -137,12 +144,18 @@ endef
|
||||
# --------------------------------------------------------------------
|
||||
# Do not put any spaces between function arguments.
|
||||
|
||||
tap-v1_default:
|
||||
$(call cmake-build,nuttx_tap-v1_default)
|
||||
|
||||
asc-v1_default:
|
||||
$(call cmake-build,nuttx_asc-v1_default)
|
||||
|
||||
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)
|
||||
|
||||
@@ -152,19 +165,13 @@ 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_lpe:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_test:
|
||||
posix_sitl_lpe:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_replay:
|
||||
@@ -189,10 +196,10 @@ 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,$@)
|
||||
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_eagle_legacy_driver_default:
|
||||
$(call cmake-build,$@)
|
||||
$(call cmake-build,$@)
|
||||
|
||||
qurt_excelsior_default:
|
||||
$(call cmake-build,$@)
|
||||
@@ -202,18 +209,15 @@ posix_excelsior_default:
|
||||
|
||||
excelsior_default: posix_excelsior_default qurt_excelsior_default
|
||||
|
||||
posix_rpi2_default:
|
||||
posix_rpi_native:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_rpi2_release:
|
||||
posix_rpi_cross:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_bebop_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_navio2_release:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix: posix_sitl_default
|
||||
|
||||
broadcast: posix_sitl_broadcast
|
||||
@@ -229,12 +233,12 @@ run_sitl_ros: sitl_deprecation
|
||||
# Other targets
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
.PHONY: gazebo_build uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
|
||||
.NOTPARALLEL: gazebo_build uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
|
||||
.PHONY: gazebo_build uavcan_firmware check check_format format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
|
||||
.NOTPARALLEL: gazebo_build uavcan_firmware check check_format format unittest tests qgc_firmware 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
|
||||
@if [ ! -e ./build_gazebo/CMakeCache.txt ];then cd build_gazebo && cmake -Wno-dev -G$(PX4_CMAKE_GENERATOR) ../Tools/sitl_gazebo; fi
|
||||
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS)
|
||||
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS) sdf
|
||||
|
||||
@@ -247,8 +251,9 @@ endif
|
||||
checks_defaults: \
|
||||
check_px4fmu-v1_default \
|
||||
check_px4fmu-v2_default \
|
||||
check_px4fmu-v4_default \
|
||||
check_mindpx-v2_default \
|
||||
check_px4-stm32f4discovery_default \
|
||||
check_tap-v1_default
|
||||
|
||||
checks_bootloaders: \
|
||||
|
||||
@@ -257,26 +262,32 @@ checks_tests: \
|
||||
check_px4fmu-v2_test
|
||||
|
||||
checks_alts: \
|
||||
check_px4fmu-v2_ekf2 \
|
||||
check_asc-v1_default \
|
||||
check_px4-stm32f4discovery_default
|
||||
|
||||
checks_uavcan: \
|
||||
check_px4fmu-v4_default_and_uavcan
|
||||
|
||||
checks_sitls: \
|
||||
check_posix_sitl_default \
|
||||
check_posix_sitl_test \
|
||||
check_posix_sitl_default
|
||||
|
||||
checks_last: \
|
||||
check_unittest \
|
||||
check_tests \
|
||||
check_format \
|
||||
|
||||
check: checks_defaults checks_tests checks_alts checks_uavcan checks_bootloaders checks_sitls checks_last
|
||||
check: checks_defaults checks_tests checks_alts checks_uavcan checks_bootloaders checks_last
|
||||
quick_check: check_px4fmu-v2_default check_px4fmu-v4_default check_posix_sitl_default check_tests check_format
|
||||
|
||||
check_format:
|
||||
$(call colorecho,"Checking formatting with astyle")
|
||||
@./Tools/fix_code_style.sh
|
||||
@./Tools/check_code_style_all.sh
|
||||
|
||||
format:
|
||||
$(call colorecho,"Formatting with astyle")
|
||||
@./Tools/fix_code_style.sh
|
||||
@./Tools/check_code_style_all.sh --fix
|
||||
|
||||
check_%:
|
||||
@echo
|
||||
$(call colorecho,"Building" $(subst check_,,$@))
|
||||
@@ -292,28 +303,31 @@ ifeq ($(VECTORCONTROL),1)
|
||||
@rm -rf ROMFS/px4fmu_common/uavcan
|
||||
endif
|
||||
|
||||
unittest: posix_sitl_test
|
||||
unittest: posix_sitl_default
|
||||
$(call cmake-build-other,unittest, ../unittests)
|
||||
@(cd build_unittest && ctest -j2 --output-on-failure)
|
||||
|
||||
tests: posix_sitl_test unittest
|
||||
|
||||
test_onboard_sitl:
|
||||
@HEADLESS=1 make posix_sitl_test gazebo_iris
|
||||
run_tests_posix: posix_sitl_default
|
||||
@mkdir -p build_posix_sitl_default/src/firmware/posix/rootfs/fs/microsd
|
||||
@mkdir -p build_posix_sitl_default/src/firmware/posix/rootfs/eeprom
|
||||
@touch build_posix_sitl_default/src/firmware/posix/rootfs/eeprom/parameters
|
||||
@(cd build_posix_sitl_default/src/firmware/posix && ./px4 -d ../../../../posix-configs/SITL/init/rcS_tests | tee test_output)
|
||||
@(cd build_posix_sitl_default/src/firmware/posix && grep --color=always "All tests passed" test_output)
|
||||
|
||||
tests: check_unittest run_tests_posix
|
||||
|
||||
# QGroundControl flashable firmware
|
||||
qgc_firmware: \
|
||||
check_px4fmu-v1_default \
|
||||
check_px4fmu-v2_default \
|
||||
check_mindpx-v2_default \
|
||||
check_tap-v1_default \
|
||||
check_px4fmu-v4_default_and_uavcan \
|
||||
check_format
|
||||
|
||||
extra_firmware: \
|
||||
check_px4-stm32f4discovery_default \
|
||||
check_px4fmu-v2_test \
|
||||
check_px4fmu-v2_ekf2
|
||||
check_px4fmu-v2_test
|
||||
|
||||
package_firmware:
|
||||
@zip --junk-paths Firmware.zip `find . -name \*.px4`
|
||||
@@ -331,7 +345,7 @@ 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 \
|
||||
cmake_targets = install 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 gazebo_typhoon_h480
|
||||
|
||||
+1
-1
Submodule NuttX updated: f0f4bdc872...28c412089c
@@ -0,0 +1,47 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Koptr Image GreenKoptr
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
#
|
||||
# @maintainer Alexandre Gilbert <alexandre.gilbert@koptrimage.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 7.50
|
||||
param set MC_ROLLRATE_P 0.180
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.0
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.140
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.0040
|
||||
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 greenkoptr
|
||||
set PWM_OUT 12345678
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX greenkoptr
|
||||
|
||||
set MAV_TYPE 21
|
||||
@@ -0,0 +1,50 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Blade 130X
|
||||
#
|
||||
# @type Helicopter
|
||||
#
|
||||
# @maintainer Bart Slinger <bartslinger@gmail.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
# Configure as helicopter (number 4 defined in commander_helper.cpp)
|
||||
set MAV_TYPE 4
|
||||
|
||||
set MIXER heli_120deg
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 5.0
|
||||
param set MC_ROLLRATE_P 0.0
|
||||
param set MC_ROLLRATE_I 0.0
|
||||
param set MC_ROLLRATE_D 0.0
|
||||
param set MC_ROLLRATE_FF 0.15
|
||||
param set MC_PITCH_P 6.5
|
||||
param set MC_PITCHRATE_P 0.0
|
||||
param set MC_PITCHRATE_I 0.0
|
||||
param set MC_PITCHRATE_D 0.0
|
||||
param set MC_PITCHRATE_FF 0.15
|
||||
param set MC_YAW_P 3.0
|
||||
param set MC_YAWRATE_P 0.1
|
||||
param set MC_YAWRATE_I 0.0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.0
|
||||
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
|
||||
@@ -33,4 +33,6 @@ then
|
||||
param set MPC_MANTHR_MIN 0.06
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
param set ATT_BIAS_MAX 0.0
|
||||
param set MC_TPA_BREAK 0.5
|
||||
param set MC_TPA_SLOPE 1.0
|
||||
fi
|
||||
|
||||
@@ -20,9 +20,9 @@ then
|
||||
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_P 0.19
|
||||
param set MC_PITCHRATE_I 0.1
|
||||
param set MC_PITCHRATE_D 0.0065
|
||||
param set MC_PITCHRATE_D 0.0055
|
||||
param set MC_YAW_P 4.0
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
@@ -33,6 +33,9 @@ then
|
||||
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 MC_TPA_BREAK 0.5
|
||||
param set MC_TPA_SLOPE 1.0
|
||||
|
||||
|
||||
param set PWM_MIN 1075
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# att & pos estimator, rover steering control
|
||||
#
|
||||
|
||||
ekf_att_pos_estimator start
|
||||
ekf2 start
|
||||
|
||||
# disabled the start of steering control app due to use of offboard mode only
|
||||
# rover_steering_control start
|
||||
|
||||
@@ -11,7 +11,12 @@ then
|
||||
param set RTL_DESCEND_ALT 100
|
||||
param set RTL_LAND_DELAY -1
|
||||
|
||||
param set NAV_ACC_RAD 50
|
||||
# FW uses L1 distance for acceptance radius
|
||||
# set a smaller NAV_ACC_RAD for vertical acceptance distance
|
||||
param set NAV_ACC_RAD 10
|
||||
|
||||
param set MIS_LTRMIN_ALT 25
|
||||
param set MIS_TAKEOFF_ALT 25
|
||||
|
||||
param set PE_VELNE_NOISE 0.3
|
||||
param set PE_VELD_NOISE 0.35
|
||||
|
||||
@@ -29,19 +29,9 @@ then
|
||||
fi
|
||||
#---------------------------------------
|
||||
|
||||
if mc_att_control start
|
||||
then
|
||||
else
|
||||
# try the multiplatform version
|
||||
mc_att_control_m start
|
||||
fi
|
||||
mc_att_control start
|
||||
|
||||
if mc_pos_control start
|
||||
then
|
||||
else
|
||||
# try the multiplatform version
|
||||
mc_pos_control_m start
|
||||
fi
|
||||
mc_pos_control start
|
||||
|
||||
#
|
||||
# Start Land Detector
|
||||
|
||||
@@ -34,15 +34,6 @@ 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
|
||||
|
||||
@@ -14,6 +14,17 @@ else
|
||||
fmu i2c 1 100000
|
||||
fmu i2c 2 100000
|
||||
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
# We know there are sketchy boards out there
|
||||
# as chinese companies produce Pixracers without
|
||||
# fully understanding the critical parts of the
|
||||
# schematic and BOM, leading to sensor brownouts
|
||||
# on boot. Original Pixracers following the
|
||||
# open hardware design do not require this.
|
||||
fmu sensor_reset 20
|
||||
fi
|
||||
|
||||
if ms5611 -s start
|
||||
then
|
||||
fi
|
||||
@@ -45,6 +56,11 @@ then
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal SPI bus ICM-20608-G
|
||||
if mpu6000 -T 20608 start
|
||||
then
|
||||
fi
|
||||
|
||||
# external MPU6K is rotated 180 degrees yaw
|
||||
if mpu6000 -X -R 4 start
|
||||
then
|
||||
@@ -84,6 +100,10 @@ then
|
||||
then
|
||||
fi
|
||||
|
||||
if mpu9250 start
|
||||
then
|
||||
fi
|
||||
|
||||
if l3gd20 start
|
||||
then
|
||||
fi
|
||||
@@ -190,7 +210,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if sf10a start
|
||||
if sf1xx start
|
||||
then
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# UAVCAN initialization script.
|
||||
#
|
||||
|
||||
#
|
||||
# Starting stuff according to UAVCAN_ENABLE value
|
||||
#
|
||||
if param greater UAVCAN_ENABLE 0
|
||||
then
|
||||
if uavcan start
|
||||
then
|
||||
echo "[i] UAVCAN started"
|
||||
else
|
||||
echo "[i] ERROR: Could not start UAVCAN"
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
|
||||
if param greater UAVCAN_ENABLE 1
|
||||
then
|
||||
if uavcan start fw
|
||||
then
|
||||
echo "[i] UAVCAN servers started"
|
||||
else
|
||||
echo "[i] ERROR: Could not start UAVCAN servers"
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@@ -1,9 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# USB MAVLink start
|
||||
#
|
||||
|
||||
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
|
||||
|
||||
# Exit shell to make it available to MAVLink
|
||||
exit
|
||||
@@ -34,15 +34,6 @@ 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
|
||||
|
||||
@@ -109,6 +109,16 @@ then
|
||||
set AUTOCNF yes
|
||||
else
|
||||
set AUTOCNF no
|
||||
|
||||
#
|
||||
# Release 1.4.0 transitional support:
|
||||
# set to old default if unconfigured.
|
||||
# this preserves the previous behaviour
|
||||
#
|
||||
if param compare BAT_N_CELLS 0
|
||||
then
|
||||
param set BAT_N_CELLS 3
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
@@ -298,22 +308,6 @@ then
|
||||
set FMU_MODE gpio_serial
|
||||
fi
|
||||
|
||||
if param greater TRIG_MODE 0
|
||||
then
|
||||
if [ $PWM_OUT == 1234 ]
|
||||
then
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
set FMU_MODE pwm4
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V2
|
||||
then
|
||||
set FMU_MODE pwm4
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $HIL == yes ]
|
||||
then
|
||||
set OUTPUT_MODE hil
|
||||
@@ -546,13 +540,13 @@ then
|
||||
# clear pins 5 and 6
|
||||
if param compare SENS_EN_LL40LS 1
|
||||
then
|
||||
set FMU_MODE pwm4
|
||||
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
|
||||
set FMU_MODE pwm4
|
||||
set AUX_MODE pwm4
|
||||
camera_trigger start
|
||||
fi
|
||||
fi
|
||||
@@ -599,6 +593,12 @@ then
|
||||
sf0x start
|
||||
fi
|
||||
|
||||
# mb12xx sonar sensor
|
||||
if param compare SENS_EN_MB12XX 1
|
||||
then
|
||||
mb12xx start
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
frsky_telemetry start -d /dev/ttyS6
|
||||
@@ -654,7 +654,7 @@ then
|
||||
then
|
||||
fi
|
||||
else
|
||||
if logger start -b 12
|
||||
if logger start -b 12 -t
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# mixer for the GreenKoptr tilt mechansim servo, elevons and landing gear
|
||||
=======================================================================
|
||||
|
||||
Tilt mechanism servo mixer
|
||||
---------------------------
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 4 0 20000 -10000 -10000 10000
|
||||
|
||||
Elevon mixers
|
||||
-------------
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 -7500 -7500 0 -10000 10000
|
||||
S: 1 1 8000 8000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 -7500 -7500 0 -10000 10000
|
||||
S: 1 1 -8000 -8000 0 -10000 10000
|
||||
@@ -0,0 +1,4 @@
|
||||
# GreenKoptr mixer for PX4FMU
|
||||
#
|
||||
#===========================
|
||||
R: 6t 10000 10000 10000 0
|
||||
@@ -0,0 +1,54 @@
|
||||
Helicopter 120 degree Cyclic-Collective-Pitch Mixing (CCPM) for PX4FMU
|
||||
Blade 130x helicopter has longer servo arms left and right. The front servo arm is shorter.
|
||||
Therefore it is not required to use the 0.866 factor.
|
||||
==================================================
|
||||
|
||||
Output 0 - Left Servo Mixer
|
||||
-----------------
|
||||
Left Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) + Aileron (Roll - 0)
|
||||
|
||||
M: 3
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 5 10000 10000 0 -10000 10000
|
||||
S: 0 1 -10000 -10000 0 -10000 10000
|
||||
S: 0 0 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
Output 1 - Front Servo Mixer
|
||||
----------------
|
||||
|
||||
Rear Servo = Collective (Thrust - 3) + Elevator (Pitch - 1)
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 5 10000 10000 0 -10000 10000
|
||||
S: 0 1 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
Output 2 - Right Servo Mixer
|
||||
----------------
|
||||
Right Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) - Aileron (Roll - 0)
|
||||
|
||||
M: 3
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 3 5 10000 10000 0 -10000 10000
|
||||
S: 0 1 -10000 -10000 0 -10000 10000
|
||||
S: 0 0 -10000 -10000 0 -10000 10000
|
||||
|
||||
|
||||
Output 3 - Tail Servo Mixer
|
||||
----------------
|
||||
Tail Servo = Yaw (control index = 2)
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
Output 4 - Motor speed mixer
|
||||
-----------------
|
||||
This would be the motor speed control output from governor power demand- not sure what index to use here?
|
||||
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
@@ -190,7 +190,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if sf10a start
|
||||
if sf1xx start
|
||||
then
|
||||
fi
|
||||
|
||||
|
||||
@@ -111,87 +111,22 @@ fi
|
||||
|
||||
sh /etc/init.d/rc.sensors
|
||||
|
||||
# Check for flow sensor
|
||||
if px4flow start
|
||||
then
|
||||
fi
|
||||
|
||||
if ll40ls start
|
||||
then
|
||||
fi
|
||||
ver all
|
||||
|
||||
#
|
||||
# Run unit tests at board boot, reporting failure as needed.
|
||||
# Add new unit tests using the same pattern as below.
|
||||
#
|
||||
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "[mavlink_tests] STARTING TEST"
|
||||
if mavlink_tests
|
||||
then
|
||||
echo "[mavlink_tests] PASS"
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} mavlink_tests"
|
||||
echo "[mavlink_tests] FAILED"
|
||||
fi
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "[commander_tests] STARTING TEST"
|
||||
if commander_tests
|
||||
then
|
||||
echo "[commander_tests] PASS"
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} commander_tests"
|
||||
echo "[commander_tests] FAILED"
|
||||
fi
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "[controllib_test] STARTING TEST"
|
||||
if controllib_test
|
||||
then
|
||||
echo "[controllib_test] PASS"
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} controllib_tests"
|
||||
echo "[controllib_test] FAILED"
|
||||
fi
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "[uorb_tests] STARTING TEST"
|
||||
if uorb_tests
|
||||
then
|
||||
echo "[uorb_tests] PASS"
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} uorb_tests"
|
||||
echo "[uorb_tests] FAILED"
|
||||
fi
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
|
||||
if tests all
|
||||
then
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} system_tests"
|
||||
fi
|
||||
|
||||
if [ $unit_test_failure == 0 ]
|
||||
then
|
||||
echo
|
||||
echo "All Unit Tests PASSED"
|
||||
rgbled rgb 20 255 20
|
||||
else
|
||||
echo
|
||||
echo "Some Unit Tests FAILED:${unit_test_failure_list}"
|
||||
echo "Some Unit Tests FAILED"
|
||||
rgbled rgb 255 20 20
|
||||
fi
|
||||
|
||||
ver all
|
||||
|
||||
free
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Quadrotor X config
|
||||
#
|
||||
# @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 Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
if tap_esc start -d /dev/ttyS4 -n 4
|
||||
then
|
||||
fi
|
||||
set OUTPUT_MODE tap_esc
|
||||
param set BAT_N_CELLS 4
|
||||
|
||||
set MIXER quad_x
|
||||
@@ -0,0 +1,25 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Hexarotor x geometry
|
||||
#
|
||||
# @type Hexarotor 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 Anton Babushkin <anton@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
param set MAV_TYPE 13
|
||||
param set MC_YAWRATE_P 0.12
|
||||
param set CAL_MAG0_ROT 6
|
||||
|
||||
if tap_esc start -d /dev/ttyS4 -n 6
|
||||
then
|
||||
fi
|
||||
set OUTPUT_MODE tap_esc
|
||||
|
||||
set MIXER hexa_x
|
||||
@@ -0,0 +1,20 @@
|
||||
#!nsh
|
||||
#
|
||||
# Standard apps for fixed wing
|
||||
#
|
||||
|
||||
#
|
||||
# Start the attitude and position estimator
|
||||
#
|
||||
ekf2 start
|
||||
|
||||
#
|
||||
# Start attitude controller
|
||||
#
|
||||
fw_att_control start
|
||||
fw_pos_control_l1 start
|
||||
|
||||
#
|
||||
# Start Land Detector
|
||||
#
|
||||
land_detector start fixedwing
|
||||
@@ -0,0 +1,28 @@
|
||||
#!nsh
|
||||
|
||||
set VEHICLE_TYPE fw
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
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_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
|
||||
fi
|
||||
|
||||
# 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
|
||||
@@ -0,0 +1,83 @@
|
||||
#!nsh
|
||||
#
|
||||
# Script to configure control interface
|
||||
#
|
||||
|
||||
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
|
||||
|
||||
if [ $MIXER != none -a $MIXER != skip ]
|
||||
then
|
||||
#
|
||||
# Load main mixer
|
||||
#
|
||||
|
||||
# Use the mixer file
|
||||
set MIXER_FILE /etc/mixers/$MIXER.main.mix
|
||||
|
||||
set OUTPUT_DEV /dev/pwm_output0
|
||||
|
||||
if [ $OUTPUT_MODE == tap_esc ]
|
||||
then
|
||||
set OUTPUT_DEV /dev/tap_esc
|
||||
fi
|
||||
|
||||
if mixer load $OUTPUT_DEV $MIXER_FILE
|
||||
then
|
||||
echo "INFO [init] 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
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
|
||||
unset MIXER_FILE
|
||||
else
|
||||
if [ $MIXER != skip ]
|
||||
then
|
||||
echo "ERROR [init] Mixer not defined"
|
||||
echo "ERROR [init] Mixer not defined" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $OUTPUT_MODE == fmu -o $OUTPUT_MODE == io ]
|
||||
then
|
||||
if [ $PWM_OUT != none ]
|
||||
then
|
||||
#
|
||||
# Set PWM output frequency
|
||||
#
|
||||
if [ $PWM_RATE != none ]
|
||||
then
|
||||
pwm rate -c $PWM_OUT -r $PWM_RATE
|
||||
fi
|
||||
|
||||
#
|
||||
# Set disarmed, min and max PWM values
|
||||
#
|
||||
if [ $PWM_DISARMED != none ]
|
||||
then
|
||||
pwm disarmed -c $PWM_OUT -p $PWM_DISARMED
|
||||
fi
|
||||
if [ $PWM_MIN != none ]
|
||||
then
|
||||
pwm min -c $PWM_OUT -p $PWM_MIN
|
||||
fi
|
||||
if [ $PWM_MAX != none ]
|
||||
then
|
||||
pwm max -c $PWM_OUT -p $PWM_MAX
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $FAILSAFE != none ]
|
||||
then
|
||||
pwm failsafe -d $OUTPUT_DEV $FAILSAFE
|
||||
fi
|
||||
fi
|
||||
|
||||
unset PWM_OUT
|
||||
unset PWM_RATE
|
||||
unset PWM_MIN
|
||||
unset PWM_MAX
|
||||
unset FAILSAFE
|
||||
unset OUTPUT_DEV
|
||||
@@ -0,0 +1,17 @@
|
||||
#!nsh
|
||||
#
|
||||
# Standard apps for multirotors:
|
||||
# att & pos estimator, att & pos control.
|
||||
#
|
||||
|
||||
|
||||
ekf2 start
|
||||
|
||||
mc_att_control start
|
||||
|
||||
mc_pos_control start
|
||||
|
||||
#
|
||||
# Start Land Detector
|
||||
#
|
||||
land_detector start multicopter
|
||||
@@ -0,0 +1,38 @@
|
||||
#!nsh
|
||||
|
||||
set VEHICLE_TYPE mc
|
||||
|
||||
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 PWM_DISARMED 900
|
||||
param set PWM_MIN 1075
|
||||
param set PWM_MAX 1950
|
||||
fi
|
||||
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set MIS_TAKEOFF_ALT 2.5
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
param set RTL_LAND_DELAY 0
|
||||
param set MPC_THR_MIN 0.10
|
||||
param set MPC_MANTHR_MIN 0.04
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
@@ -0,0 +1,28 @@
|
||||
#!nsh
|
||||
#
|
||||
# Standard startup script for TAP v1 onboard sensor drivers.
|
||||
#
|
||||
|
||||
if adc start
|
||||
then
|
||||
fi
|
||||
|
||||
if ms5611 -T 5607 -I start
|
||||
then
|
||||
fi
|
||||
|
||||
# External I2C bus
|
||||
if hmc5883 -C -T -X start
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal I2C bus
|
||||
if mpu6000 -I -T 6000 start
|
||||
then
|
||||
fi
|
||||
|
||||
# Wait 50 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
|
||||
usleep 50000
|
||||
if sensors start
|
||||
then
|
||||
fi
|
||||
@@ -0,0 +1,24 @@
|
||||
#!nsh
|
||||
#
|
||||
# Standard apps for vtol:
|
||||
# att & pos estimator, att & pos control.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
#---------------------------------------
|
||||
# Estimator group selction
|
||||
#
|
||||
ekf2 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
|
||||
@@ -0,0 +1,49 @@
|
||||
#!nsh
|
||||
|
||||
set VEHICLE_TYPE vtol
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_YAW_P 4
|
||||
|
||||
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_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
|
||||
@@ -0,0 +1,347 @@
|
||||
#!nsh
|
||||
#
|
||||
# TAP startup script.
|
||||
#
|
||||
# NOTE: COMMENT LINES ARE REMOVED BEFORE STORED IN ROMFS.
|
||||
#
|
||||
|
||||
# Serial map:
|
||||
# /dev/ttyS0: GPS
|
||||
# /dev/ttyS1: GB
|
||||
# /dev/ttyS2: nsh shell / console
|
||||
# /dev/ttyS3: payload
|
||||
# /dev/ttyS4: esc bus
|
||||
# /dev/ttyS5: RC input
|
||||
|
||||
#
|
||||
# Start CDC/ACM serial driver
|
||||
#
|
||||
sercon
|
||||
|
||||
set TUNE_ERR ML<<CP4CP4CP4CP4CP4
|
||||
set LOG_FILE /fs/microsd/bootlog.txt
|
||||
|
||||
#
|
||||
# Try to mount the microSD card.
|
||||
#
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
echo "microSD present"
|
||||
else
|
||||
if mkfatfs /dev/mmcsd0
|
||||
then
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
echo "microSD card formatted"
|
||||
else
|
||||
echo "ERROR [init] Format failed"
|
||||
tone_alarm MNBG
|
||||
set LOG_FILE /dev/null
|
||||
fi
|
||||
else
|
||||
set LOG_FILE /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Start the ORB (first app to start)
|
||||
#
|
||||
uorb start
|
||||
|
||||
#
|
||||
# Load parameters
|
||||
#
|
||||
set PARAM_FILE /fs/microsd/params
|
||||
if mtd start
|
||||
then
|
||||
set PARAM_FILE /fs/mtd_params
|
||||
fi
|
||||
|
||||
param select $PARAM_FILE
|
||||
if param load
|
||||
then
|
||||
else
|
||||
if param reset
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
tone_alarm start
|
||||
|
||||
#
|
||||
# Start system state indicator
|
||||
#
|
||||
if rgbled start
|
||||
then
|
||||
fi
|
||||
|
||||
#
|
||||
# Set parameters and env variables for selected AUTOSTART
|
||||
#
|
||||
if param compare SYS_AUTOSTART 0
|
||||
then
|
||||
param set SYS_AUTOSTART 6001
|
||||
param set SYS_AUTOCONFIG 1
|
||||
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
|
||||
#
|
||||
set VEHICLE_TYPE none
|
||||
set MIXER none
|
||||
set OUTPUT_MODE none
|
||||
set PWM_OUT none
|
||||
set PWM_RATE none
|
||||
set PWM_DISARMED none
|
||||
set PWM_MIN none
|
||||
set PWM_MAX none
|
||||
set FMU_MODE pwm
|
||||
set MAV_TYPE none
|
||||
set FAILSAFE none
|
||||
|
||||
# Start canned airframe config
|
||||
sh /etc/init.d/rc.autostart
|
||||
|
||||
#
|
||||
# If autoconfig parameter was set, reset it and save parameters
|
||||
#
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set SYS_AUTOCONFIG 0
|
||||
param save
|
||||
fi
|
||||
unset AUTOCNF
|
||||
|
||||
#
|
||||
# Set default output if not set
|
||||
#
|
||||
if [ $OUTPUT_MODE == none ]
|
||||
then
|
||||
if [ $USE_IO == yes ]
|
||||
then
|
||||
set OUTPUT_MODE io
|
||||
else
|
||||
set OUTPUT_MODE fmu
|
||||
fi
|
||||
fi
|
||||
|
||||
gps start -d /dev/ttyS0
|
||||
|
||||
# waypoint storage
|
||||
# REBOOTWORK this needs to start in parallel
|
||||
if dataman start
|
||||
then
|
||||
fi
|
||||
|
||||
#
|
||||
# Sensors System (start before Commander so Preflight checks are properly run)
|
||||
#
|
||||
sh /etc/init.d/rc.sensors
|
||||
|
||||
commander start
|
||||
|
||||
#
|
||||
# Start CPU load monitor
|
||||
#
|
||||
load_mon start
|
||||
|
||||
# Start MAVLink on the gimbal port
|
||||
#mavlink start -r 1200 -d /dev/ttyS1
|
||||
|
||||
# Start MAVLink on USB, developers can use the MAVLink shell
|
||||
mavlink start -r 60000 -d /dev/ttyACM0 -m config
|
||||
|
||||
#
|
||||
# Logging
|
||||
#
|
||||
#if logger start -b 2 -t
|
||||
#then
|
||||
#fi
|
||||
|
||||
#
|
||||
# Fixed wing setup
|
||||
#
|
||||
if [ $VEHICLE_TYPE == fw ]
|
||||
then
|
||||
echo "INFO [init] Fixedwing"
|
||||
|
||||
if [ $MIXER == none ]
|
||||
then
|
||||
# Set default mixer for fixed wing if not defined
|
||||
set MIXER AERT
|
||||
fi
|
||||
|
||||
if [ $MAV_TYPE == none ]
|
||||
then
|
||||
# Use MAV_TYPE = 1 (fixed wing) if not defined
|
||||
set MAV_TYPE 1
|
||||
fi
|
||||
|
||||
param set MAV_TYPE $MAV_TYPE
|
||||
|
||||
# Load mixer and configure outputs
|
||||
sh /etc/init.d/rc.interface
|
||||
|
||||
# Start standard fixedwing apps
|
||||
sh /etc/init.d/rc.fw_apps
|
||||
fi
|
||||
|
||||
#
|
||||
# Multicopters setup
|
||||
#
|
||||
if [ $VEHICLE_TYPE == mc ]
|
||||
then
|
||||
echo "INFO [init] Multicopter"
|
||||
|
||||
if [ $MIXER == none ]
|
||||
then
|
||||
echo "INFO [init] Mixer undefined"
|
||||
fi
|
||||
|
||||
if [ $MAV_TYPE == none ]
|
||||
then
|
||||
# Use mixer to detect vehicle type
|
||||
if [ $MIXER == quad_x -o $MIXER == quad_+ ]
|
||||
then
|
||||
set MAV_TYPE 2
|
||||
fi
|
||||
if [ $MIXER == quad_w ]
|
||||
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
|
||||
fi
|
||||
if [ $MIXER == hexa_x -o $MIXER == hexa_+ ]
|
||||
then
|
||||
set MAV_TYPE 13
|
||||
fi
|
||||
if [ $MIXER == hexa_cox ]
|
||||
then
|
||||
set MAV_TYPE 13
|
||||
fi
|
||||
if [ $MIXER == octo_x -o $MIXER == octo_+ ]
|
||||
then
|
||||
set MAV_TYPE 14
|
||||
fi
|
||||
fi
|
||||
|
||||
# Still no MAV_TYPE found
|
||||
if [ $MAV_TYPE == none ]
|
||||
then
|
||||
echo "WARN [init] Unknown MAV_TYPE"
|
||||
param set MAV_TYPE 2
|
||||
else
|
||||
param set MAV_TYPE $MAV_TYPE
|
||||
fi
|
||||
|
||||
# Load mixer and configure outputs
|
||||
sh /etc/init.d/rc.interface
|
||||
|
||||
# Start standard multicopter apps
|
||||
sh /etc/init.d/rc.mc_apps
|
||||
fi
|
||||
|
||||
#
|
||||
# VTOL setup
|
||||
#
|
||||
if [ $VEHICLE_TYPE == vtol ]
|
||||
then
|
||||
echo "INFO [init] VTOL"
|
||||
|
||||
if [ $MIXER == none ]
|
||||
then
|
||||
echo "WARN [init] VTOL mixer undefined"
|
||||
fi
|
||||
|
||||
if [ $MAV_TYPE == none ]
|
||||
then
|
||||
# Use mixer to detect vehicle type
|
||||
if [ $MIXER == caipirinha_vtol ]
|
||||
then
|
||||
set MAV_TYPE 19
|
||||
fi
|
||||
if [ $MIXER == firefly6 ]
|
||||
then
|
||||
set MAV_TYPE 21
|
||||
fi
|
||||
if [ $MIXER == quad_x_pusher_vtol ]
|
||||
then
|
||||
set MAV_TYPE 22
|
||||
fi
|
||||
fi
|
||||
|
||||
# Still no MAV_TYPE found
|
||||
if [ $MAV_TYPE == none ]
|
||||
then
|
||||
echo "WARN [init] Unknown MAV_TYPE"
|
||||
param set MAV_TYPE 19
|
||||
else
|
||||
param set MAV_TYPE $MAV_TYPE
|
||||
fi
|
||||
|
||||
# Load mixer and configure outputs
|
||||
sh /etc/init.d/rc.interface
|
||||
|
||||
# Start standard vtol apps
|
||||
sh /etc/init.d/rc.vtol_apps
|
||||
fi
|
||||
|
||||
#
|
||||
# Rover setup
|
||||
#
|
||||
if [ $VEHICLE_TYPE == rover ]
|
||||
then
|
||||
# 10 is MAV_TYPE_GROUND_ROVER
|
||||
set MAV_TYPE 10
|
||||
|
||||
# Load mixer and configure outputs
|
||||
sh /etc/init.d/rc.interface
|
||||
|
||||
# Start standard rover apps
|
||||
sh /etc/init.d/rc.axialracing_ax10_apps
|
||||
|
||||
param set MAV_TYPE 10
|
||||
fi
|
||||
|
||||
unset MIXER
|
||||
unset MAV_TYPE
|
||||
unset OUTPUT_MODE
|
||||
|
||||
#
|
||||
# Start the RC input driver
|
||||
#
|
||||
if fmu mode_rcin
|
||||
then
|
||||
fi
|
||||
|
||||
#
|
||||
# Start the navigator
|
||||
#
|
||||
if navigator start
|
||||
then
|
||||
fi
|
||||
|
||||
# There is no further script processing, so we can free some RAM
|
||||
# XXX potentially unset all script variables.
|
||||
unset TUNE_ERR
|
||||
|
||||
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
|
||||
mavlink boot_complete
|
||||
@@ -0,0 +1,105 @@
|
||||
## PX4 mixer definitions ##
|
||||
|
||||
Files in this directory implement example mixers that can be used as a basis
|
||||
for customisation, or for general testing purposes.
|
||||
|
||||
For a detailed description of the mixing architecture and examples see:
|
||||
http://px4.io/dev/mixing
|
||||
|
||||
### Syntax ###
|
||||
|
||||
Mixer definitions are text files; lines beginning with a single capital letter
|
||||
followed by a colon are significant. All other lines are ignored, meaning that
|
||||
explanatory text can be freely mixed with the definitions.
|
||||
|
||||
Each file may define more than one mixer; the allocation of mixers to actuators
|
||||
is specific to the device reading the mixer definition, and the number of
|
||||
actuator outputs generated by a mixer is specific to the mixer.
|
||||
|
||||
For example: each simple or null mixer is assigned to outputs 1 to x
|
||||
in the order they appear in the mixer file.
|
||||
|
||||
A mixer begins with a line of the form
|
||||
|
||||
<tag>: <mixer arguments>
|
||||
|
||||
The tag selects the mixer type; 'M' for a simple summing mixer, 'R' for a
|
||||
multirotor mixer, etc.
|
||||
|
||||
#### Null Mixer ####
|
||||
|
||||
A null mixer consumes no controls and generates a single actuator output whose
|
||||
value is always zero. Typically a null mixer is used as a placeholder in a
|
||||
collection of mixers in order to achieve a specific pattern of actuator outputs.
|
||||
|
||||
The null mixer definition has the form:
|
||||
|
||||
Z:
|
||||
|
||||
#### Simple Mixer ####
|
||||
|
||||
A simple mixer combines zero or more control inputs into a single actuator
|
||||
output. Inputs are scaled, and the mixing function sums the result before
|
||||
applying an output scaler.
|
||||
|
||||
A simple mixer definition begins with:
|
||||
|
||||
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
|
||||
limit>.
|
||||
|
||||
The second line defines the output scaler with scaler parameters as discussed
|
||||
above. Whilst the calculations are performed as floating-point operations, the
|
||||
values stored in the definition file are scaled by a factor of 10000; i.e. an
|
||||
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>
|
||||
|
||||
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
|
||||
the device reading the mixer definition.
|
||||
|
||||
When used to mix vehicle controls, mixer group zero is the vehicle attitude
|
||||
control group, and index values zero through three are normally roll, pitch,
|
||||
yaw and thrust respectively.
|
||||
|
||||
The remaining fields on the line configure the control scaler with parameters as
|
||||
discussed above. Whilst the calculations are performed as floating-point
|
||||
operations, the values stored in the definition file are scaled by a factor of
|
||||
10000; i.e. an offset of -0.5 is encoded as -5000.
|
||||
|
||||
#### Multirotor Mixer ####
|
||||
|
||||
The multirotor mixer combines four control inputs (roll, pitch, yaw, thrust)
|
||||
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>
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
are performed as floating-point operations, the values stored in the definition
|
||||
file are scaled by a factor of 10000; i.e. an factor of 0.5 is encoded as 5000.
|
||||
|
||||
Roll, pitch and yaw inputs are expected to range from -1.0 to 1.0, whilst the
|
||||
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.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Hexa X
|
||||
|
||||
R: 6x 10000 10000 10000 0
|
||||
@@ -0,0 +1,7 @@
|
||||
R: 4x 10000 10000 10000 0
|
||||
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
|
||||
@@ -16,8 +16,14 @@ then
|
||||
echo
|
||||
|
||||
rm -f $file.pretty
|
||||
echo $file 'bad formatting, please run "./Tools/fix_code_style.sh' $file'"'
|
||||
exit 1
|
||||
|
||||
if [[ $PX4_ASTYLE_FIX -eq 1 ]]
|
||||
then
|
||||
${DIR}/fix_code_style.sh $file
|
||||
else
|
||||
echo $file 'bad formatting, please run "./Tools/fix_code_style.sh' $file'"'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,45 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
failed=0
|
||||
|
||||
if [[ "$@" == "--fix" ]]
|
||||
then
|
||||
export PX4_ASTYLE_FIX=1
|
||||
fi
|
||||
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
find \
|
||||
src/drivers \
|
||||
src/examples \
|
||||
src/firmware \
|
||||
src/include \
|
||||
src/lib/controllib \
|
||||
src/lib/conversion \
|
||||
src/lib/geo \
|
||||
src/lib/geo_lookup \
|
||||
src/lib/launchdetection \
|
||||
src/lib/rc \
|
||||
src/lib/tailsitter_recovery \
|
||||
src/lib/terrain_estimation \
|
||||
src/lib/version \
|
||||
src/modules/attitude_estimator_q \
|
||||
src/modules/bottle_drop \
|
||||
src/modules/controllib_test \
|
||||
src/modules/dataman \
|
||||
src/modules/fw_att_control \
|
||||
src/modules/gpio_led \
|
||||
src/modules/land_detector \
|
||||
src/modules/local_position_estimator \
|
||||
src/modules/logger \
|
||||
src/modules/mavlink/mavlink_tests \
|
||||
src/modules/muorb \
|
||||
src/modules/param \
|
||||
src/modules/px4iofirmware \
|
||||
src/modules/segway \
|
||||
src/modules/sensors \
|
||||
src/modules/simulator \
|
||||
src/modules/systemlib \
|
||||
src/modules/unit_test \
|
||||
src/modules/uORB \
|
||||
src/modules/vtol_att_control \
|
||||
src/platforms \
|
||||
src/systemcmds \
|
||||
find src \
|
||||
-path src/lib/DriverFramework -prune -o \
|
||||
-path src/lib/ecl -prune -o \
|
||||
-path src/lib/external_lgpl -prune -o \
|
||||
-path src/lib/mathlib -prune -o \
|
||||
-path src/lib/matrix -prune -o \
|
||||
-path src/modules/attitude_estimator_ekf -prune -o \
|
||||
-path src/modules/commander -prune -o \
|
||||
-path src/examples/ekf_att_pos_estimator -prune -o \
|
||||
-path src/modules/mavlink -prune -o \
|
||||
-path src/examples/attitude_estimator_ekf -prune -o \
|
||||
-path src/modules/navigator -prune -o \
|
||||
-path src/modules/sdlog2 -prune -o \
|
||||
-path src/modules/uavcan -prune -o \
|
||||
-path src/modules/uavcan/libuavcan -prune -o \
|
||||
-type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) \
|
||||
-not -name '*generated.h' \
|
||||
-not -name '*uthash.h' \
|
||||
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
while getopts "b:t:" opt; do
|
||||
case "${opt}" in
|
||||
b)
|
||||
builddir=$OPTARG
|
||||
;;
|
||||
t)
|
||||
tool=$OPTARG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "builddir = ${builddir}, tool = ${tool}"
|
||||
|
||||
case "${builddir}" in
|
||||
"build_posix_rpi_cross")
|
||||
CXX_INC=$(cd ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/include/c++/*; pwd)
|
||||
EXTRA_ARG1=-I${CXX_INC}
|
||||
EXTRA_ARG2=-I${CXX_INC}/arm-linux-gnueabihf
|
||||
EXTRA_ARG3=-I${CXX_INC}/backward
|
||||
extra_args="--extra-arg=-I${CXX_INC} --extra-arg=-I${CXX_INC}/arm-linux-gnueabihf --extra-arg=-I${CXX_INC}/backward"
|
||||
;;
|
||||
"build_posix_sitl_default")
|
||||
;;
|
||||
*)
|
||||
echo "unknown build dir: ${builddir}"
|
||||
;;
|
||||
esac
|
||||
|
||||
COMPILE_DB=$(/bin/pwd)/${builddir}
|
||||
if [[ ! -f ${COMPILE_DB}/compile_commands.json ]]; then
|
||||
echo "compile_commands.json not found in ${COMPILE_DB}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "${tool}" in
|
||||
"clang-check")
|
||||
command=clang-check;
|
||||
option=-analyze;
|
||||
;;
|
||||
"clang-tidy")
|
||||
command=clang-tidy
|
||||
;;
|
||||
esac
|
||||
|
||||
grep file ${COMPILE_DB}/compile_commands.json |
|
||||
awk '{ print $2; }' |
|
||||
sed 's/\"//g' |
|
||||
while read FILE; do
|
||||
(cd $(dirname ${FILE});
|
||||
${command} ${option} -p ${COMPILE_DB} ${extra_args} $(basename ${FILE})
|
||||
);
|
||||
done
|
||||
@@ -43,10 +43,10 @@ import subprocess
|
||||
# If the following lines were pasted into the shell after running decode_backtrace.py
|
||||
#
|
||||
# INFO Backtrace: 10
|
||||
# INFO ./mainapp(px4_backtrace+0x27) [0x42b212]
|
||||
# INFO ./mainapp() [0x42d608]
|
||||
# INFO ./mainapp() [0x42d57e]
|
||||
# INFO ./mainapp() [0x4ba48d]
|
||||
# INFO ./px4(px4_backtrace+0x27) [0x42b212]
|
||||
# INFO ./px4() [0x42d608]
|
||||
# INFO ./px4() [0x42d57e]
|
||||
# INFO ./px4() [0x4ba48d]
|
||||
#
|
||||
# The output would be:
|
||||
#
|
||||
@@ -63,7 +63,7 @@ def usage():
|
||||
msg = """
|
||||
Usage: Tools/decode_backtrace.py <builddir>
|
||||
|
||||
This will load the symbols for <builddir>/src/firmware/posix/mainapp
|
||||
This will load the symbols for <builddir>/src/firmware/posix/px4
|
||||
The user just needs to copy and paste the backtrace into the terminal
|
||||
where decode_backtrace.py is running.
|
||||
|
||||
@@ -75,7 +75,7 @@ func = []
|
||||
|
||||
# Load the symbols from the binary
|
||||
def load_symbol_map():
|
||||
output = subprocess.check_output(["nm", "-p", "-C", os.sys.argv[1]+"/src/firmware/posix/mainapp"])
|
||||
output = subprocess.check_output(["nm", "-p", "-C", os.sys.argv[1]+"/src/firmware/posix/px4"])
|
||||
data = output.split("\n")
|
||||
data.sort()
|
||||
|
||||
|
||||
@@ -115,7 +115,6 @@ print("""
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifndef PRIu64
|
||||
|
||||
Executable
+206
@@ -0,0 +1,206 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Open a shell over MAVLink.
|
||||
|
||||
@author: Beat Kueng (beat-kueng@gmx.net)
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import print_function
|
||||
import sys, select
|
||||
import termios
|
||||
|
||||
try:
|
||||
from pymavlink import mavutil
|
||||
import serial
|
||||
except:
|
||||
print("Failed to import pymavlink.")
|
||||
print("You may need to install it with 'pip install pymavlink pyserial'")
|
||||
exit(-1)
|
||||
from argparse import ArgumentParser
|
||||
|
||||
|
||||
class MavlinkSerialPort():
|
||||
'''an object that looks like a serial port, but
|
||||
transmits using mavlink SERIAL_CONTROL packets'''
|
||||
def __init__(self, portname, baudrate, devnum=0, debug=0):
|
||||
self.baudrate = 0
|
||||
self._debug = debug
|
||||
self.buf = ''
|
||||
self.port = devnum
|
||||
self.debug("Connecting with MAVLink to %s ..." % portname)
|
||||
self.mav = mavutil.mavlink_connection(portname, autoreconnect=True, baud=baudrate)
|
||||
self.mav.wait_heartbeat()
|
||||
self.debug("HEARTBEAT OK\n")
|
||||
self.debug("Locked serial device\n")
|
||||
|
||||
def debug(self, s, level=1):
|
||||
'''write some debug text'''
|
||||
if self._debug >= level:
|
||||
print(s)
|
||||
|
||||
def write(self, b):
|
||||
'''write some bytes'''
|
||||
self.debug("sending '%s' (0x%02x) of len %u\n" % (b, ord(b[0]), len(b)), 2)
|
||||
while len(b) > 0:
|
||||
n = len(b)
|
||||
if n > 70:
|
||||
n = 70
|
||||
buf = [ord(x) for x in b[:n]]
|
||||
buf.extend([0]*(70-len(buf)))
|
||||
self.mav.mav.serial_control_send(self.port,
|
||||
mavutil.mavlink.SERIAL_CONTROL_FLAG_EXCLUSIVE |
|
||||
mavutil.mavlink.SERIAL_CONTROL_FLAG_RESPOND,
|
||||
0,
|
||||
0,
|
||||
n,
|
||||
buf)
|
||||
b = b[n:]
|
||||
|
||||
def close(self):
|
||||
self.mav.mav.serial_control_send(self.port, 0, 0, 0, 0, [0]*70)
|
||||
|
||||
def _recv(self):
|
||||
'''read some bytes into self.buf'''
|
||||
m = self.mav.recv_match(condition='SERIAL_CONTROL.count!=0',
|
||||
type='SERIAL_CONTROL', blocking=True,
|
||||
timeout=0.03)
|
||||
if m is not None:
|
||||
if self._debug > 2:
|
||||
print(m)
|
||||
data = m.data[:m.count]
|
||||
self.buf += ''.join(str(chr(x)) for x in data)
|
||||
|
||||
def read(self, n):
|
||||
'''read some bytes'''
|
||||
if len(self.buf) == 0:
|
||||
self._recv()
|
||||
if len(self.buf) > 0:
|
||||
if n > len(self.buf):
|
||||
n = len(self.buf)
|
||||
ret = self.buf[:n]
|
||||
self.buf = self.buf[n:]
|
||||
if self._debug >= 2:
|
||||
for b in ret:
|
||||
self.debug("read 0x%x" % ord(b), 2)
|
||||
return ret
|
||||
return ''
|
||||
|
||||
|
||||
def main():
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
parser.add_argument('port', metavar='PORT', nargs='?', default = None,
|
||||
help='Mavlink port name: serial: DEVICE[,BAUD], udp: IP:PORT, tcp: tcp:IP:PORT. Eg: \
|
||||
/dev/ttyUSB0 or 0.0.0.0:14550. Auto-detect serial if not given.')
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int,
|
||||
help="Mavlink port baud rate (default=115200)", default=115200)
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
if args.port == None:
|
||||
serial_list = mavutil.auto_detect_serial(preferred_list=['*FTDI*',
|
||||
"*Arduino_Mega_2560*", "*3D_Robotics*", "*USB_to_UART*", '*PX4*', '*FMU*'])
|
||||
|
||||
if len(serial_list) == 0:
|
||||
print("Error: no serial connection found")
|
||||
return
|
||||
|
||||
if len(serial_list) > 1:
|
||||
print('Auto-detected serial ports are:')
|
||||
for port in serial_list:
|
||||
print(" {:}".format(port))
|
||||
print('Using port {:}'.format(serial_list[0]))
|
||||
args.port = serial_list[0].device
|
||||
|
||||
|
||||
print("Connecting to MAVLINK...")
|
||||
mav_serialport = MavlinkSerialPort(args.port, args.baudrate, devnum=10)
|
||||
|
||||
mav_serialport.write('\n') # make sure the shell is started
|
||||
|
||||
# setup the console, so we can read one char at a time
|
||||
fd_in = sys.stdin.fileno()
|
||||
old_attr = termios.tcgetattr(fd_in)
|
||||
new_attr = termios.tcgetattr(fd_in)
|
||||
new_attr[3] = new_attr[3] & ~termios.ECHO # lflags
|
||||
new_attr[3] = new_attr[3] & ~termios.ICANON
|
||||
|
||||
try:
|
||||
termios.tcsetattr(fd_in, termios.TCSANOW, new_attr)
|
||||
cur_line = ''
|
||||
command_history = []
|
||||
cur_history_index = 0
|
||||
|
||||
def erase_last_n_chars(N):
|
||||
if N == 0: return
|
||||
CURSOR_BACK_N = '\x1b['+str(N)+'D'
|
||||
ERASE_END_LINE = '\x1b[K'
|
||||
sys.stdout.write(CURSOR_BACK_N + ERASE_END_LINE)
|
||||
|
||||
while True:
|
||||
while True:
|
||||
i, o, e = select.select([sys.stdin], [], [], 0)
|
||||
if not i: break
|
||||
ch = sys.stdin.read(1)
|
||||
|
||||
# provide a simple shell with command history
|
||||
if ch == '\n':
|
||||
if len(cur_line) > 0:
|
||||
# erase current text (mavlink shell will echo it as well)
|
||||
erase_last_n_chars(len(cur_line))
|
||||
|
||||
# add to history
|
||||
if len(command_history) == 0 or command_history[-1] != cur_line:
|
||||
command_history.append(cur_line)
|
||||
if len(command_history) > 50:
|
||||
del command_history[0]
|
||||
cur_history_index = len(command_history)
|
||||
mav_serialport.write(cur_line+'\n')
|
||||
cur_line = ''
|
||||
elif ord(ch) == 127: # backslash
|
||||
if len(cur_line) > 0:
|
||||
erase_last_n_chars(1)
|
||||
cur_line = cur_line[:-1]
|
||||
sys.stdout.write(ch)
|
||||
elif ord(ch) == 033:
|
||||
ch = sys.stdin.read(1) # skip one
|
||||
ch = sys.stdin.read(1)
|
||||
if ch == 'A': # arrow up
|
||||
if cur_history_index > 0:
|
||||
cur_history_index -= 1
|
||||
elif ch == 'B': # arrow down
|
||||
if cur_history_index < len(command_history):
|
||||
cur_history_index += 1
|
||||
# TODO: else: support line editing
|
||||
|
||||
erase_last_n_chars(len(cur_line))
|
||||
if cur_history_index == len(command_history):
|
||||
cur_line = ''
|
||||
else:
|
||||
cur_line = command_history[cur_history_index]
|
||||
sys.stdout.write(cur_line)
|
||||
|
||||
elif ord(ch) > 3:
|
||||
cur_line += ch
|
||||
sys.stdout.write(ch)
|
||||
sys.stdout.flush()
|
||||
|
||||
data = mav_serialport.read(4096)
|
||||
if data and len(data) > 0:
|
||||
sys.stdout.write(data)
|
||||
sys.stdout.flush()
|
||||
|
||||
except serial.serialutil.SerialException as e:
|
||||
print(e)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
mav_serialport.close()
|
||||
|
||||
finally:
|
||||
termios.tcsetattr(fd_in, termios.TCSADRAIN, old_attr)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -69,6 +69,8 @@ class XMLOutput():
|
||||
xml_group.attrib["image"] = "VTOLTiltRotor"
|
||||
elif (group.GetName() == "Coaxial Helicopter"):
|
||||
xml_group.attrib["image"] = "HelicopterCoaxial"
|
||||
elif (group.GetName() == "Helicopter"):
|
||||
xml_group.attrib["image"] = "Helicopter"
|
||||
elif (group.GetName() == "Hexarotor Coaxial"):
|
||||
xml_group.attrib["image"] = "Y6A"
|
||||
elif (group.GetName() == "Y6B"):
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import sys
|
||||
import re
|
||||
import math
|
||||
|
||||
global default_var
|
||||
default_var = {}
|
||||
|
||||
@@ -39,7 +41,7 @@ class Parameter(object):
|
||||
|
||||
# Define sorting order of the fields
|
||||
priority = {
|
||||
"board": 9,
|
||||
"board": 9,
|
||||
"short_desc": 8,
|
||||
"long_desc": 7,
|
||||
"min": 5,
|
||||
@@ -52,6 +54,7 @@ class Parameter(object):
|
||||
def __init__(self, name, type, default = ""):
|
||||
self.fields = {}
|
||||
self.values = {}
|
||||
self.bitmask = {}
|
||||
self.name = name
|
||||
self.type = type
|
||||
self.default = default
|
||||
@@ -77,6 +80,12 @@ class Parameter(object):
|
||||
"""
|
||||
self.values[code] = value
|
||||
|
||||
def SetBitmaskBit(self, index, bit):
|
||||
"""
|
||||
Set named enum value
|
||||
"""
|
||||
self.bitmask[index] = bit
|
||||
|
||||
def GetFieldCodes(self):
|
||||
"""
|
||||
Return list of existing field codes in convenient order
|
||||
@@ -115,6 +124,24 @@ class Parameter(object):
|
||||
return ""
|
||||
return fv
|
||||
|
||||
def GetBitmaskList(self):
|
||||
"""
|
||||
Return list of existing bitmask codes in convenient order
|
||||
"""
|
||||
keys = self.bitmask.keys()
|
||||
keys.sort(key=float)
|
||||
return keys
|
||||
|
||||
def GetBitmaskBit(self, index):
|
||||
"""
|
||||
Return value of the given bitmask code or None if not found.
|
||||
"""
|
||||
fv = self.bitmask.get(index)
|
||||
if not fv:
|
||||
# required because python 3 sorted does not accept None
|
||||
return ""
|
||||
return fv
|
||||
|
||||
class SourceParser(object):
|
||||
"""
|
||||
Parses provided data and stores all found parameters internally.
|
||||
@@ -133,7 +160,7 @@ class SourceParser(object):
|
||||
re_remove_dots = re.compile(r'\.+$')
|
||||
re_remove_carriage_return = re.compile('\n+')
|
||||
|
||||
valid_tags = set(["group", "board", "min", "max", "unit", "decimal", "increment", "reboot_required", "value", "boolean"])
|
||||
valid_tags = set(["group", "board", "min", "max", "unit", "decimal", "increment", "reboot_required", "value", "boolean", "bit"])
|
||||
|
||||
# Order of parameter groups
|
||||
priority = {
|
||||
@@ -164,6 +191,7 @@ class SourceParser(object):
|
||||
long_desc = None
|
||||
tags = {}
|
||||
def_values = {}
|
||||
def_bitmask = {}
|
||||
elif state is not None and state != "comment-processed":
|
||||
m = self.re_comment_end.search(line)
|
||||
if m:
|
||||
@@ -187,6 +215,10 @@ class SourceParser(object):
|
||||
# Take the meta info string and split the code and description
|
||||
metainfo = desc.split(" ", 1)
|
||||
def_values[metainfo[0]] = metainfo[1]
|
||||
elif (tag == "bit"):
|
||||
# Take the meta info string and split the code and description
|
||||
metainfo = desc.split(" ", 1)
|
||||
def_bitmask[metainfo[0]] = metainfo[1]
|
||||
else:
|
||||
tags[tag] = desc
|
||||
current_tag = tag
|
||||
@@ -262,6 +294,8 @@ class SourceParser(object):
|
||||
param.SetField(tag, tags[tag])
|
||||
for def_value in def_values:
|
||||
param.SetEnumValue(def_value, def_values[def_value])
|
||||
for def_bit in def_bitmask:
|
||||
param.SetBitmaskBit(def_bit, def_bitmask[def_bit])
|
||||
# Store the parameter
|
||||
if group not in self.param_groups:
|
||||
self.param_groups[group] = ParameterGroup(group)
|
||||
@@ -324,6 +358,16 @@ class SourceParser(object):
|
||||
if param.GetEnumValue(code) == "":
|
||||
sys.stderr.write("Description for enum value is empty: {0} {1}\n".format(name, code))
|
||||
return False
|
||||
for index in param.GetBitmaskList():
|
||||
if not self.IsNumber(index):
|
||||
sys.stderr.write("bit value not number: {0} {1}\n".format(name, index))
|
||||
return False
|
||||
if not int(min) <= math.pow(2, int(index)) <= int(max):
|
||||
sys.stderr.write("Bitmask bit must be between {0} and {1}: {2} {3}\n".format(min, max, name, math.pow(2, int(index))))
|
||||
return False
|
||||
if param.GetBitmaskBit(index) == "":
|
||||
sys.stderr.write("Description for bitmask bit is empty: {0} {1}\n".format(name, index))
|
||||
return False
|
||||
return True
|
||||
|
||||
def GetParamGroups(self):
|
||||
|
||||
@@ -63,6 +63,14 @@ class XMLOutput():
|
||||
xml_value = ET.SubElement(xml_values, "value")
|
||||
xml_value.attrib["code"] = code;
|
||||
xml_value.text = param.GetEnumValue(code)
|
||||
|
||||
if len(param.GetBitmaskList()) > 0:
|
||||
xml_values = ET.SubElement(xml_param, "bitmask")
|
||||
for index in param.GetBitmaskList():
|
||||
xml_value = ET.SubElement(xml_values, "bit")
|
||||
xml_value.attrib["index"] = index;
|
||||
xml_value.text = param.GetBitmaskBit(index)
|
||||
|
||||
indent(xml_parameters)
|
||||
self.xml_document = ET.ElementTree(xml_parameters)
|
||||
|
||||
|
||||
@@ -8,6 +8,22 @@ logconv.m: This is a MATLAB script which will automatically convert and display
|
||||
|
||||
sdlog2_dump.py: This is a Python script (compatible with v2 and v3) which converts the self-describing binary log format to a CSV file. To export a CSV file from within a shell (Windows CMD or BASH on Linux / Mac OS), run:
|
||||
|
||||
```
|
||||
python sdlog2_dump.py log001.bin -f "export.csv" -t "TIME" -d "," -n ""
|
||||
```
|
||||
|
||||
Python can be downloaded from http://python.org, but is available as default on Mac OS and Linux.
|
||||
geo_tag_images.py: Use this script to geotag a set of images. It uses GPS time and file creation date to synchronize the images, so it needs that the images have a valid creation date. Can generate a KML file to view where the photos were taken in Google Earth (including height).
|
||||
|
||||
```sh
|
||||
python geo_tag_images.py --logfile=mylog.bin --input=images/ --output=tagged/ --kml -v
|
||||
|
||||
python geo_tag_images.py -l=mylog.bin -i=images/ -o=tagged/ --kml -v
|
||||
```
|
||||
|
||||
geotagging.py: Use this script to geotag a set of images. It uses the CAM trigger data from the log file for image association.
|
||||
|
||||
```sh
|
||||
python geotagging.py --logfile=mylog.bin --input=images/ --output=tagged/
|
||||
```
|
||||
|
||||
Python can be downloaded from http://python.org, but is available as default on Mac OS and Linux.
|
||||
@@ -0,0 +1,404 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Tag the images recorded during a flight with geo location extracted from
|
||||
# a PX4 binary log file.
|
||||
#
|
||||
# This file accepts *.jpg format images and reads position information
|
||||
# from a *.bin file
|
||||
#
|
||||
# Example Syntax:
|
||||
# python geotag.py --logfile=log001.bin --input=images/ --output=imagesWithTag/ --offset=-0.4 -v
|
||||
#
|
||||
# Author: Hector Azpurua hector@azpurua.com
|
||||
# Based on the script of Andreas Bircher
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import csv
|
||||
import bisect
|
||||
import pyexiv2
|
||||
import argparse
|
||||
from lxml import etree
|
||||
import datetime, calendar
|
||||
from shutil import copyfile
|
||||
from subprocess import check_output
|
||||
from pykml.factory import KML_ElementMaker as KML
|
||||
from pykml.factory import GX_ElementMaker as GX
|
||||
|
||||
|
||||
class GpsPosition(object):
|
||||
def __init__(self, timestamp, lat, lon, alt):
|
||||
self.timestamp = timestamp
|
||||
self.lat = float(lat)
|
||||
self.lon = float(lon)
|
||||
self.alt = float(alt)
|
||||
|
||||
|
||||
class Main:
|
||||
def __init__(self):
|
||||
"""
|
||||
|
||||
:param logfile:
|
||||
:param input:
|
||||
:param output:
|
||||
:param offset:
|
||||
:param verbose:
|
||||
:return:
|
||||
"""
|
||||
args = self.get_arg()
|
||||
|
||||
self.logfile = args['logfile']
|
||||
self.input = args['input']
|
||||
self.output = args['output']
|
||||
self.kml = args['kml']
|
||||
self.verbose = args['verbose']
|
||||
self.offset = args['offset']
|
||||
self.time_tresh = args['treshold']
|
||||
|
||||
self.tdiff_list = []
|
||||
self.non_processed_files = []
|
||||
self.tagged_gps = []
|
||||
|
||||
print '[INFO] Loading logs and images locations...'
|
||||
|
||||
self.gps_list = self.load_gps_from_log(self.logfile, self.offset)
|
||||
self.img_list = self.load_image_list(self.input)
|
||||
|
||||
if len(self.img_list) <= 0:
|
||||
print '[ERROR] Cannot load JPG images from input folder, please check filename extensions.'
|
||||
sys.exit(1)
|
||||
|
||||
if not os.path.exists(self.output):
|
||||
os.makedirs(self.output)
|
||||
|
||||
if not self.output.endswith(os.path.sep):
|
||||
self.output += os.path.sep
|
||||
|
||||
self.tag_images()
|
||||
|
||||
if self.kml and len(self.tdiff_list) > 0:
|
||||
self.gen_kml()
|
||||
|
||||
if len(self.non_processed_files) > 0:
|
||||
print '[WARNING] Some images werent processed (', len(self.non_processed_files), 'of', len(self.img_list), '):'
|
||||
for elem in self.non_processed_files:
|
||||
print '\t', elem
|
||||
|
||||
@staticmethod
|
||||
def to_degree(value, loc):
|
||||
"""
|
||||
Convert a lat or lon value to degrees/minutes/seconds
|
||||
:param value: the latitude or longitude value
|
||||
:param loc: could be ["S", "N"] or ["W", "E"]
|
||||
:return:
|
||||
"""
|
||||
if value < 0:
|
||||
loc_value = loc[0]
|
||||
elif value > 0:
|
||||
loc_value = loc[1]
|
||||
else:
|
||||
loc_value = ""
|
||||
|
||||
absolute_value = abs(value)
|
||||
deg = int(absolute_value)
|
||||
t1 = (absolute_value-deg) * 60
|
||||
minute = int(t1)
|
||||
sec = round((t1 - minute) * 60, 5)
|
||||
|
||||
return deg, minute, sec, loc_value
|
||||
|
||||
@staticmethod
|
||||
def gps_week_seconds_to_datetime(gpsweek, gpsmillis, leapmillis=0):
|
||||
"""
|
||||
Convert GPS week and seconds to datetime object, using leap milliseconds if necessary
|
||||
:param gpsweek:
|
||||
:param gpsmillis:
|
||||
:param leapmillis:
|
||||
:return:
|
||||
"""
|
||||
datetimeformat = "%Y-%m-%d %H:%M:%S.%f"
|
||||
epoch = datetime.datetime.strptime("1980-01-06 00:00:00.000", datetimeformat)
|
||||
elapsed = datetime.timedelta(days=(gpsweek * 7), milliseconds=(gpsmillis + leapmillis))
|
||||
|
||||
return Main.utc_to_local(epoch + elapsed)
|
||||
|
||||
@staticmethod
|
||||
def utc_to_local(utc_dt):
|
||||
"""
|
||||
Convert UTC time in local time
|
||||
:param utc_dt:
|
||||
:return:
|
||||
"""
|
||||
timestamp = calendar.timegm(utc_dt.timetuple()) # use integer timestamp to avoid precision lost
|
||||
local_dt = datetime.datetime.fromtimestamp(timestamp)
|
||||
assert utc_dt.resolution >= datetime.timedelta(microseconds=1)
|
||||
|
||||
return local_dt.replace(microsecond=utc_dt.microsecond)
|
||||
|
||||
def gen_kml(self):
|
||||
"""
|
||||
Generate a KML file with keypoints on the locations of the pictures, including height
|
||||
:return:
|
||||
"""
|
||||
style_dot = "sn_shaded_dot"
|
||||
style_path = "red_path"
|
||||
|
||||
doc = KML.kml(
|
||||
KML.Document(
|
||||
KML.Name("GPS of the images"),
|
||||
KML.Style(
|
||||
KML.IconStyle(
|
||||
KML.scale(0.4),
|
||||
KML.Icon(
|
||||
KML.href("http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png")
|
||||
),
|
||||
),
|
||||
id=style_dot,
|
||||
),
|
||||
KML.Style(
|
||||
KML.LineStyle(
|
||||
KML.color('7f0000ff'),
|
||||
KML.width(6),
|
||||
GX.labelVisibility('1'),
|
||||
),
|
||||
id=style_path
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
# create points
|
||||
for i, gps in enumerate(self.tagged_gps):
|
||||
ii = i + 1
|
||||
doc.Document.append(
|
||||
KML.Placemark(
|
||||
KML.styleUrl('#{0}'.format(style_dot)),
|
||||
KML.Point(
|
||||
KML.extrude(True),
|
||||
KML.altitudeMode('absolute'),
|
||||
KML.coordinates("{},{},{}".format(gps.lon, gps.lat, gps.alt))
|
||||
),
|
||||
KML.name(str(ii)) if ii % 5 == 0 or ii == 1 else KML.name()
|
||||
)
|
||||
)
|
||||
|
||||
# create the path
|
||||
doc.Document.append(
|
||||
KML.Placemark(
|
||||
KML.styleUrl('#{0}'.format(style_path)),
|
||||
KML.LineString(
|
||||
KML.altitudeMode('absolute'),
|
||||
KML.coordinates(
|
||||
' '.join(["{},{},{}".format(gps.lon, gps.lat, gps.alt) for gps in self.tagged_gps])
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
s = etree.tostring(doc)
|
||||
|
||||
file_path = self.output + 'GoogleEarth_points.kml'
|
||||
f = open(file_path,'w')
|
||||
f.write(s)
|
||||
f.close()
|
||||
|
||||
print '[INFO] KML file generated on:', file_path
|
||||
|
||||
def get_closest_datetime_index(self, datetime_list, elem):
|
||||
"""
|
||||
Get the closest element between a list of datetime objects and a date
|
||||
:param datetime_list:
|
||||
:param elem:
|
||||
:return:
|
||||
"""
|
||||
dlist_len = len(datetime_list)
|
||||
|
||||
i = bisect.bisect_left(datetime_list, elem)
|
||||
|
||||
# Cleanup of the indices
|
||||
if i < 0:
|
||||
i = 0
|
||||
elif i >= dlist_len:
|
||||
i = dlist_len - 1
|
||||
|
||||
date = datetime_list[i]
|
||||
diff = abs((date - elem).total_seconds())
|
||||
|
||||
if diff > self.time_tresh:
|
||||
return -1, diff
|
||||
|
||||
return i, diff
|
||||
|
||||
def set_gps_location(self, file_name, lat, lng, alt):
|
||||
"""
|
||||
Add the GPS tag and altitude to a image file
|
||||
:param file_name:
|
||||
:param lat:
|
||||
:param lng:
|
||||
:param alt:
|
||||
:return:
|
||||
"""
|
||||
lat_deg = self.to_degree(lat, ["S", "N"])
|
||||
lng_deg = self.to_degree(lng, ["W", "E"])
|
||||
|
||||
exiv_lat = (pyexiv2.Rational(lat_deg[0] * 60 + lat_deg[1], 60),
|
||||
pyexiv2.Rational(lat_deg[2] * 100, 6000), pyexiv2.Rational(0, 1))
|
||||
exiv_lng = (pyexiv2.Rational(lng_deg[0] * 60 + lng_deg[1], 60),
|
||||
pyexiv2.Rational(lng_deg[2] * 100, 6000), pyexiv2.Rational(0, 1))
|
||||
|
||||
try:
|
||||
exiv_image = pyexiv2.ImageMetadata(file_name)
|
||||
exiv_image.read()
|
||||
|
||||
exiv_image["Exif.GPSInfo.GPSLatitude"] = exiv_lat
|
||||
exiv_image["Exif.GPSInfo.GPSLatitudeRef"] = lat_deg[3]
|
||||
exiv_image["Exif.GPSInfo.GPSLongitude"] = exiv_lng
|
||||
exiv_image["Exif.GPSInfo.GPSLongitudeRef"] = lng_deg[3]
|
||||
exiv_image["Exif.GPSInfo.GPSAltitude"] = pyexiv2.Rational(alt, 1)
|
||||
exiv_image["Exif.GPSInfo.GPSAltitudeRef"] = '0'
|
||||
exiv_image["Exif.Image.GPSTag"] = 654
|
||||
exiv_image["Exif.GPSInfo.GPSMapDatum"] = "WGS-84"
|
||||
exiv_image["Exif.GPSInfo.GPSVersionID"] = '2 0 0 0'
|
||||
|
||||
exiv_image.write(True)
|
||||
except Exception as e:
|
||||
print '[ERROR]', e
|
||||
|
||||
def load_gps_from_log(self, log_file, offset):
|
||||
"""
|
||||
Load gps list from PX4 binary log
|
||||
:param log_file:
|
||||
:param offset:
|
||||
:return:
|
||||
"""
|
||||
gps_list = []
|
||||
out = check_output(["python", "sdlog2_dump.py", log_file, "-m GPS", "-v"])
|
||||
|
||||
for line in out.splitlines():
|
||||
if not line.startswith("MSG GPS:"):
|
||||
continue
|
||||
|
||||
vdict = {}
|
||||
pairs = re.split(r'[;,:]\s*', line)
|
||||
for pair in pairs:
|
||||
e = pair.split('=')
|
||||
if len(e) == 2:
|
||||
vdict[e[0]] = float(e[1])
|
||||
|
||||
gps_time = vdict['TimeMS']
|
||||
gps_week = vdict['Week']
|
||||
gps_lat = vdict['Lat']
|
||||
gps_lon = vdict['Lng']
|
||||
gps_alt = vdict['Alt']
|
||||
|
||||
date = self.gps_week_seconds_to_datetime(gps_week, gps_time, leapmillis=offset)
|
||||
gps_list.append(GpsPosition(date, gps_lat, gps_lon, gps_alt))
|
||||
|
||||
return gps_list
|
||||
|
||||
def get_image_creation_date(self, filename):
|
||||
exiv_image = pyexiv2.ImageMetadata(filename)
|
||||
exiv_image.read()
|
||||
|
||||
# Prefer DateTime/Original over the other values
|
||||
if 'Exif.Photo.DateTimeOriginal' in exiv_image:
|
||||
cdate = exiv_image['Exif.Photo.DateTimeOriginal'].value
|
||||
return cdate
|
||||
elif 'Exif.Image.DateTime' in exiv_image:
|
||||
cdate = exiv_image['Exif.Image.DateTime'].value
|
||||
return cdate
|
||||
else:
|
||||
epoch = os.path.getmtime(filename)
|
||||
return datetime.datetime.fromtimestamp(epoch)
|
||||
|
||||
def load_image_list(self, input_folder, file_type='jpg'):
|
||||
"""
|
||||
Load image list from a folder given a file type
|
||||
:param input_folder:
|
||||
:param file_type:
|
||||
:return:
|
||||
"""
|
||||
self.img_list = [input_folder + filename for filename in os.listdir(input_folder)
|
||||
if re.search(r'\.'+file_type+'$', filename, re.IGNORECASE)]
|
||||
self.img_list = sorted(self.img_list)
|
||||
return self.img_list
|
||||
|
||||
def tag_images(self):
|
||||
"""
|
||||
Tag the image list using the GPS loaded from the LOG file
|
||||
:return:
|
||||
"""
|
||||
tagged_gps = []
|
||||
img_size = len(self.img_list)
|
||||
print '[INFO] Number of images:', img_size
|
||||
print '[INFO] Number of gps logs:', len(self.gps_list)
|
||||
|
||||
dt_list = [x.timestamp for x in self.gps_list]
|
||||
|
||||
img_seq = 1
|
||||
|
||||
for i in xrange(img_size):
|
||||
cdate = self.get_image_creation_date(self.img_list[i])
|
||||
gps_i, img_tdiff = self.get_closest_datetime_index(dt_list, cdate)
|
||||
base_path, filename = os.path.split(self.img_list[i])
|
||||
|
||||
if gps_i == -1:
|
||||
self.non_processed_files.append(filename)
|
||||
continue
|
||||
|
||||
closest_gps = self.gps_list[gps_i]
|
||||
self.tdiff_list.append(img_tdiff)
|
||||
|
||||
if self.verbose:
|
||||
msg = "[DEBUG] %s/%s) %s\n\timg %s -> gps %s (%ss)\n\tlat:%s, lon:%s, alt:%s".ljust(60) %\
|
||||
(i+1, img_size, filename, cdate, closest_gps.timestamp, img_tdiff, closest_gps.lat, closest_gps.lon, closest_gps.alt)
|
||||
print msg
|
||||
|
||||
output_filename = self.output + str(img_seq) + '_' + filename
|
||||
copyfile(self.img_list[i], output_filename)
|
||||
self.set_gps_location(output_filename, closest_gps.lat, closest_gps.lon, closest_gps.alt)
|
||||
self.tagged_gps.append(closest_gps)
|
||||
img_seq += 1
|
||||
|
||||
if len(self.tdiff_list) > 0:
|
||||
print '[INFO] Mean diff in seconds:', sum(self.tdiff_list) / float(len(self.tdiff_list))
|
||||
|
||||
@staticmethod
|
||||
def get_arg():
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Geotag script to add GPS info to pictures from PX4 binary log files.'\
|
||||
'It uses synchronized time to allocate GPS positions.'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'-l', '--logfile', help='PX4 log file containing recorded positions.', required=True
|
||||
)
|
||||
parser.add_argument(
|
||||
'-i', '--input', help='Input folder containing untagged images.', required=True
|
||||
)
|
||||
parser.add_argument(
|
||||
'-o', '--output', help='Output folder to contain tagged images.', required=True
|
||||
)
|
||||
parser.add_argument(
|
||||
'-t', '--treshold', help='Time treshold between the GPS time and the local image time.',
|
||||
default=1, required=False, type=float
|
||||
)
|
||||
parser.add_argument(
|
||||
'-of', '--offset', help='Time offset in MILLISECONDS between the GPS time and the local time.',
|
||||
default=-17000, required=False, type=float
|
||||
)
|
||||
parser.add_argument(
|
||||
'-kml', '--kml', help='Save the in KML format the information of all tagged images.',
|
||||
required=False, action='store_true'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-v', '--verbose', help='Prints lots of information.',
|
||||
required=False, action='store_true'
|
||||
)
|
||||
|
||||
args = vars(parser.parse_args())
|
||||
return args
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
m = Main()
|
||||
+1
-1
Submodule Tools/sitl_gazebo updated: 82b3548750...800b12aff9
@@ -16,7 +16,7 @@ src_path=`pwd`
|
||||
rc_script="posix-configs/SITL/init/rcS_multiple"
|
||||
build_path=${src_path}/build_posix_sitl_default
|
||||
|
||||
pkill mainapp
|
||||
pkill px4
|
||||
sleep 2
|
||||
|
||||
cd $build_path/src/firmware/posix
|
||||
@@ -39,7 +39,7 @@ while [ $n -le $sitl_num ]; do
|
||||
|
||||
cd $n
|
||||
|
||||
sudo -b -u $user ../mainapp -d rcS >out.log 2>err.log
|
||||
sudo -b -u $user ../px4 -d rcS >out.log 2>err.log
|
||||
|
||||
cd ../
|
||||
|
||||
|
||||
+7
-7
@@ -43,8 +43,8 @@ fi
|
||||
# kill process names that might stil
|
||||
# be running from last time
|
||||
pkill gazebo
|
||||
pkill mainapp
|
||||
jmavsim_pid=`jps | grep Simulator | cut -d" " -f1`
|
||||
pkill px4
|
||||
jmavsim_pid=`ps aux | grep java | grep Simulator | cut -d" " -f1`
|
||||
if [ -n "$jmavsim_pid" ]
|
||||
then
|
||||
kill $jmavsim_pid
|
||||
@@ -117,18 +117,18 @@ set +e
|
||||
# Start Java simulator
|
||||
if [ "$debugger" == "lldb" ]
|
||||
then
|
||||
lldb -- mainapp ../../../../${rc_script}_${program}_${model}
|
||||
lldb -- px4 ../../../../${rc_script}_${program}_${model}
|
||||
elif [ "$debugger" == "gdb" ]
|
||||
then
|
||||
gdb --args mainapp ../../../../${rc_script}_${program}_${model}
|
||||
gdb --args px4 ../../../../${rc_script}_${program}_${model}
|
||||
elif [ "$debugger" == "ddd" ]
|
||||
then
|
||||
ddd --debugger gdb --args mainapp ../../../../${rc_script}_${program}_${model}
|
||||
ddd --debugger gdb --args px4 ../../../../${rc_script}_${program}_${model}
|
||||
elif [ "$debugger" == "valgrind" ]
|
||||
then
|
||||
valgrind ./mainapp ../../../../${rc_script}_${program}_${model}
|
||||
valgrind ./px4 ../../../../${rc_script}_${program}_${model}
|
||||
else
|
||||
$sudo_enabled ./mainapp $chroot_enabled ../../../../${rc_script}_${program}_${model}
|
||||
$sudo_enabled ./px4 $chroot_enabled ../../../../${rc_script}_${program}_${model}
|
||||
fi
|
||||
|
||||
if [ "$program" == "jmavsim" ]
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ fi
|
||||
|
||||
if [ $SYSTYPE = "Linux" ];
|
||||
then
|
||||
SERIAL_PORTS="/dev/serial/by-id/usb-3D_Robotics*"
|
||||
SERIAL_PORTS="/dev/serial/by-id/usb-3D_Robotics*,/dev/serial/by-id/usb-The_Autopilot*"
|
||||
fi
|
||||
|
||||
if [ $SYSTYPE = "" ];
|
||||
@@ -25,4 +25,4 @@ then
|
||||
SERIAL_PORTS="COM32,COM31,COM30,COM29,COM28,COM27,COM26,COM25,COM24,COM23,COM22,COM21,COM20,COM19,COM18,COM17,COM16,COM15,COM14,COM13,COM12,COM11,COM10,COM9,COM8,COM7,COM6,COM5,COM4,COM3,COM2,COM1,COM0"
|
||||
fi
|
||||
|
||||
python $BASEDIR/px_uploader.py --port $SERIAL_PORTS $1
|
||||
python $BASEDIR/px_uploader.py --port $SERIAL_PORTS $1
|
||||
|
||||
+47
-45
@@ -136,14 +136,14 @@ function(px4_add_git_submodule)
|
||||
REQUIRED TARGET PATH
|
||||
ARGN ${ARGN})
|
||||
string(REPLACE "/" "_" NAME ${PATH})
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND touch ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/.gitmodules
|
||||
add_custom_command(OUTPUT ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
COMMAND touch ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
|
||||
DEPENDS ${PX4_SOURCE_DIR}/.gitmodules
|
||||
)
|
||||
add_custom_target(${TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
DEPENDS ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
DEPENDS ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
|
||||
)
|
||||
endfunction()
|
||||
|
||||
@@ -371,7 +371,7 @@ function(px4_generate_messages)
|
||||
endif()
|
||||
|
||||
# headers
|
||||
set(msg_out_path ${CMAKE_BINARY_DIR}/src/modules/uORB/topics)
|
||||
set(msg_out_path ${PX4_BINARY_DIR}/src/modules/uORB/topics)
|
||||
set(msg_list)
|
||||
foreach(msg_file ${MSG_FILES})
|
||||
get_filename_component(msg ${msg_file} NAME_WE)
|
||||
@@ -389,15 +389,15 @@ function(px4_generate_messages)
|
||||
-d msg
|
||||
-o ${msg_out_path}
|
||||
-e msg/templates/uorb
|
||||
-t ${CMAKE_BINARY_DIR}/topics_temporary_header
|
||||
-t ${PX4_BINARY_DIR}/topics_temporary_header
|
||||
DEPENDS ${DEPENDS} ${MSG_FILES}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
COMMENT "Generating uORB topic headers"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# !sources
|
||||
set(msg_source_out_path ${CMAKE_BINARY_DIR}/topics_sources)
|
||||
set(msg_source_out_path ${PX4_BINARY_DIR}/topics_sources)
|
||||
set(msg_source_files_out ${msg_source_out_path}/uORBTopics.cpp)
|
||||
foreach(msg ${msg_list})
|
||||
list(APPEND msg_source_files_out ${msg_source_out_path}/${msg}.cpp)
|
||||
@@ -410,9 +410,9 @@ function(px4_generate_messages)
|
||||
-d msg
|
||||
-o ${msg_source_out_path}
|
||||
-e msg/templates/uorb
|
||||
-t ${CMAKE_BINARY_DIR}/topics_temporary_sources
|
||||
-t ${PX4_BINARY_DIR}/topics_temporary_sources
|
||||
DEPENDS ${DEPENDS} ${MSG_FILES}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
COMMENT "Generating uORB topic sources"
|
||||
VERBATIM
|
||||
)
|
||||
@@ -427,7 +427,7 @@ function(px4_generate_messages)
|
||||
|
||||
# multi messages for target OS
|
||||
set(msg_multi_out_path
|
||||
${CMAKE_BINARY_DIR}/src/platforms/${OS}/px4_messages)
|
||||
${PX4_BINARY_DIR}/src/platforms/${OS}/px4_messages)
|
||||
set(msg_multi_files_out)
|
||||
foreach(msg ${msg_list})
|
||||
list(APPEND msg_multi_files_out ${msg_multi_out_path}/px4_${msg}.h)
|
||||
@@ -440,10 +440,10 @@ function(px4_generate_messages)
|
||||
-d msg
|
||||
-o ${msg_multi_out_path}
|
||||
-e msg/templates/px4/uorb
|
||||
-t ${CMAKE_BINARY_DIR}/multi_topics_temporary/${OS}
|
||||
-t ${PX4_BINARY_DIR}/multi_topics_temporary/${OS}
|
||||
-p "px4_"
|
||||
DEPENDS ${DEPENDS} ${MSG_FILES}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
COMMENT "Generating uORB topic multi headers for ${OS}"
|
||||
VERBATIM
|
||||
)
|
||||
@@ -488,6 +488,7 @@ function(px4_add_upload)
|
||||
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
|
||||
list(APPEND serial_ports
|
||||
/dev/serial/by-id/usb-3D_Robotics*
|
||||
/dev/serial/by-id/usb-The_Autopilot*
|
||||
/dev/serial/by-id/pci-3D_Robotics*
|
||||
)
|
||||
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
@@ -503,9 +504,9 @@ function(px4_add_upload)
|
||||
px4_join(OUT serial_ports LIST "${serial_ports}" GLUE ",")
|
||||
add_custom_target(${OUT}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/Tools/px_uploader.py --port ${serial_ports} ${BUNDLE}
|
||||
${PX4_SOURCE_DIR}/Tools/px_uploader.py --port ${serial_ports} ${BUNDLE}
|
||||
DEPENDS ${BUNDLE}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR}
|
||||
COMMENT "uploading ${BUNDLE}"
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
@@ -522,9 +523,9 @@ function(px4_add_adb_push)
|
||||
ARGN ${ARGN})
|
||||
|
||||
add_custom_target(${OUT}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/Tools/adb_upload.sh ${FILES} ${DEST}
|
||||
COMMAND ${PX4_SOURCE_DIR}/Tools/adb_upload.sh ${FILES} ${DEST}
|
||||
DEPENDS ${DEPENDS}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR}
|
||||
COMMENT "uploading ${BUNDLE}"
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
@@ -540,9 +541,9 @@ function(px4_add_adb_push_to_bebop)
|
||||
ARGN ${ARGN})
|
||||
|
||||
add_custom_target(${OUT}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/Tools/adb_upload_to_bebop.sh ${FILES} ${DEST}
|
||||
COMMAND ${PX4_SOURCE_DIR}/Tools/adb_upload_to_bebop.sh ${FILES} ${DEST}
|
||||
DEPENDS ${DEPENDS}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR}
|
||||
COMMENT "uploading ${BUNDLE}"
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
@@ -558,9 +559,9 @@ function(px4_add_scp_push)
|
||||
ARGN ${ARGN})
|
||||
|
||||
add_custom_target(${OUT}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/Tools/scp_upload.sh ${FILES} ${DEST}
|
||||
COMMAND ${PX4_SOURCE_DIR}/Tools/scp_upload.sh ${FILES} ${DEST}
|
||||
DEPENDS ${DEPENDS}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR}
|
||||
COMMENT "uploading ${BUNDLE}"
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
@@ -760,21 +761,21 @@ function(px4_add_common_flags)
|
||||
)
|
||||
|
||||
set(added_include_dirs
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/modules
|
||||
${CMAKE_SOURCE_DIR}/src/include
|
||||
${CMAKE_SOURCE_DIR}/src/lib
|
||||
${CMAKE_SOURCE_DIR}/src/platforms
|
||||
${PX4_SOURCE_DIR}/src
|
||||
${PX4_BINARY_DIR}
|
||||
${PX4_BINARY_DIR}/src
|
||||
${PX4_SOURCE_DIR}/src/modules
|
||||
${PX4_SOURCE_DIR}/src/include
|
||||
${PX4_SOURCE_DIR}/src/lib
|
||||
${PX4_SOURCE_DIR}/src/platforms
|
||||
# TODO Build/versioning was in Makefile,
|
||||
# do we need this, how does it work with cmake
|
||||
${CMAKE_SOURCE_DIR}/src/drivers/boards/${BOARD}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/src/modules/px4_messages
|
||||
${CMAKE_BINARY_DIR}/src/modules
|
||||
${CMAKE_SOURCE_DIR}/mavlink/include/mavlink
|
||||
${CMAKE_SOURCE_DIR}/src/lib/DriverFramework/framework/include
|
||||
${PX4_SOURCE_DIR}/src/drivers/boards/${BOARD}
|
||||
${PX4_BINARY_DIR}
|
||||
${PX4_BINARY_DIR}/src/modules/px4_messages
|
||||
${PX4_BINARY_DIR}/src/modules
|
||||
${PX4_SOURCE_DIR}/mavlink/include/mavlink
|
||||
${PX4_SOURCE_DIR}/src/lib/DriverFramework/framework/include
|
||||
)
|
||||
|
||||
list(APPEND added_include_dirs
|
||||
@@ -787,6 +788,7 @@ function(px4_add_common_flags)
|
||||
string(REPLACE "-" "_" board_config ${board_upper})
|
||||
set(added_definitions
|
||||
-DCONFIG_ARCH_BOARD_${board_config}
|
||||
-D__STDC_FORMAT_MACROS
|
||||
)
|
||||
|
||||
if (NOT (APPLE AND (${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")))
|
||||
@@ -856,19 +858,19 @@ function(px4_create_git_hash_header)
|
||||
COMMAND git describe --always --tags
|
||||
OUTPUT_VARIABLE git_tag
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
)
|
||||
message(STATUS "GIT_TAG = ${git_tag}")
|
||||
execute_process(
|
||||
COMMAND git rev-parse --verify HEAD
|
||||
OUTPUT_VARIABLE git_version
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
)
|
||||
#message(STATUS "GIT_VERSION = ${git_version}")
|
||||
set(git_version_short)
|
||||
string(SUBSTRING ${git_version} 1 16 git_version_short)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/templates/build_git_version.h.in ${HEADER} @ONLY)
|
||||
configure_file(${PX4_SOURCE_DIR}/cmake/templates/build_git_version.h.in ${HEADER} @ONLY)
|
||||
endfunction()
|
||||
|
||||
#=============================================================================
|
||||
@@ -895,12 +897,12 @@ function(px4_generate_parameters_xml)
|
||||
ONE_VALUE OUT BOARD
|
||||
REQUIRED OUT BOARD
|
||||
ARGN ${ARGN})
|
||||
set(path ${CMAKE_SOURCE_DIR}/src)
|
||||
set(path ${PX4_SOURCE_DIR}/src)
|
||||
file(GLOB_RECURSE param_src_files
|
||||
${CMAKE_SOURCE_DIR}/src/*params.c
|
||||
${PX4_SOURCE_DIR}/src/*params.c
|
||||
)
|
||||
add_custom_command(OUTPUT ${OUT}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/px_process_params.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_params.py
|
||||
-s ${path} --board CONFIG_ARCH_${BOARD} --xml --inject-xml
|
||||
DEPENDS ${param_src_files}
|
||||
)
|
||||
@@ -942,7 +944,7 @@ function(px4_generate_parameters_source)
|
||||
set(SCOPE "")
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${generated_files}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/px_generate_params.py ${XML} ${SCOPE}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_generate_params.py ${XML} ${SCOPE}
|
||||
DEPENDS ${XML} ${DEPS} ${SCOPE}
|
||||
)
|
||||
set(${OUT} ${generated_files} PARENT_SCOPE)
|
||||
@@ -973,10 +975,10 @@ function(px4_generate_airframes_xml)
|
||||
ONE_VALUE OUT BOARD
|
||||
REQUIRED OUT BOARD
|
||||
ARGN ${ARGN})
|
||||
set(process_airframes ${CMAKE_SOURCE_DIR}/Tools/px_process_airframes.py)
|
||||
set(process_airframes ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py)
|
||||
add_custom_command(OUTPUT ${OUT}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${process_airframes}
|
||||
-a ${CMAKE_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
|
||||
-a ${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
|
||||
--board CONFIG_ARCH_BOARD_${BOARD} --xml
|
||||
)
|
||||
set(${OUT} ${${OUT}} PARENT_SCOPE)
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
# Board support modules
|
||||
#
|
||||
drivers/device
|
||||
drivers/stm32
|
||||
drivers/stm32/adc
|
||||
drivers/led
|
||||
#drivers/px4fmu
|
||||
drivers/boards/asc-v1
|
||||
drivers/rgbled_pwm
|
||||
drivers/tap_esc
|
||||
drivers/mpu6500
|
||||
drivers/ms5611
|
||||
drivers/hmc5883
|
||||
drivers/gps
|
||||
drivers/airspeed
|
||||
drivers/meas_airspeed
|
||||
modules/sensors
|
||||
drivers/camera_trigger
|
||||
|
||||
#
|
||||
# System commands
|
||||
#
|
||||
systemcmds/bl_update
|
||||
systemcmds/mixer
|
||||
systemcmds/param
|
||||
systemcmds/perf
|
||||
systemcmds/pwm
|
||||
systemcmds/motor_test
|
||||
systemcmds/reboot
|
||||
systemcmds/top
|
||||
systemcmds/config
|
||||
systemcmds/nshterm
|
||||
systemcmds/mtd
|
||||
systemcmds/dumpfile
|
||||
systemcmds/ver
|
||||
systemcmds/topic_listener
|
||||
|
||||
#
|
||||
# General system control
|
||||
#
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
modules/land_detector
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
#
|
||||
modules/fw_pos_control_l1
|
||||
modules/fw_att_control
|
||||
modules/mc_att_control
|
||||
modules/mc_pos_control
|
||||
modules/vtol_att_control
|
||||
|
||||
#
|
||||
# Logging
|
||||
#
|
||||
modules/logger
|
||||
|
||||
#
|
||||
# Library modules
|
||||
#
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/dataman
|
||||
|
||||
#
|
||||
# Libraries
|
||||
#
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/conversion
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/DriverFramework/framework
|
||||
platforms/nuttx
|
||||
|
||||
# had to add for cmake, not sure why wasn't in original config
|
||||
platforms/common
|
||||
platforms/nuttx/px4_layer
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
serdis
|
||||
sercon
|
||||
)
|
||||
|
||||
set(config_io_board
|
||||
)
|
||||
|
||||
set(config_extra_libs
|
||||
)
|
||||
|
||||
set(config_io_extra_libs
|
||||
)
|
||||
|
||||
add_custom_target(sercon)
|
||||
set_target_properties(sercon PROPERTIES
|
||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
||||
MAIN "sercon"
|
||||
STACK_MAIN "2048")
|
||||
|
||||
add_custom_target(serdis)
|
||||
set_target_properties(serdis PROPERTIES
|
||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
||||
MAIN "serdis"
|
||||
STACK_MAIN "2048")
|
||||
@@ -1,6 +1,6 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_uavcan_num_ifaces 2)
|
||||
|
||||
@@ -64,13 +64,27 @@ set(config_module_list
|
||||
systemcmds/pwm
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
#systemcmds/topic_listener
|
||||
systemcmds/topic_listener
|
||||
systemcmds/top
|
||||
systemcmds/config
|
||||
systemcmds/nshterm
|
||||
systemcmds/mtd
|
||||
systemcmds/dumpfile
|
||||
systemcmds/ver
|
||||
systemcmds/sd_bench
|
||||
systemcmds/motor_ramp
|
||||
|
||||
#
|
||||
# Tests
|
||||
#
|
||||
drivers/sf0x/sf0x_tests
|
||||
drivers/test_ppm
|
||||
modules/commander/commander_tests
|
||||
modules/controllib_test
|
||||
modules/mavlink/mavlink_tests
|
||||
modules/unit_test
|
||||
modules/uORB/uORB_tests
|
||||
systemcmds/tests
|
||||
|
||||
#
|
||||
# General system control
|
||||
@@ -87,7 +101,6 @@ set(config_module_list
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
@@ -95,7 +108,6 @@ set(config_module_list
|
||||
#
|
||||
# Vehicle Control
|
||||
#
|
||||
# modules/segway # XXX Needs GCC 4.7 fix
|
||||
modules/fw_pos_control_l1
|
||||
modules/fw_att_control
|
||||
modules/mc_att_control
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
@@ -68,13 +68,11 @@ set(config_module_list
|
||||
modules/land_detector
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
# Estimation modules
|
||||
#
|
||||
# Too high RAM usage due to static allocations
|
||||
# modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_uavcan_num_ifaces 2)
|
||||
|
||||
@@ -53,22 +53,34 @@ set(config_module_list
|
||||
# System commands
|
||||
#
|
||||
systemcmds/bl_update
|
||||
systemcmds/config
|
||||
systemcmds/dumpfile
|
||||
#systemcmds/esc_calib
|
||||
systemcmds/mixer
|
||||
#systemcmds/motor_ramp
|
||||
systemcmds/mtd
|
||||
systemcmds/nshterm
|
||||
systemcmds/param
|
||||
systemcmds/perf
|
||||
systemcmds/pwm
|
||||
#systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
#systemcmds/topic_listener
|
||||
systemcmds/top
|
||||
systemcmds/config
|
||||
systemcmds/nshterm
|
||||
systemcmds/mtd
|
||||
systemcmds/dumpfile
|
||||
systemcmds/ver
|
||||
#systemcmds/sd_bench
|
||||
systemcmds/top
|
||||
#systemcmds/topic_listener
|
||||
systemcmds/ver
|
||||
|
||||
#
|
||||
# Testing
|
||||
#
|
||||
#drivers/sf0x/sf0x_tests
|
||||
#drivers/test_ppm
|
||||
#lib/rc/rc_tests
|
||||
#modules/commander/commander_tests
|
||||
#modules/controllib_test
|
||||
#modules/mavlink/mavlink_tests
|
||||
#modules/unit_test
|
||||
#modules/uORB/uORB_tests
|
||||
#systemcmds/tests
|
||||
systemcmds/motor_ramp
|
||||
|
||||
#
|
||||
# General system control
|
||||
@@ -82,10 +94,9 @@ set(config_module_list
|
||||
modules/land_detector
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
# Estimation modules
|
||||
#
|
||||
modules/attitude_estimator_q
|
||||
#modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_uavcan_num_ifaces 2)
|
||||
|
||||
@@ -53,32 +53,34 @@ set(config_module_list
|
||||
# System commands
|
||||
#
|
||||
systemcmds/bl_update
|
||||
systemcmds/config
|
||||
systemcmds/dumpfile
|
||||
#systemcmds/esc_calib
|
||||
systemcmds/mixer
|
||||
systemcmds/motor_ramp
|
||||
systemcmds/mtd
|
||||
systemcmds/nshterm
|
||||
systemcmds/param
|
||||
systemcmds/perf
|
||||
systemcmds/pwm
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
#systemcmds/topic_listener
|
||||
systemcmds/top
|
||||
systemcmds/config
|
||||
systemcmds/nshterm
|
||||
systemcmds/mtd
|
||||
systemcmds/dumpfile
|
||||
systemcmds/ver
|
||||
#systemcmds/sd_bench
|
||||
systemcmds/tests
|
||||
systemcmds/motor_ramp
|
||||
systemcmds/top
|
||||
#systemcmds/topic_listener
|
||||
systemcmds/ver
|
||||
|
||||
#
|
||||
# Testing
|
||||
#
|
||||
drivers/sf0x/sf0x_tests
|
||||
drivers/test_ppm
|
||||
#lib/rc/rc_tests
|
||||
modules/commander/commander_tests
|
||||
modules/controllib_test
|
||||
modules/mavlink/mavlink_tests
|
||||
modules/unit_test
|
||||
modules/uORB/uORB_tests
|
||||
systemcmds/tests
|
||||
|
||||
#
|
||||
# General system control
|
||||
@@ -92,12 +94,12 @@ set(config_module_list
|
||||
modules/land_detector
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
# Estimation modules
|
||||
#
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_uavcan_num_ifaces 1)
|
||||
|
||||
@@ -23,7 +23,7 @@ set(config_module_list
|
||||
drivers/mb12xx
|
||||
drivers/srf02
|
||||
drivers/sf0x
|
||||
drivers/sf10a
|
||||
drivers/sf1xx
|
||||
drivers/ll40ls
|
||||
drivers/trone
|
||||
drivers/gps
|
||||
@@ -69,9 +69,20 @@ set(config_module_list
|
||||
systemcmds/dumpfile
|
||||
systemcmds/ver
|
||||
systemcmds/sd_bench
|
||||
systemcmds/tests
|
||||
systemcmds/motor_ramp
|
||||
|
||||
#
|
||||
# Testing
|
||||
#
|
||||
drivers/sf0x/sf0x_tests
|
||||
drivers/test_ppm
|
||||
modules/commander/commander_tests
|
||||
modules/controllib_test
|
||||
modules/mavlink/mavlink_tests
|
||||
modules/unit_test
|
||||
modules/uORB/uORB_tests
|
||||
systemcmds/tests
|
||||
|
||||
#
|
||||
# General system control
|
||||
#
|
||||
@@ -87,7 +98,6 @@ set(config_module_list
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/ekf2
|
||||
modules/local_position_estimator
|
||||
@@ -172,6 +182,9 @@ set(config_module_list
|
||||
|
||||
# Hardware test
|
||||
#examples/hwtest
|
||||
|
||||
# EKF
|
||||
examples/ekf_att_pos_estimator
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
|
||||
+13
-78
@@ -1,8 +1,6 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_uavcan_num_ifaces 2)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
@@ -14,40 +12,17 @@ set(config_module_list
|
||||
drivers/stm32/tone_alarm
|
||||
drivers/led
|
||||
drivers/px4fmu
|
||||
drivers/px4io
|
||||
drivers/boards/px4fmu-v2
|
||||
drivers/rgbled
|
||||
drivers/boards/tap-v1
|
||||
drivers/rgbled_pwm
|
||||
drivers/tap_esc
|
||||
drivers/mpu6000
|
||||
drivers/mpu9250
|
||||
drivers/lsm303d
|
||||
drivers/l3gd20
|
||||
drivers/hmc5883
|
||||
drivers/ms5611
|
||||
#drivers/mb12xx
|
||||
drivers/srf02
|
||||
drivers/sf0x
|
||||
drivers/ll40ls
|
||||
drivers/trone
|
||||
drivers/hmc5883
|
||||
drivers/gps
|
||||
drivers/pwm_out_sim
|
||||
#drivers/hott
|
||||
#drivers/hott/hott_telemetry
|
||||
#drivers/hott/hott_sensors
|
||||
drivers/blinkm
|
||||
drivers/airspeed
|
||||
drivers/ets_airspeed
|
||||
drivers/meas_airspeed
|
||||
drivers/frsky_telemetry
|
||||
modules/sensors
|
||||
#drivers/mkblctrl
|
||||
drivers/px4flow
|
||||
#drivers/oreoled
|
||||
drivers/gimbal
|
||||
drivers/pwm_input
|
||||
drivers/camera_trigger
|
||||
drivers/bst
|
||||
#drivers/snapdragon_rc_pwm
|
||||
#drivers/lis3mdl
|
||||
|
||||
#
|
||||
# System commands
|
||||
@@ -57,18 +32,15 @@ set(config_module_list
|
||||
systemcmds/param
|
||||
systemcmds/perf
|
||||
systemcmds/pwm
|
||||
systemcmds/esc_calib
|
||||
systemcmds/motor_test
|
||||
systemcmds/reboot
|
||||
#systemcmds/topic_listener
|
||||
systemcmds/top
|
||||
systemcmds/config
|
||||
systemcmds/nshterm
|
||||
systemcmds/mtd
|
||||
systemcmds/dumpfile
|
||||
systemcmds/ver
|
||||
#systemcmds/sd_bench
|
||||
#systemcmds/tests
|
||||
systemcmds/motor_ramp
|
||||
systemcmds/topic_listener
|
||||
|
||||
#
|
||||
# General system control
|
||||
@@ -77,8 +49,6 @@ set(config_module_list
|
||||
modules/load_mon
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
#modules/gpio_led
|
||||
modules/uavcan
|
||||
modules/land_detector
|
||||
|
||||
#
|
||||
@@ -89,7 +59,6 @@ set(config_module_list
|
||||
#
|
||||
# Vehicle Control
|
||||
#
|
||||
# modules/segway # XXX Needs GCC 4.7 fix
|
||||
modules/fw_pos_control_l1
|
||||
modules/fw_att_control
|
||||
modules/mc_att_control
|
||||
@@ -100,7 +69,6 @@ set(config_module_list
|
||||
# Logging
|
||||
#
|
||||
modules/logger
|
||||
modules/sdlog2
|
||||
|
||||
#
|
||||
# Library modules
|
||||
@@ -127,44 +95,12 @@ set(config_module_list
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/DriverFramework/framework
|
||||
lib/rc
|
||||
platforms/nuttx
|
||||
|
||||
# had to add for cmake, not sure why wasn't in original config
|
||||
platforms/common
|
||||
platforms/common
|
||||
platforms/nuttx/px4_layer
|
||||
|
||||
#
|
||||
# OBC challenge
|
||||
#
|
||||
#modules/bottle_drop
|
||||
|
||||
#
|
||||
# Rover apps
|
||||
#
|
||||
#examples/rover_steering_control
|
||||
|
||||
#
|
||||
# Demo apps
|
||||
#
|
||||
#examples/math_demo
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/px4_simple_app
|
||||
#examples/px4_simple_app
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/daemon
|
||||
#examples/px4_daemon_app
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/debug_values
|
||||
#examples/px4_mavlink_debug
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/example_fixedwing_control
|
||||
#examples/fixedwing_control
|
||||
|
||||
# Hardware test
|
||||
#examples/hwtest
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
@@ -173,12 +109,9 @@ set(config_extra_builtin_cmds
|
||||
)
|
||||
|
||||
set(config_io_board
|
||||
px4io-v2
|
||||
)
|
||||
|
||||
set(config_extra_libs
|
||||
uavcan
|
||||
uavcan_stm32_driver
|
||||
)
|
||||
|
||||
set(config_io_extra_libs
|
||||
@@ -187,9 +120,11 @@ set(config_io_extra_libs
|
||||
add_custom_target(sercon)
|
||||
set_target_properties(sercon PROPERTIES
|
||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
||||
MAIN "sercon" STACK_MAIN "2048")
|
||||
MAIN "sercon"
|
||||
STACK_MAIN "2048")
|
||||
|
||||
add_custom_target(serdis)
|
||||
set_target_properties(serdis PROPERTIES
|
||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
||||
MAIN "serdis" STACK_MAIN "2048")
|
||||
MAIN "serdis"
|
||||
STACK_MAIN "2048")
|
||||
@@ -1,10 +1,11 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
|
||||
add_definitions(
|
||||
-D__PX4_POSIX_BEBOP
|
||||
-D__LINUX
|
||||
-D__BEBOP
|
||||
)
|
||||
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
@@ -22,6 +23,8 @@ set(config_module_list
|
||||
drivers/device
|
||||
modules/sensors
|
||||
platforms/posix/drivers/df_ms5607_wrapper
|
||||
platforms/posix/drivers/df_mpu6050_wrapper
|
||||
platforms/posix/drivers/df_ak8963_wrapper
|
||||
|
||||
#
|
||||
# System commands
|
||||
@@ -34,10 +37,8 @@ set(config_module_list
|
||||
systemcmds/perf
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
# Estimation modules
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
@@ -49,7 +50,7 @@ set(config_module_list
|
||||
modules/mc_att_control
|
||||
modules/mc_pos_control
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/fw_pos_control_l1
|
||||
modules/vtol_att_control
|
||||
|
||||
#
|
||||
@@ -58,7 +59,6 @@ set(config_module_list
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
@@ -98,5 +98,7 @@ set(config_module_list
|
||||
)
|
||||
|
||||
set(config_df_driver_list
|
||||
ms5607
|
||||
ms5607
|
||||
mpu6050
|
||||
ak8963
|
||||
)
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
# on the Linux side of the Snapdragon.
|
||||
include(configs/posix_sdflight_default)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
set(CONFIG_SHMEM "1")
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
# Use build stubs unless explicitly set not to
|
||||
if("${DSPAL_STUBS_ENABLE}" STREQUAL "")
|
||||
set(DSPAL_STUBS_ENABLE "1")
|
||||
endif()
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
@@ -30,7 +30,6 @@ set(config_module_list
|
||||
modules/logger
|
||||
modules/simulator
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
@@ -31,8 +31,10 @@ set(config_module_list
|
||||
|
||||
modules/mavlink
|
||||
|
||||
modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
modules/mc_pos_control
|
||||
modules/mc_att_control
|
||||
@@ -49,7 +51,6 @@ set(config_module_list
|
||||
modules/simulator
|
||||
modules/commander
|
||||
modules/navigator
|
||||
modules/load_mon
|
||||
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
systemcmds/topic_listener
|
||||
systemcmds/perf
|
||||
modules/uORB
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/sensors
|
||||
modules/mavlink
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/navigator
|
||||
modules/vtol_att_control
|
||||
modules/mc_pos_control
|
||||
modules/mc_att_control
|
||||
modules/land_detector
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/conversion
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/DriverFramework/framework
|
||||
)
|
||||
@@ -1,111 +0,0 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
${CMAKE_PROGRAM_PATH}
|
||||
)
|
||||
|
||||
# This definition allows to differentiate if this just the usual POSIX build
|
||||
# or if it is for the RPi.
|
||||
add_definitions(
|
||||
-D__PX4_POSIX_RPI2
|
||||
-D__LINUX
|
||||
)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
# Board support modules
|
||||
#
|
||||
drivers/device
|
||||
modules/sensors
|
||||
platforms/posix/drivers/df_mpu9250_wrapper
|
||||
platforms/posix/drivers/df_lsm9ds1_wrapper
|
||||
platforms/posix/drivers/df_ms5611_wrapper
|
||||
platforms/posix/drivers/df_hmc5883_wrapper
|
||||
platforms/posix/drivers/df_trone_wrapper
|
||||
platforms/posix/drivers/df_isl29501_wrapper
|
||||
|
||||
#
|
||||
# System commands
|
||||
#
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
systemcmds/esc_calib
|
||||
systemcmds/topic_listener
|
||||
systemcmds/perf
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
#
|
||||
modules/mc_att_control
|
||||
modules/mc_pos_control
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/vtol_att_control
|
||||
|
||||
#
|
||||
# Library modules
|
||||
#
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/dataman
|
||||
modules/land_detector
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
|
||||
#
|
||||
# PX4 drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Libraries
|
||||
#
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/geo
|
||||
lib/ecl
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/external_lgpl
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/DriverFramework/framework
|
||||
|
||||
#
|
||||
# POSIX
|
||||
#
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
)
|
||||
|
||||
set(config_df_driver_list
|
||||
mpu9250
|
||||
lsm9ds1
|
||||
ms5611
|
||||
hmc5883
|
||||
trone
|
||||
isl29501
|
||||
)
|
||||
@@ -1,19 +1,16 @@
|
||||
# This file is shared between posix_rpi_native.cmake
|
||||
# and posix_rpi_cross.cmake.
|
||||
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
${CMAKE_PROGRAM_PATH}
|
||||
)
|
||||
|
||||
# This definition allows to differentiate if this just the usual POSIX build
|
||||
# or if it is for the RPi.
|
||||
add_definitions(
|
||||
-D__PX4_POSIX_RPI2
|
||||
-D__PX4_POSIX_RPI
|
||||
-D__LINUX
|
||||
)
|
||||
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
# Board support modules
|
||||
@@ -34,14 +31,13 @@ set(config_module_list
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
systemcmds/topic_listener
|
||||
systemcmds/perf
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
# Estimation modules
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
@@ -53,7 +49,7 @@ set(config_module_list
|
||||
modules/mc_att_control
|
||||
modules/mc_pos_control
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/fw_pos_control_l1
|
||||
modules/vtol_att_control
|
||||
|
||||
#
|
||||
@@ -62,7 +58,6 @@ set(config_module_list
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
@@ -78,6 +73,8 @@ set(config_module_list
|
||||
drivers/gps
|
||||
drivers/navio_sysfs_rc_in
|
||||
drivers/navio_sysfs_pwm_out
|
||||
drivers/navio_gpio
|
||||
drivers/navio_rgbled
|
||||
|
||||
#
|
||||
# Libraries
|
||||
@@ -104,6 +101,9 @@ set(config_module_list
|
||||
platforms/posix/work_queue
|
||||
)
|
||||
|
||||
#
|
||||
# DriverFramework driver
|
||||
#
|
||||
set(config_df_driver_list
|
||||
mpu9250
|
||||
lsm9ds1
|
||||
@@ -0,0 +1,13 @@
|
||||
include(configs/posix_rpi_common)
|
||||
|
||||
if("$ENV{RPI_USE_CLANG}" STREQUAL "1")
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian-clang.cmake)
|
||||
else()
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
endif()
|
||||
|
||||
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
${CMAKE_PROGRAM_PATH}
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
include(configs/posix_rpi_common)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
@@ -1,8 +1,8 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
@@ -24,8 +24,10 @@ set(config_module_list
|
||||
|
||||
modules/mavlink
|
||||
|
||||
modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
modules/mc_pos_control
|
||||
modules/mc_att_control
|
||||
@@ -42,7 +44,6 @@ set(config_module_list
|
||||
modules/simulator
|
||||
modules/commander
|
||||
modules/navigator
|
||||
modules/load_mon
|
||||
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
@@ -33,10 +33,10 @@ set(config_module_list
|
||||
modules/sensors
|
||||
modules/simulator
|
||||
modules/mavlink
|
||||
modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/navigator
|
||||
modules/vtol_att_control
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/boards/sitl
|
||||
@@ -32,26 +32,22 @@ set(config_module_list
|
||||
systemcmds/top
|
||||
systemcmds/motor_ramp
|
||||
|
||||
modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/commander
|
||||
modules/dataman
|
||||
modules/ekf2
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/land_detector
|
||||
modules/load_mon
|
||||
modules/logger
|
||||
modules/mavlink
|
||||
modules/mc_att_control
|
||||
modules/mc_att_control_multiplatform
|
||||
modules/mc_pos_control
|
||||
modules/mc_pos_control_multiplatform
|
||||
modules/navigator
|
||||
modules/param
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/replay
|
||||
modules/sdlog2
|
||||
modules/sensors
|
||||
modules/simulator
|
||||
@@ -70,18 +66,25 @@ set(config_module_list
|
||||
lib/launchdetection
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/rc
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/terrain_estimation
|
||||
|
||||
examples/px4_simple_app
|
||||
examples/mc_att_control_multiplatform
|
||||
examples/mc_pos_control_multiplatform
|
||||
examples/ekf_att_pos_estimator
|
||||
examples/attitude_estimator_ekf
|
||||
|
||||
#
|
||||
# Testing
|
||||
#
|
||||
drivers/sf0x/sf0x_tests
|
||||
lib/rc/rc_tests
|
||||
modules/commander/commander_tests
|
||||
modules/controllib_test
|
||||
#modules/mavlink/mavlink_tests
|
||||
#modules/mavlink/mavlink_tests #TODO: fix mavlink_tests
|
||||
modules/unit_test
|
||||
modules/uORB/uORB_tests
|
||||
systemcmds/tests
|
||||
@@ -111,3 +114,12 @@ set(config_sitl_debugger
|
||||
)
|
||||
set_property(CACHE config_sitl_debugger
|
||||
PROPERTY STRINGS "disable;gdb;lldb")
|
||||
|
||||
# If the environment variable 'replay' is defined, we are building with replay
|
||||
# support. In this case, we enable the orb publisher rules.
|
||||
set(REPLAY_FILE "$ENV{replay}")
|
||||
if(REPLAY_FILE)
|
||||
message("Building with uorb publisher rules support")
|
||||
add_definitions(-DORB_USE_PUBLISHER_RULES)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/boards/sitl
|
||||
drivers/device
|
||||
drivers/gps
|
||||
drivers/pwm_out_sim
|
||||
|
||||
platforms/common
|
||||
platforms/posix/drivers/accelsim
|
||||
platforms/posix/drivers/adcsim
|
||||
platforms/posix/drivers/airspeedsim
|
||||
platforms/posix/drivers/barosim
|
||||
platforms/posix/drivers/gpssim
|
||||
platforms/posix/drivers/gyrosim
|
||||
platforms/posix/drivers/ledsim
|
||||
platforms/posix/drivers/rgbledsim
|
||||
platforms/posix/drivers/tonealrmsim
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
|
||||
systemcmds/esc_calib
|
||||
systemcmds/mixer
|
||||
systemcmds/param
|
||||
systemcmds/perf
|
||||
systemcmds/reboot
|
||||
systemcmds/sd_bench
|
||||
systemcmds/topic_listener
|
||||
systemcmds/ver
|
||||
|
||||
modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/commander
|
||||
modules/dataman
|
||||
modules/ekf2
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/land_detector
|
||||
modules/load_mon
|
||||
modules/logger
|
||||
modules/mavlink
|
||||
modules/mc_att_control
|
||||
modules/mc_att_control_multiplatform
|
||||
modules/mc_pos_control
|
||||
modules/mc_pos_control_multiplatform
|
||||
modules/navigator
|
||||
modules/param
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/sdlog2
|
||||
modules/sensors
|
||||
modules/simulator
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/vtol_att_control
|
||||
|
||||
lib/controllib
|
||||
lib/conversion
|
||||
lib/DriverFramework/framework
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/terrain_estimation
|
||||
|
||||
examples/px4_simple_app
|
||||
|
||||
#
|
||||
# Testing
|
||||
#
|
||||
modules/commander/commander_tests
|
||||
modules/controllib_test
|
||||
#modules/mavlink/mavlink_tests
|
||||
modules/unit_test
|
||||
modules/uORB/uORB_tests
|
||||
systemcmds/tests
|
||||
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
serdis
|
||||
sercon
|
||||
)
|
||||
|
||||
set(config_sitl_rcS
|
||||
posix-configs/SITL/init/rcS_test
|
||||
CACHE FILEPATH "init script for sitl"
|
||||
)
|
||||
|
||||
set(config_sitl_viewer
|
||||
jmavsim
|
||||
CACHE STRING "viewer for sitl"
|
||||
)
|
||||
set_property(CACHE config_sitl_viewer
|
||||
PROPERTY STRINGS "jmavsim;none")
|
||||
|
||||
set(config_sitl_debugger
|
||||
disable
|
||||
CACHE STRING "debugger for sitl"
|
||||
)
|
||||
set_property(CACHE config_sitl_debugger
|
||||
PROPERTY STRINGS "disable;gdb;lldb")
|
||||
@@ -6,9 +6,9 @@ else()
|
||||
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
|
||||
endif()
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ else()
|
||||
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
|
||||
endif()
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
@@ -27,12 +27,12 @@ set(config_module_list
|
||||
systemcmds/mixer
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
# Estimation modules
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
@@ -48,7 +48,6 @@ set(config_module_list
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
|
||||
#
|
||||
# Libraries
|
||||
|
||||
@@ -10,9 +10,9 @@ set(CONFIG_SHMEM "1")
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
add_definitions(
|
||||
-D__USING_SNAPDRAGON_LEGACY_DRIVER
|
||||
@@ -35,11 +35,11 @@ set(config_module_list
|
||||
systemcmds/param
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
# Estimation modules
|
||||
#
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
@@ -57,7 +57,6 @@ set(config_module_list
|
||||
modules/uORB
|
||||
modules/commander
|
||||
modules/land_detector
|
||||
modules/load_mon
|
||||
|
||||
#
|
||||
# PX4 drivers
|
||||
|
||||
@@ -6,9 +6,9 @@ else()
|
||||
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
|
||||
endif()
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ else()
|
||||
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
|
||||
endif()
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ set(CONFIG_SHMEM "1")
|
||||
# Run a full link with build stubs to make sure qurt target isn't broken
|
||||
set(QURT_ENABLE_STUBS "1")
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
include(hexagon_sdk)
|
||||
|
||||
if ("$ENV{HEXAGON_SDK_ROOT}" STREQUAL "")
|
||||
@@ -35,12 +35,12 @@ set(config_module_list
|
||||
systemcmds/mixer
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
# Estimation modules
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
@@ -56,7 +56,6 @@ set(config_module_list
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
|
||||
#
|
||||
# Libraries
|
||||
|
||||
@@ -10,9 +10,9 @@ set(CONFIG_SHMEM "1")
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
@@ -32,12 +32,11 @@ set(config_module_list
|
||||
systemcmds/param
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
# Estimation modules
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
|
||||
@@ -95,9 +95,9 @@ function(px4_nuttx_add_firmware)
|
||||
|
||||
add_custom_command(OUTPUT ${OUT}
|
||||
COMMAND ${OBJCOPY} -O binary ${EXE} ${EXE}.bin
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/px_mkfw.py
|
||||
--prototype ${CMAKE_SOURCE_DIR}/Images/${BOARD}.prototype
|
||||
--git_identity ${CMAKE_SOURCE_DIR}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_mkfw.py
|
||||
--prototype ${PX4_SOURCE_DIR}/Images/${BOARD}.prototype
|
||||
--git_identity ${PX4_SOURCE_DIR}
|
||||
${extra_args}
|
||||
--image ${EXE}.bin > ${OUT}
|
||||
DEPENDS ${EXE}
|
||||
@@ -148,7 +148,7 @@ function(px4_nuttx_generate_builtin_commands)
|
||||
math(EXPR command_count "${command_count}+1")
|
||||
endif()
|
||||
endforeach()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/nuttx/builtin_commands.c.in
|
||||
configure_file(${PX4_SOURCE_DIR}/cmake/nuttx/builtin_commands.c.in
|
||||
${OUT})
|
||||
endfunction()
|
||||
|
||||
@@ -183,17 +183,17 @@ function(px4_nuttx_add_export)
|
||||
REQUIRED OUT CONFIG THREADS
|
||||
ARGN ${ARGN})
|
||||
|
||||
set(nuttx_src ${CMAKE_BINARY_DIR}/${CONFIG}/NuttX)
|
||||
set(nuttx_src ${PX4_BINARY_DIR}/${CONFIG}/NuttX)
|
||||
|
||||
# patch
|
||||
add_custom_target(__nuttx_patch_${CONFIG})
|
||||
file(GLOB nuttx_patches RELATIVE ${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/nuttx-patches/*.patch)
|
||||
file(GLOB nuttx_patches RELATIVE ${PX4_SOURCE_DIR}
|
||||
${PX4_SOURCE_DIR}/nuttx-patches/*.patch)
|
||||
foreach(patch ${nuttx_patches})
|
||||
string(REPLACE "/" "_" patch_name "${patch}-${CONFIG}")
|
||||
message(STATUS "nuttx-patch: ${patch}")
|
||||
add_custom_command(OUTPUT nuttx_patch_${patch_name}.stamp
|
||||
COMMAND ${PATCH} -p0 -N < ${CMAKE_SOURCE_DIR}/${patch}
|
||||
COMMAND ${PATCH} -p0 -N < ${PX4_SOURCE_DIR}/${patch}
|
||||
COMMAND ${TOUCH} nuttx_patch_${patch_name}.stamp
|
||||
DEPENDS ${DEPENDS}
|
||||
)
|
||||
@@ -204,7 +204,7 @@ function(px4_nuttx_add_export)
|
||||
|
||||
# Read defconfig to see if CONFIG_ARMV7M_STACKCHECK is yes
|
||||
# note: CONFIG will be BOARD in the future evaluation of ${hw_stack_check_${CONFIG}
|
||||
file(STRINGS "${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/nsh/defconfig"
|
||||
file(STRINGS "${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG}/nsh/defconfig"
|
||||
hw_stack_check_${CONFIG}
|
||||
REGEX "CONFIG_ARMV7M_STACKCHECK=y"
|
||||
)
|
||||
@@ -213,29 +213,29 @@ function(px4_nuttx_add_export)
|
||||
endif()
|
||||
|
||||
# copy and export
|
||||
file(RELATIVE_PATH nuttx_cp_src ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/NuttX)
|
||||
file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export
|
||||
file(RELATIVE_PATH nuttx_cp_src ${PX4_BINARY_DIR} ${PX4_SOURCE_DIR}/NuttX)
|
||||
file(GLOB_RECURSE config_files ${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
|
||||
add_custom_command(OUTPUT ${PX4_BINARY_DIR}/${CONFIG}.export
|
||||
COMMAND ${MKDIR} -p ${nuttx_src}
|
||||
COMMAND rsync -a --delete --exclude=.git ${nuttx_cp_src}/ ${CONFIG}/NuttX/
|
||||
#COMMAND ${ECHO} Configuring NuttX for ${CONFIG}
|
||||
COMMAND ${MAKE} --no-print-directory -C${nuttx_src}/nuttx -r --quiet distclean
|
||||
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/PX4_Warnings.mk ${nuttx_src}/nuttx/
|
||||
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
|
||||
COMMAND ${CP} -r ${PX4_SOURCE_DIR}/nuttx-configs/PX4_Warnings.mk ${nuttx_src}/nuttx/
|
||||
COMMAND ${CP} -r ${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
|
||||
COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh && cd ..
|
||||
#COMMAND ${ECHO} Exporting NuttX for ${CONFIG}
|
||||
COMMAND ${MAKE} --no-print-directory --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export > nuttx_build.log
|
||||
COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export
|
||||
COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${PX4_BINARY_DIR}/${CONFIG}.export
|
||||
DEPENDS ${config_files} ${DEPENDS}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR}
|
||||
COMMENT "Building NuttX for ${CONFIG}")
|
||||
|
||||
# extract
|
||||
add_custom_command(OUTPUT nuttx_export_${CONFIG}.stamp
|
||||
COMMAND ${RM} -rf ${nuttx_src}/nuttx-export
|
||||
COMMAND ${UNZIP} -q ${CMAKE_BINARY_DIR}/${CONFIG}.export -d ${nuttx_src}
|
||||
COMMAND ${UNZIP} -q ${PX4_BINARY_DIR}/${CONFIG}.export -d ${nuttx_src}
|
||||
COMMAND ${TOUCH} nuttx_export_${CONFIG}.stamp
|
||||
DEPENDS ${DEPENDS} ${CMAKE_BINARY_DIR}/${CONFIG}.export)
|
||||
DEPENDS ${DEPENDS} ${PX4_BINARY_DIR}/${CONFIG}.export)
|
||||
|
||||
add_custom_target(${OUT}
|
||||
DEPENDS nuttx_export_${CONFIG}.stamp)
|
||||
@@ -308,16 +308,16 @@ function(px4_nuttx_add_romfs)
|
||||
REQUIRED OUT ROOT
|
||||
ARGN ${ARGN})
|
||||
|
||||
set(romfs_temp_dir ${CMAKE_BINARY_DIR}/tmp/${ROOT})
|
||||
set(romfs_src_dir ${CMAKE_SOURCE_DIR}/${ROOT})
|
||||
set(romfs_autostart ${CMAKE_SOURCE_DIR}/Tools/px_process_airframes.py)
|
||||
set(romfs_pruner ${CMAKE_SOURCE_DIR}/Tools/px_romfs_pruner.py)
|
||||
set(bin_to_obj ${CMAKE_SOURCE_DIR}/cmake/nuttx/bin_to_obj.py)
|
||||
set(romfs_temp_dir ${PX4_BINARY_DIR}/tmp/${ROOT})
|
||||
set(romfs_src_dir ${PX4_SOURCE_DIR}/${ROOT})
|
||||
set(romfs_autostart ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py)
|
||||
set(romfs_pruner ${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py)
|
||||
set(bin_to_obj ${PX4_SOURCE_DIR}/cmake/nuttx/bin_to_obj.py)
|
||||
set(extras_dir ${CMAKE_CURRENT_BINARY_DIR}/extras)
|
||||
|
||||
file(GLOB_RECURSE romfs_src_files ${romfs_src_dir} ${romfs_src_dir}/*)
|
||||
|
||||
set(cmake_test ${CMAKE_SOURCE_DIR}/cmake/test/cmake_tester.py)
|
||||
set(cmake_test ${PX4_SOURCE_DIR}/cmake/test/cmake_tester.py)
|
||||
|
||||
|
||||
set(extras)
|
||||
@@ -346,7 +346,7 @@ function(px4_nuttx_add_romfs)
|
||||
#COMMAND cmake -E remove_directory ${romfs_temp_dir}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${bin_to_obj}
|
||||
--ld ${LD} --c_flags ${CMAKE_C_FLAGS}
|
||||
--include_path "${CMAKE_SOURCE_DIR}/src/include"
|
||||
--include_path "${PX4_SOURCE_DIR}/src/include"
|
||||
--c_compiler ${CMAKE_C_COMPILER}
|
||||
--nm ${NM} --objcopy ${OBJCOPY}
|
||||
--obj romfs.o
|
||||
@@ -414,7 +414,7 @@ function(px4_os_add_flags)
|
||||
LINK_DIRS ${LINK_DIRS}
|
||||
DEFINITIONS ${DEFINITIONS})
|
||||
|
||||
set(nuttx_export_dir ${CMAKE_BINARY_DIR}/${BOARD}/NuttX/nuttx-export)
|
||||
set(nuttx_export_dir ${PX4_BINARY_DIR}/${BOARD}/NuttX/nuttx-export)
|
||||
set(added_include_dirs
|
||||
${nuttx_export_dir}/include
|
||||
${nuttx_export_dir}/include/cxx
|
||||
@@ -450,55 +450,8 @@ function(px4_os_add_flags)
|
||||
endif()
|
||||
|
||||
set(cpu_flags)
|
||||
if (${BOARD} STREQUAL "px4fmu-v1")
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m4
|
||||
-mthumb
|
||||
-march=armv7e-m
|
||||
-mfpu=fpv4-sp-d16
|
||||
-mfloat-abi=hard
|
||||
)
|
||||
elseif (${BOARD} STREQUAL "px4fmu-v2")
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m4
|
||||
-mthumb
|
||||
-march=armv7e-m
|
||||
-mfpu=fpv4-sp-d16
|
||||
-mfloat-abi=hard
|
||||
)
|
||||
elseif (${BOARD} STREQUAL "px4fmu-v4")
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m4
|
||||
-mthumb
|
||||
-march=armv7e-m
|
||||
-mfpu=fpv4-sp-d16
|
||||
-mfloat-abi=hard
|
||||
)
|
||||
elseif (${BOARD} STREQUAL "px4-stm32f4discovery")
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m4
|
||||
-mthumb
|
||||
-march=armv7e-m
|
||||
-mfpu=fpv4-sp-d16
|
||||
-mfloat-abi=hard
|
||||
)
|
||||
elseif (${BOARD} STREQUAL "aerocore")
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m4
|
||||
-mthumb
|
||||
-march=armv7e-m
|
||||
-mfpu=fpv4-sp-d16
|
||||
-mfloat-abi=hard
|
||||
)
|
||||
elseif (${BOARD} STREQUAL "mindpx-v2")
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m4
|
||||
-mthumb
|
||||
-march=armv7e-m
|
||||
-mfpu=fpv4-sp-d16
|
||||
-mfloat-abi=hard
|
||||
)
|
||||
elseif (${BOARD} STREQUAL "px4io-v1")
|
||||
# Handle non-F4 boards specifically here
|
||||
if (${BOARD} STREQUAL "px4io-v1")
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m3
|
||||
-mthumb
|
||||
@@ -510,6 +463,14 @@ function(px4_os_add_flags)
|
||||
-mthumb
|
||||
-march=armv7-m
|
||||
)
|
||||
else ()
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m4
|
||||
-mthumb
|
||||
-march=armv7e-m
|
||||
-mfpu=fpv4-sp-d16
|
||||
-mfloat-abi=hard
|
||||
)
|
||||
endif()
|
||||
list(APPEND c_flags ${cpu_flags})
|
||||
list(APPEND cxx_flags ${cpu_flags})
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#
|
||||
|
||||
include(common/px4_base)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/posix)
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/posix)
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
@@ -101,7 +101,7 @@ function(px4_posix_generate_builtin_commands)
|
||||
math(EXPR command_count "${command_count}+1")
|
||||
endif()
|
||||
endforeach()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/posix/apps.h_in
|
||||
configure_file(${PX4_SOURCE_DIR}/cmake/posix/apps.h_in
|
||||
${OUT})
|
||||
endfunction()
|
||||
|
||||
@@ -223,8 +223,19 @@ if ("${BOARD}" STREQUAL "eagle" OR "${BOARD}" STREQUAL "excelsior")
|
||||
-Wl,-rpath-link,${HEXAGON_ARM_SYSROOT}/lib/arm-linux-gnueabihf
|
||||
--sysroot=${HEXAGON_ARM_SYSROOT}
|
||||
)
|
||||
else()
|
||||
elseif ("${BOARD}" STREQUAL "rpi" AND "$ENV{RPI_USE_CLANG}" STREQUAL "1")
|
||||
|
||||
# Add the toolchain specific flags
|
||||
set(clang_added_flags
|
||||
-m32
|
||||
--target=arm-linux-gnueabihf
|
||||
-ccc-gcc-name arm-linux-gnueabihf
|
||||
--sysroot=${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/)
|
||||
|
||||
set(added_c_flags ${POSIX_CMAKE_C_FLAGS} ${clang_added_flags})
|
||||
set(added_cxx_flags ${POSIX_CMAKE_CXX_FLAGS} ${clang_added_flags})
|
||||
set(added_exe_linker_flags ${POSIX_CMAKE_EXE_LINKER_FLAGS} ${clang_added_flags})
|
||||
else()
|
||||
# Add the toolchain specific flags
|
||||
set(added_cflags ${POSIX_CMAKE_C_FLAGS})
|
||||
set(added_cxx_flags ${POSIX_CMAKE_CXX_FLAGS})
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#
|
||||
|
||||
include(common/px4_base)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/qurt)
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/qurt)
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
@@ -95,7 +95,7 @@ function(px4_qurt_generate_builtin_commands)
|
||||
math(EXPR command_count "${command_count}+1")
|
||||
endif()
|
||||
endforeach()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/qurt/apps.h_in ${OUT})
|
||||
configure_file(${PX4_SOURCE_DIR}/cmake/qurt/apps.h_in ${OUT})
|
||||
endfunction()
|
||||
|
||||
#=============================================================================
|
||||
|
||||
@@ -1,334 +0,0 @@
|
||||
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)
|
||||
|
||||
## 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)
|
||||
|
||||
## System dependencies are found with CMake's conventions
|
||||
# find_package(Boost REQUIRED COMPONENTS system)
|
||||
|
||||
|
||||
## 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()
|
||||
|
||||
################################################
|
||||
## Declare ROS messages, services and actions ##
|
||||
################################################
|
||||
|
||||
## 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 ...)
|
||||
|
||||
## Generate messages in the 'msg' folder
|
||||
add_message_files(
|
||||
FILES
|
||||
actuator_armed.msg
|
||||
actuator_controls.msg
|
||||
commander_state.msg
|
||||
control_state.msg
|
||||
distance_sensor.msg
|
||||
manual_control_setpoint.msg
|
||||
mc_virtual_rates_setpoint.msg
|
||||
offboard_control_mode.msg
|
||||
parameter_update.msg
|
||||
position_setpoint.msg
|
||||
position_setpoint_triplet.msg
|
||||
rc_channels.msg
|
||||
ros/actuator_controls_0.msg
|
||||
ros/actuator_controls_virtual_mc.msg
|
||||
vehicle_attitude.msg
|
||||
vehicle_attitude_setpoint.msg
|
||||
vehicle_control_mode.msg
|
||||
vehicle_force_setpoint.msg
|
||||
vehicle_global_velocity_setpoint.msg
|
||||
vehicle_local_position.msg
|
||||
vehicle_local_position_setpoint.msg
|
||||
vehicle_rates_setpoint.msg
|
||||
vehicle_status.msg
|
||||
)
|
||||
|
||||
## Generate services in the 'srv' folder
|
||||
# add_service_files(
|
||||
# FILES
|
||||
# Service1.srv
|
||||
# Service2.srv
|
||||
# )
|
||||
|
||||
## Generate actions in the 'action' folder
|
||||
# add_action_files(
|
||||
# FILES
|
||||
# Action1.action
|
||||
# Action2.action
|
||||
# )
|
||||
|
||||
## Generate added messages and services with any dependencies listed here
|
||||
generate_messages(
|
||||
DEPENDENCIES
|
||||
std_msgs
|
||||
gazebo_msgs
|
||||
)
|
||||
|
||||
###################################
|
||||
## 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
|
||||
)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
## 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
|
||||
${CMAKE_BINARY_DIR}/src/modules
|
||||
src/
|
||||
src/lib
|
||||
src/lib/matrix
|
||||
${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_files.py
|
||||
--headers -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)
|
||||
|
||||
## Tests on multiplatform SITL (deprecated) have been moved to POSIX SITL
|
||||
#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()
|
||||
@@ -2,7 +2,7 @@ INFO Shell id is 47996278451456
|
||||
WARN 1 starting task wkr_high (file /home/jgoppert/git/px4/cmake-Firmware/src/platforms/posix/px4_layer/px4_posix_tasks.cpp line 146)
|
||||
WARN 54 starting task wkr_low (file /home/jgoppert/git/px4/cmake-Firmware/src/platforms/posix/px4_layer/px4_posix_tasks.cpp line 146)
|
||||
WARN 100 starting task wkr_hrt (file /home/jgoppert/git/px4/cmake-Firmware/src/platforms/posix/px4_layer/px4_posix_tasks.cpp line 146)
|
||||
App name: mainapp
|
||||
App name: px4
|
||||
Enter a command and its args:
|
||||
----------------------------------
|
||||
Running: uorb
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
include(CMakeForceCompiler)
|
||||
|
||||
if ($ENV{RPI_TOOLCHAIN_DIR} STREQUAL "")
|
||||
message(FATAL_ERROR "RPI_TOOLCHAIN_DIR not set")
|
||||
else()
|
||||
set(RPI_TOOLCHAIN_DIR $ENV{RPI_TOOLCHAIN_DIR})
|
||||
endif()
|
||||
|
||||
# this one is important
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
|
||||
#this one not so much
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
# specify the cross compiler
|
||||
# requires a symbolic link typically from /usr/bin/clang
|
||||
find_program(C_COMPILER clang
|
||||
PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(NOT C_COMPILER)
|
||||
message(FATAL_ERROR "could not find C compiler")
|
||||
endif()
|
||||
cmake_force_c_compiler(${C_COMPILER} Clang)
|
||||
|
||||
find_program(CXX_COMPILER clang++
|
||||
PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(NOT CXX_COMPILER)
|
||||
message(FATAL_ERROR "could not find C++ compiler")
|
||||
endif()
|
||||
cmake_force_cxx_compiler(${CXX_COMPILER} Clang)
|
||||
|
||||
# compiler tools
|
||||
foreach(tool objcopy nm ld)
|
||||
string(TOUPPER ${tool} TOOL)
|
||||
find_program(${TOOL} arm-linux-gnueabihf-${tool}
|
||||
PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
if(NOT ${TOOL})
|
||||
message(FATAL_ERROR "could not find arm-linux-gnueabihf-${tool}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# os tools
|
||||
foreach(tool echo grep rm mkdir nm cp touch make unzip)
|
||||
string(TOUPPER ${tool} TOOL)
|
||||
find_program(${TOOL} ${tool})
|
||||
if(NOT ${TOOL})
|
||||
message(FATAL_ERROR "could not find ${TOOL}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
add_definitions(
|
||||
-D __RPI
|
||||
)
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
|
||||
|
||||
# search for programs in the build host directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
# for libraries and headers in the target directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
@@ -71,7 +71,7 @@ foreach(tool echo grep rm mkdir nm cp touch make unzip)
|
||||
endforeach()
|
||||
|
||||
add_definitions(
|
||||
-D __RPI2
|
||||
-D __RPI
|
||||
)
|
||||
|
||||
set(LINKER_FLAGS "-Wl,-gc-sections")
|
||||
|
||||
@@ -25,7 +25,16 @@ TEST_RESULT_TARGET_DIR=$JOB_DIR/test_results
|
||||
# EXPORT_CHARTS=/sitl/testing/export_charts.py
|
||||
|
||||
# source ROS env
|
||||
source /opt/ros/indigo/setup.bash
|
||||
if [ -f /opt/ros/indigo/setup.bash ]
|
||||
then
|
||||
source /opt/ros/indigo/setup.bash
|
||||
elif [ -f /opt/ros/kinetic/setup.bash ]
|
||||
then
|
||||
source /opt/ros/kinetic/setup.bash
|
||||
else
|
||||
echo "could not find /opt/ros/{ros-distro}/setup.bash"
|
||||
exit 1
|
||||
fi
|
||||
source $SRC_DIR/integrationtests/setup_gazebo_ros.bash $SRC_DIR
|
||||
|
||||
echo "deleting previous test results ($TEST_RESULT_TARGET_DIR)"
|
||||
|
||||
Submodule mavlink/include/mavlink/v2.0 updated: 1e2920c68d...17231c3777
+2
-1
@@ -49,7 +49,6 @@ set(msg_file_names
|
||||
distance_sensor.msg
|
||||
ekf2_innovations.msg
|
||||
ekf2_replay.msg
|
||||
encoders.msg
|
||||
esc_report.msg
|
||||
esc_status.msg
|
||||
estimator_status.msg
|
||||
@@ -61,10 +60,12 @@ set(msg_file_names
|
||||
fw_virtual_attitude_setpoint.msg
|
||||
fw_virtual_rates_setpoint.msg
|
||||
geofence_result.msg
|
||||
gps_dump.msg
|
||||
gps_inject_data.msg
|
||||
hil_sensor.msg
|
||||
home_position.msg
|
||||
input_rc.msg
|
||||
log_message.msg
|
||||
manual_control_setpoint.msg
|
||||
mavlink_log.msg
|
||||
mc_att_ctrl_status.msg
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
uint32 id # ID of the estimator, commonly the component ID of the incoming message
|
||||
|
||||
uint64 timestamp_boot # time of this estimate, in microseconds since system start
|
||||
uint64 timestamp_computer # timestamp provided by the companion computer, in us
|
||||
uint64 timestamp_received # timestamp when the estimate was received
|
||||
|
||||
float32[4] q # Estimated attitude as quaternion
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
float32 load # processor load from 0 to 1
|
||||
float32 ram_usage # RAM usage from 0 to 1
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
uint64 time_ref # ekf2 reference time. This is a timestamp passed to the
|
||||
# estimator which it uses a absolute reference.
|
||||
uint64 gyro_integral_dt # gyro integration period in us
|
||||
uint64 accelerometer_integral_dt # accelerometer integration period in us
|
||||
float32 gyro_integral_dt # gyro integration period in s
|
||||
float32 accelerometer_integral_dt # accelerometer integration period in s
|
||||
uint64 magnetometer_timestamp # timestamp of magnetometer measurement in us
|
||||
uint64 baro_timestamp # timestamp of barometer measurement in us
|
||||
uint64 rng_timestamp # timestamp of range finder measurement in us
|
||||
@@ -9,8 +9,8 @@ uint64 flow_timestamp # timestamp of optical flow measurement in us
|
||||
uint64 asp_timestamp # timestamp of airspeed measurement in us
|
||||
uint64 ev_timestamp # timestamp of external vision measurement in us
|
||||
|
||||
float32[3] gyro_integral_rad # integrated gyro vector in rad
|
||||
float32[3] accelerometer_integral_m_s # integrated accelerometer vector in m/s
|
||||
float32[3] gyro_rad # gyro vector in rad
|
||||
float32[3] accelerometer_m_s2 # accelerometer vector in m/s^2
|
||||
|
||||
float32[3] magnetometer_ga # magnetometer measurement vector (body fixed NED) in ga
|
||||
float32 baro_alt_meter # barometer altitude measurement in m
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
uint8 NUM_ENCODERS = 4
|
||||
|
||||
int64[4] counts # counts of encoder
|
||||
float32[4] velocity # counts of encoder/ second
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user