Compare commits

..

801 Commits

Author SHA1 Message Date
David Sidrane add2aa0680 Update Nuttx Submodule to included Proper MAC El Capitan USB fix ==master (#5385) 2016-08-25 21:59:59 +02:00
Lorenz Meier 1dfe51b11b Travis CI: OS X needs to build at least onene Firmware target 2016-08-25 21:48:30 +02:00
Lorenz Meier f511d49cc2 Improvements to SITL to make paths more flexible. (#5181) (#5255)
* Path cleanup for SITL.

* Restructured sitl scripts dir.

* Set integration tests to use ekf2 for vtol.

* Fix sitl paths for mac.
2016-08-25 21:47:45 +02:00
Beat Küng 61f7470e7e df wrappers: fix invalid NaN to int16 conversion (set to 0 instead)
The result of this conversion is undefined!
2016-08-25 13:14:15 +02:00
Beat Küng a7ef9b4954 fix navio_gpio: use uintptr_t for pointer type instead of uint32_t 2016-08-25 13:14:15 +02:00
Beat Küng 4b6e6572b9 fix navio_sysfs_pwm_out: use correct type for buflen (required by MultirotorMixer::from_text) 2016-08-25 13:14:15 +02:00
David Sidrane d4530d3a39 Update Nuttx Submodule to included MAC El Capitan USB fix ==master (#5380) 2016-08-25 09:24:52 +02:00
Tiktiki 111b41bc86 Removed configuration files from master (depreciated). (#5379)
* Update multi_tables.py

* Update mixer_multirotor.cpp

* Create gk

* Rename gk to 13011_greenkoptr

* Update 13011_greenkoptr

* Create greenkoptr.main

* Update and rename greenkoptr.main to greenkoptr.main.mix

* Create greenkoptr.aux.mix

* Update greenkoptr.main.mix

* Update 13011_greenkoptr

* Update multi_tables.py

Corrected HEX_T position and rotation for motors 1-2-5-6

* Delete 13011_greenkoptr

* Delete greenkoptr.aux.mix

* Delete greenkoptr.main.mix

* Update mixer_multirotor.cpp
2016-08-25 00:32:35 +02:00
Mark Whitehorn 545152f676 remove "transitional support" (#5378) 2016-08-24 23:05:39 +02:00
Beat Küng 96384bdc29 df wrappers: add drv_hrt.h include 2016-08-24 21:30:50 +02:00
Beat Küng eede43a786 px4_log.h: move px4_log_initialize() out of #ifdef 2016-08-24 21:24:35 +02:00
Beat Küng b8e247a018 muorb: add drv_hrt.h include for hrt_absolute_time 2016-08-24 21:24:35 +02:00
Beat Küng 441a05d976 uorb unittests stubs: add orb_advertise_queue 2016-08-24 21:24:35 +02:00
Beat Küng 528ca931af logger: only add data message to the log if orb_copy succeeds, when adding a new instance 2016-08-24 21:24:35 +02:00
Beat Küng df53fb0fde logging: publish a message for PX4_{WARN,ERR} & store them to the ulog file
- ulog file message rate limited to 50Hz
- queuing with size 2
- this replaces the mavlink log message in the ulog
  (but the mavlink warnings & errors still go to the ulog)
2016-08-24 21:24:35 +02:00
Beat Küng eae1585e38 logger: store full file name in logger, remove it from log writer
- also add log file to the status output
2016-08-24 21:24:35 +02:00
Beat Küng aefd217fc0 uorb subscription: remove _interval & use orb_get_interval() instead 2016-08-24 21:24:35 +02:00
Beat Küng 6b4c24fb12 px4_log: remove __px4_log_level_current
- there is no way to change it at runtime
- it was implemented wrong (<= comparison disabled the PANIC log level)
2016-08-24 21:24:35 +02:00
Beat Küng e2afb0be6b px4_log.h: remove hrt_absolute_time() declaration (it does not belong here) 2016-08-24 21:24:35 +02:00
Beat Küng d404359888 local_position_estimator_main: warnx -> PX4_{WARN,INFO,DEBUG} 2016-08-24 21:24:35 +02:00
Julian Oes 14ed65f0e4 sitl_run.sh: use ps instead of jps (#5376)
The tool jps does not seem to be available on macos Java.
2016-08-24 17:07:14 +02:00
Beat Küng 0127f4017a NuttX: update submodule 2016-08-23 20:17:16 +02:00
Lorenz Meier fadac79617 Add 9250 startup for FMUv2 2016-08-23 19:51:57 +02:00
Beat Küng 1fffd731b1 print_load_posix under DARWIN: remove unused variable basic_info (#5364) 2016-08-23 09:09:55 +02:00
Lorenz Meier 79678c5f25 MPU6K fix code style 2016-08-19 22:24:41 +02:00
Bart Slinger 7f04e3c759 Helicopter aiframe and basic PID control (#5339)
* Helicopter aiframe and basic PID control

* codestyle

* Blade 130x gains working but not optimal

* Changed behaviour of feedforward for all multicopter
2016-08-19 22:20:59 +02:00
Mark Whitehorn 75c95955fc Update 4050_generic_250 (#5343) 2016-08-19 22:20:27 +02:00
Mark Whitehorn 1b5964dc42 Update 4009_qav250 (#5344) 2016-08-19 22:19:47 +02:00
Lorenz Meier 7579ebf4e8 Fix failing mac test 2016-08-19 22:19:05 +02:00
Julian Oes 62297c3d86 DriverFramework: updated submodule (#5351)
- Fix if _retries variable is not set to prevent "UINT_MAX-1"
  retries.
- Update for the cmake_hexagon submodule.
2016-08-19 22:17:13 +02:00
Gus Grubba 821d7062df Support for new log file extension. (#5355) 2016-08-19 22:16:46 +02:00
Lorenz Meier 306a911dc9 Fix MPU6K driver ICM extensions 2016-08-19 22:09:05 +02:00
Beat Küng c3c8fa55b3 RC st24: change channel input range from [0,4096] to [500,3500] (#5350)
QGC failed to calibrate RC with the old range.
2016-08-19 20:45:56 +02:00
Lorenz Meier fe62c259e8 Fix MPU6K initialization 2016-08-19 11:10:11 +02:00
James Goppert 90b509a73f Update driver framework. (#5347) 2016-08-18 19:32:57 -04:00
James Goppert 372d16ee5e Update matrix. (#5346) 2016-08-18 18:01:55 -04:00
James Goppert 569e87d46b Update sitl gazebo. (#5345) 2016-08-18 17:22:13 -04:00
Lorenz Meier 192cde408a Remove unnecessary C++11 usage in UAVCAN 2016-08-18 21:44:15 +02:00
James Goppert 818840b576 Path cleanup, low impact changes (#5340)
* Low impact changes from path_cleanup branch.

This is a step towards minimizing the diff with path_cleanup branch.

* Update ecl.

* Revert matrix update.

* Revert ecl and matrix.

* Update sitl gazebo.

* Revert sitl_gazebo and matrix changes.
2016-08-18 15:37:23 -04:00
Lorenz Meier d32a7ffb8d Probe for ICM20608 2016-08-18 21:02:48 +02:00
Pavel Kirienko 24e90e3c90 UAVCAN servers: fixed member initialization; removed dead stuff 2016-08-18 17:14:53 +02:00
Pavel Kirienko d12be196a2 Fixed #5153 2016-08-18 17:14:53 +02:00
Pavel Kirienko 2784c3c5f0 Improved uavcan activity indication 2016-08-18 17:14:53 +02:00
Pavel Kirienko 64d7946cdc Fixed beep duration 2016-08-18 17:14:53 +02:00
Pavel Kirienko 36efc8c83e Fixed beeping 2016-08-18 17:14:53 +02:00
Pavel Kirienko 61ffc6c432 Fixed implementation of the ESC auto-enumeration feature 2016-08-18 17:14:53 +02:00
Pavel Kirienko 2fad9a6397 ESC status: printing temperature in Celsius 2016-08-18 17:14:53 +02:00
Pavel Kirienko 42031ab572 Better beeping during ESC enumeration 2016-08-18 17:14:53 +02:00
Pavel Kirienko e27d3f4e13 Added new configuration parameter UAVCAN_ESC_IDLT.
This parameter, when enabled, enforces that the UAVCAN ESC driver never outputs zero throttle
while the system is armed. This feature is disabled by default, so the change will not break
the experience of current users.
2016-08-18 17:14:53 +02:00
Hidenori 2ba70c5d89 rename Tools/rpi/clang-check.sh to Tools/clang-tool.sh
extended in two ways: target specification and tool selection.
2016-08-18 16:11:05 +02:00
Hidenori 211c2b9ca6 Rename clang toolchain file 2016-08-18 16:11:05 +02:00
Hidenori 9181f97f71 RPi: move clang-check.sh to Tools/rpi 2016-08-18 16:11:05 +02:00
Hidenori a1f89e4fd9 RPi: add a comment to clang-check.sh 2016-08-18 16:11:05 +02:00
Hidenori a8d3b15d73 RPi: add clang & clang-check support 2016-08-18 16:11:05 +02:00
Lorenz Meier ae00abe468 Fix typo 2016-08-18 15:44:51 +02:00
Tiktiki dfed00d870 Update multi_tables.py
Corrected HEX_T position and rotation for motors 1-2-5-6
2016-08-18 15:27:32 +02:00
Tiktiki 03e5d7490f Update 13011_greenkoptr 2016-08-18 15:26:26 +02:00
Tiktiki 7d4e7aff20 Create greenkoptr.main
Update and rename greenkoptr.main to greenkoptr.main.mix

Create greenkoptr.aux.mix

Update greenkoptr.main.mix
2016-08-18 15:26:25 +02:00
Tiktiki a962098645 Create gk
Rename gk to 13011_greenkoptr

Update 13011_greenkoptr
2016-08-18 15:26:21 +02:00
Tiktiki 021da9b2e1 Update mixer_multirotor.cpp 2016-08-18 15:25:24 +02:00
Tiktiki 3daf4a3a67 Update multi_tables.py 2016-08-18 15:25:24 +02:00
Andreas Bircher 9fe95275bb removing unnecessary parts 2016-08-18 15:12:39 +02:00
Andreas Bircher 70cd06bc84 initial version camera turn on / off 2016-08-18 15:12:39 +02:00
Lorenz Meier a97c5ec4e1 MPU6K compile and code style fixes 2016-08-18 13:50:29 +02:00
Lorenz Meier 3d1f1522d9 MPU6K driver improvements 2016-08-18 12:55:54 +02:00
sander 1efe011522 code style 2016-08-17 23:58:04 +02:00
sander 5bb36162be Start time based transition blending half-way 2016-08-17 23:58:04 +02:00
sander e6834579e5 Use altitude acc rad 2016-08-17 23:58:04 +02:00
sander 7afa21ebb7 Revert altitude acceptance radius to combat overshoot 2016-08-17 23:58:04 +02:00
Mark Whitehorn f1a1c9d7da add breakpoint and slope params for TPA 2016-08-17 23:15:36 +02:00
Mark Whitehorn 5c78af0f36 simple linear throttle PID attenuation test 2016-08-17 23:15:29 +02:00
JochiPochi 31e634b082 mpu6000 driver: set icm registers only on icm devices 2016-08-17 20:50:44 +02:00
JochiPochi e3557e0d3e mpu6000 driver: Add DLPF set function for IMC20608 2016-08-17 20:50:44 +02:00
JochiPochi ce27cc8326 mpu6000: Separate DLPF params for MPU and ICM family of sensors 2016-08-17 20:50:44 +02:00
Lorenz Meier 9f9c51eab3 Fix MPU6500 devtype define 2016-08-16 23:32:44 +02:00
James Goppert 7472c9033b Formatting fix. 2016-08-16 01:39:47 -04:00
Lorenz Meier 73362f325b Update mapping 2016-08-15 23:31:58 +02:00
Lorenz Meier 39ce001c41 MAVLink: use only the memory it needs 2016-08-15 19:53:21 +02:00
Lorenz Meier d810726c6e EKF2: Only use the memory it needs 2016-08-15 19:53:21 +02:00
Lorenz Meier a7ad722b98 Use less memory for ESC driver 2016-08-15 19:53:21 +02:00
Lorenz Meier 7cc0b32e74 Make altitude more efficient and estimator status safe in terms of memory overflow 2016-08-15 19:53:21 +02:00
Lorenz Meier 5786b73772 Tweak startup order for memory 2016-08-15 19:53:21 +02:00
Lorenz Meier a130b6a65c style cleanup 2016-08-15 19:53:21 +02:00
Lorenz Meier 1a9688c42f Commander: signal high memory usage 2016-08-15 14:58:33 +02:00
Lorenz Meier 8934aaa912 Load mon: populate memory usage i field for NuttX 2016-08-15 14:53:48 +02:00
Lorenz Meier eceb7e21b2 Include memory in CPU load message 2016-08-15 14:53:26 +02:00
Lorenz Meier 8b66a76432 Fix FMU init 2016-08-15 10:49:43 +02:00
Lorenz Meier 4b9e1d58f7 Fix ESC driver to also include direction information 2016-08-15 10:49:43 +02:00
Lorenz Meier 0c9ead44f1 Update ASCv1 template 2016-08-15 10:49:43 +02:00
Lorenz Meier e6dcc0a2ed Complete ASC config 2016-08-15 10:49:43 +02:00
Lorenz Meier 90b5fcc1ec Strip tone alarm 2016-08-15 10:49:43 +02:00
Lorenz Meier 7ef8d197c6 Patch up ASC config 2016-08-15 10:49:43 +02:00
James Goppert b36d705688 Update matrix. (#5310) 2016-08-12 14:24:35 -04:00
James Goppert bedf081d92 Sitl gazebo update. (#5309) 2016-08-12 13:49:48 -04:00
Lorenz Meier 5d0f57d61e Update Makefile to build for QGC 2016-08-12 13:55:16 +02:00
Lorenz Meier 0551275b9c Update prototype and board ID 2016-08-12 13:55:16 +02:00
Lorenz Meier ed6c63e48f TAPv1: Harmonize with FMUv1 (since they are pretty much the same) 2016-08-12 13:55:16 +02:00
Lorenz Meier f231feb0f6 FMUv1: Harmonize with FMUv2 2016-08-12 13:55:16 +02:00
Lorenz Meier 39303aa87a Set default battery config 2016-08-12 13:55:16 +02:00
David Sidrane ac1003875a USB Fix:iForce Soft Disconnect
The STM32F404 OTG FS has an internal soft pull-up.

The HW also has one too. So we need to overcome it to force a soft disconnect.
2016-08-12 13:55:16 +02:00
David Sidrane 6f973f1d6c Better Portability with clear naming 2016-08-12 13:55:16 +02:00
David Sidrane b9d93f2cad OTG_FS_ID that is on PA10 is managed by stm32 otg fs device Driver
N.B The driver set FDMOD, Force device mode and Writing a 1 to this bit
forces the core to device mode irrespective of the OTG_FS_ID input
pin.
2016-08-12 13:55:16 +02:00
David Sidrane 6173649c43 Minor corrections 2016-08-12 13:55:16 +02:00
Lorenz Meier 8bd4a624a7 Added voltage scaling. Need to move this to board_config.h instead 2016-08-12 13:55:16 +02:00
Lorenz Meier d21023c966 FMU: Power on radio if prsent 2016-08-12 13:55:16 +02:00
Lorenz Meier 2fad39aaae tap: Init both USB pins 2016-08-12 13:55:16 +02:00
Lorenz Meier 3fff9e5826 Harmonize TAP config with FMUv4 config 2016-08-12 13:55:16 +02:00
Lorenz Meier 3203d3f770 More USB buffer 2016-08-12 13:55:16 +02:00
Lorenz Meier 7e878e221c FMUv4: Code style 2016-08-12 13:55:16 +02:00
Lorenz Meier 5678b4cc83 Enable RC lib 2016-08-12 13:55:16 +02:00
Lorenz Meier 957b01a8eb Enable serial for RC input 2016-08-12 13:55:16 +02:00
Lorenz Meier 63275ef92f Sensors: Perform init on best effort basis 2016-08-12 13:55:16 +02:00
Lorenz Meier c3022bf713 FMU: Accomodate serial only RC input 2016-08-12 13:55:16 +02:00
Lorenz Meier 1c0a494b4d Code style 2016-08-12 13:55:16 +02:00
Lorenz Meier 64e47f2fae Boot improvements for TAP 2016-08-12 13:55:16 +02:00
Lorenz Meier a52d0ca00a Remove hysteresis tests on Mac OS 2016-08-12 13:53:02 +02:00
Andreas Antener 2e44fe9edd update previous waypoint before transition command 2016-08-12 11:50:38 +02:00
Lorenz Meier 5175d45e74 Update Gazebo 2016-08-11 22:07:19 +02:00
Andreas Antener 5eaf104318 fixed optimal recovery condition 2016-08-10 22:47:26 +02:00
Andreas Antener 853a5b77fd disabled attitude setpoint change in MC controller when optimal recovery is active 2016-08-10 22:47:26 +02:00
Andreas Antener 9087ef5990 only recalculate rotation matrix and quaternion when not in velocity control 2016-08-10 22:47:26 +02:00
Andreas Antener ae533b01b6 removed unused code 2016-08-10 22:47:26 +02:00
David Sidrane deeefe5dd1 Describe the issues that requires the +=2 on arg[c|v] for NuttX (#5293)
This may be moot and should be revisited if only px4_getops is used, but this pr politely documents the reson for the logic.
2016-08-10 06:19:59 -10:00
Lorenz Meier 17561daefb TAP power: Shut down faster 2016-08-10 12:33:04 +02:00
Andreas Daniel Antener 9f4a91ab19 initialize waypoint transfer sequence with -1 (#5274) 2016-08-10 08:39:54 +02:00
huanglilong 6f7b78821a fix fake gps bugs (#5285) 2016-08-09 21:24:11 +02:00
Lorenz Meier c62b886da5 Ua venture hottupdate (#5289)
* Change default port to Serial4 and improve status outputs.

* Reduce stack size.
2016-08-09 21:19:41 +02:00
Lorenz Meier b8c377b91a Temporarily disable new logger 2016-08-09 16:00:42 +02:00
Lorenz Meier a664747d0a Remove unused sensors 2016-08-09 16:00:28 +02:00
Lorenz Meier 43f772154c TAP: adjust ESC buffer size 2016-08-09 16:00:00 +02:00
Lorenz Meier aae3a37983 GPS: Do not use nonblocking access 2016-08-09 15:59:34 +02:00
Daniel Agar 12a5ce7a0a temporarily disable uorb test on OSX (#5280) 2016-08-08 20:59:24 -04:00
Lorenz Meier 630cebeabc Relax uORB test for Darwin CI system 2016-08-07 14:05:03 +02:00
Lorenz Meier e24d18f810 Hysteresis test: Relax time for all tests for OS X CI system 2016-08-07 14:05:03 +02:00
Lorenz Meier 207a04bba0 Fix uORB tests for Mac OS 2016-08-07 14:05:03 +02:00
Lorenz Meier ead8e31de4 Hysteresis test: Fix for Mac OS CI 2016-08-07 14:05:03 +02:00
Lorenz Meier 7b5917567a Fix Mixer test for OS X 2016-08-07 14:05:03 +02:00
Daniel Agar 8b9bef3872 osx fix and enable tests 2016-08-07 14:05:03 +02:00
Roman Bapst ba047f234d ekf2 replay: added magic values for range min/max distance (#5268)
- replay was not working without these values as only range measurements
were given to the filter which were between the min/max value

Signed-off-by: Roman <bapstroman@gmail.com>
2016-08-07 11:30:54 +02:00
Lorenz Meier 393acf2231 Start ESC drivers 2016-08-07 11:15:48 +02:00
Lorenz Meier 0e9c352927 Simplify TAP config 2016-08-07 11:15:48 +02:00
David Sidrane c5e11cd16f TAP:Added i2c speed setting to init 2016-08-07 11:15:48 +02:00
David Sidrane e8ae0fe13c Made the MPU6000 driver a highbread using both hrt for SPI or workqueue for I2C 2016-08-07 11:15:48 +02:00
David Sidrane 5f342c3b5f Added I2C to MPU6000 driver 2016-08-07 11:15:48 +02:00
Lorenz Meier a0cad961b3 Remove non-used app from config 2016-08-07 11:12:20 +02:00
Lorenz Meier 58135d892b Sync estimator CMake configs for all boards 2016-08-07 10:40:17 +02:00
Lorenz Meier 990304ee22 Fix check code style to work on Mac OS 2016-08-07 10:40:17 +02:00
Lorenz Meier a73d5037f2 Fix FMUv4 build 2016-08-07 10:40:17 +02:00
Lorenz Meier cf776aeb0a Fix compilation of examples 2016-08-07 10:40:17 +02:00
Lorenz Meier 148b6e6135 Update CMake config paths 2016-08-07 10:40:17 +02:00
Lorenz Meier cba4bcd2fb Multiplatform controllers: Move to examples and fix code style 2016-08-07 10:40:17 +02:00
Lorenz Meier ee5cdab963 Move old estimators to examples 2016-08-07 10:40:17 +02:00
Daniel Agar cff9e90bec position_estimator_inav fix and enforce code style 2016-08-07 10:40:17 +02:00
Daniel Agar 4049ec2e96 mc_pos_control fix and enforce code style 2016-08-07 10:40:17 +02:00
Daniel Agar d4196f7f0c mc_att_control fix and enforce code style 2016-08-07 10:40:17 +02:00
Daniel Agar 8f01324890 ekf2 fix and enforce code style 2016-08-07 10:40:17 +02:00
Daniel Agar 968a3d499b add make format (check_code_style_all.sh --fix) 2016-08-07 10:40:17 +02:00
Daniel Agar a260a6eead check code style list unformatted modules 2016-08-07 10:40:17 +02:00
Lorenz Meier 61d5d8ce2a Makefile: Remove remaining EKF2 config bits 2016-08-07 10:39:51 +02:00
Lorenz Meier 3cc64b3b7b LPE: Remove unused var 2016-08-07 10:39:31 +02:00
Lorenz Meier fb4c620f94 Replace EKF1 with EKF2 in rover config 2016-08-06 23:34:35 +02:00
Julian Oes 68986604e9 df_mpu9250_wrapper: calibration after rotation
Same as for the df_hmc5883_wrapper.
2016-08-06 21:01:37 +02:00
Julian Oes 1dd2c94949 df_hmc5883_wrapper: use calibration after rotation
The calibration values need to be applied after the rotation, otherwise
the offsets and scale can be applied to the wrong axes.
2016-08-06 21:01:37 +02:00
Daniel Agar 2a15578f8d FW implement MAV_CMD_DO_GO_AROUND 2016-08-06 20:56:53 +02:00
Hidenori aa3ffa28c8 add copyright header 2016-08-06 20:47:55 +02:00
Hidenori 5920711c20 fix style 2016-08-06 20:47:55 +02:00
Hidenori eded7bf772 Navio: add rgbled test and tweak implementation 2016-08-06 20:47:55 +02:00
Hidenori 9a5f88d6bf Navio: fix GPIO register definition 2016-08-06 20:47:55 +02:00
Hidenori ff647e7bc8 Navio: GPIO driver command fix and update ifdefs 2016-08-06 20:47:55 +02:00
Hidenori 3049b9af01 Navio2: add support for GPIO and RGBLED 2016-08-06 20:47:55 +02:00
Lorenz Meier 40ba3f5131 Initial config for ASC module 2016-08-06 20:45:11 +02:00
Beat Küng c0e3ab632e orb: proper locking for DeviceNode::{add,remove}_internal_subscriber 2016-08-06 20:44:23 +02:00
Beat Küng b86cf2b017 orb status: print information about lost messages 2016-08-06 20:44:23 +02:00
Beat Küng 7280f71cef orb: rm static from DeviceMaster::_node_map & use the non-static getDeviceNode in uORB::Manager
Reasons:
- DeviceMaster::_node_map does not need to be shared among instances,
  because there is at most 1 instance per Flavor and different Flavors
  have non-intersecting device paths.
- Keeping it static would also require a static lock
- DeviceMaster::_node_map was not locked at all when used from
  uORB::Manager

So this fixes two synchronization issues:
- Different DeviceMaster objects could access the same static data in
  parallel
- getDeviceNode() called from uORB::Manager did not use any locking at all
2016-08-06 20:44:23 +02:00
Beat Küng 45a0a7c5ab refactor orb: uORB::Manager is responsible for the DeviceMaster objects
This has the following benefits:
- Manager can ensure that there is at most one instance of DeviceMaster
  per Flavor
- The Manager needs access to (static) data of DeviceMaster already.
  This will make it easier to access this data in a non-static way, and
  does not introduce new dependencies.
2016-08-06 20:44:23 +02:00
Andreas Antener 2dd29ec4a1 VTOL: publish stabilized FW attitude to correct topic 2016-08-06 20:43:49 +02:00
Lorenz Meier c97a18b6a4 Fix README name 2016-08-06 20:42:44 +02:00
h3ct0r 3deefb1a79 Fixed some edge cases on the geo_tag_images.py script. Added explanation to the --kml function. Added more examples for the execution of the script. 2016-08-06 20:42:24 +02:00
Beat Küng 124e1c26d9 gps injection: use the orb queuing API instead of multiple instances
It uses a queue length of 6. There are 3 RTCM msgs/s, but due to
fragmentation and WiFi lags, there can be more than that. During several
tests, a length of 6 showed no queue overflows.
2016-08-06 20:41:38 +02:00
sander 9398a4819f Only check mission when needed 2016-08-06 20:40:41 +02:00
Julian Oes 3e87ec5153 navigator: mission check refactor
The mission feasability checker was called with the same arguments
twice which made it hard to understand when a mission is marked valid.

The mission check should run in these two cases:
- When initializing (if home comes up) if there is already a mission saved.
- When the mission gets updated.
2016-08-06 20:39:56 +02:00
Lorenz Meier c76c8fda04 MC pos control: Drop default position controller gain 2016-08-06 11:50:08 +02:00
Lorenz Meier bcd5f98cb1 Navigator: Fix mission feedback and wording 2016-08-06 10:34:20 +02:00
Roman 278b607f62 Update ECL library 2016-08-06 10:18:58 +02:00
Lorenz Meier 37230f4c5d Revert "navigator: mission check refactor"
This reverts commit a956429c4c.
2016-08-05 22:10:34 +02:00
Lorenz Meier 102f5b54d7 Revert "Improvements to SITL to make paths more flexible. (#5181)"
This reverts commit 699b6a2cb3.
2016-08-05 21:29:49 +02:00
Mark Whitehorn bbe3525377 fix VTOL vehicle_status timestamp (#5252)
* fix VTOL vehicle_status timestamp

* run astyle
2016-08-05 17:00:12 +02:00
James Goppert 6ac79aa55f Formatting. 2016-08-05 06:52:35 -04:00
Lorenz Meier 08f5ece306 Remove on arming reset, be less verbose in normal conditions output 2016-08-05 06:51:54 -04:00
James Goppert 699b6a2cb3 Improvements to SITL to make paths more flexible. (#5181) 2016-08-05 06:23:59 -04:00
sander bc7178c538 Allow mission with active DL and DLL failsafe off 2016-08-05 10:19:06 +02:00
sander e8a87538b8 Code style 2016-08-05 10:19:06 +02:00
sander 95e80cc29b Only RTL when mission finishes mid air on DL Lost 2016-08-05 10:19:06 +02:00
Julian Oes a956429c4c navigator: mission check refactor
The mission feasability checker was called with the same arguments
twice which made it hard to understand when a mission is marked valid.

The mission check should run in these two cases:
- When initializing (if home comes up) if there is already a mission saved.
- When the mission gets updated.
2016-08-05 10:17:06 +02:00
Michael Schaeuble 8566cabd76 Make some code-style fixes 2016-08-05 10:15:11 +02:00
Michael Schaeuble a3a855203c Update Bebop mainapp.config with new functionality 2016-08-05 10:15:11 +02:00
Michael Schaeuble 8351afdca8 Initialize mag scaling with reasonable defaults 2016-08-05 10:15:11 +02:00
Michael Schaeuble 6aa8fcdf53 Enable commander module for Parrot Bebop 2016-08-05 10:15:11 +02:00
Michael Schaeuble 0b7fa4f5ad Apply sensor calibration after coordinate frame rotation 2016-08-05 10:15:11 +02:00
Michael Schaeuble e600e29ea4 Add DF wrapper for AK8963 2016-08-05 10:15:11 +02:00
Lorenz Meier 0481c002df Navigator: Initialize subscription and disallow copy constructors for classes that have pointer members 2016-08-05 10:13:52 +02:00
Lorenz Meier 074a71173b Systemlib: Address init and copy constructors 2016-08-05 10:13:24 +02:00
Lorenz Meier db174cf8b1 Disable EKF2 3D fusion temporarily in SITL, fix missing fast-init params for some configs 2016-08-05 10:12:44 +02:00
Bart Slinger 815c367294 Add helicopter airframe icon (#5234) 2016-08-04 17:26:17 +02:00
Beat Küng 8aa3b245a5 fix sdlog2: use LOG_DGPS_MSG for second gps (#5235) 2016-08-04 17:18:02 +02:00
Julian Oes aaeeb1684d DriverFramework: update submodule (#5233)
This brings support for the Ak8963 for Bebop.
2016-08-04 16:04:02 +02:00
Vasily Evseenko aa0c89c3ec Fix i2c collision with rgbled 2016-08-04 15:09:33 +02:00
Vasily Evseenko b4d9f44904 Wait conversion_interval before first measurement 2016-08-04 15:09:33 +02:00
Vasily Evseenko 078aca1966 Fix SENS_EN_SF1XX description 2016-08-04 15:09:33 +02:00
Vasily Evseenko 6689a3d1b1 Add SENS_EN_SF1XX param to specify sensor model
Fix missing orb_unadvertise on shutdown
Fix missing closing of file descriptors
2016-08-04 15:09:33 +02:00
Vasily Evseenko 6d3aba1c5f Fix code style 2016-08-04 15:09:33 +02:00
Vasily Evseenko 49844f52d5 Fix SF10a driver. Add support for SF11c and rename to SF1xx 2016-08-04 15:09:33 +02:00
Julian Oes 00d4eae373 attitude_estimator_q: don't filter output rates
Since we're already filtering the incoming gyro and accel sensor
signals, we don't need to filter the output rates again.
2016-08-04 11:33:44 +02:00
Julian Oes ea9c8b968a attitude_estimator_q: don't spam console
We should not spam the console just because the input data is
degenerate, it would only make things worse because everything would
slow down due to the printfs.
2016-08-04 11:33:44 +02:00
Julian Oes d748f6ca71 attitude_estimator_q: filter accel and gyro data
Since accel and gyro are not filtered in the drivers anymore, we need to
filter them in this estimator in order to achieve a similar performance.
2016-08-04 11:33:44 +02:00
Eike cfa203ca22 Remove LPOS.Z reset (#5228) 2016-08-04 11:32:26 +02:00
Mark Whitehorn 422cf7e21c assign timestamp in vtol vehicle_rates_setpoint message (#5227) 2016-08-04 08:22:33 +02:00
James Goppert eeb73888fd update sitl_gazebo (#5224) 2016-08-03 18:46:25 -04:00
Andreas Daniel Antener f3c5c2c5a9 use thrust scale parameter for vtol pusher support (#5207) 2016-08-03 23:41:01 +02:00
James Goppert feccb9bfc1 Make integraiton test script work with kinetic. 2016-08-03 17:17:07 -04:00
Lorenz Meier 5b06b40ed9 Set SITL as default target now that Pixhawk is not necessarily the default HW 2016-08-03 23:04:35 +02:00
Lorenz Meier e287b05d67 NuttX: Add file change which allows really fast log download 2016-08-03 21:10:34 +02:00
Nate Weibley 547592fddf Use a persistent file* and seek less for log download
Opening/seeking/closing the file for each data chunk was extremely
expensive and drastically slowed the download process as the position
in the file increased. Over USB with large files this change + nuttx
update results in ~ 10x speedup for log downloads.
2016-08-03 14:33:01 -04:00
James Goppert 391eb7f8df Sitl update. (#5220) 2016-08-03 13:19:26 -04:00
Andreas Antener 579d420db1 VTOL: enable MC motors after instant back transition 2016-08-03 13:56:07 +02:00
Andreas Antener 86d1488e52 added missing const keyword 2016-08-02 21:09:45 +02:00
Andreas Antener d089c427ec quadchute code style fix 2016-08-02 21:09:45 +02:00
Andreas Antener 6f1eda2b18 added single point to decide if we need quadchute, let the reason be passed from the source where we know what's going on 2016-08-02 21:09:45 +02:00
Andreas Antener 92ddc30b69 moved min alt param 2016-08-02 21:09:45 +02:00
Andreas Antener 92185945bc make quadchute work during transitions 2016-08-02 21:09:45 +02:00
sander 0cc44a82c5 Code style 2016-08-02 21:09:45 +02:00
sander 45a4472a47 Do not apply back transition duration for QuadChute 2016-08-02 21:09:45 +02:00
Andreas Antener bae5416819 removed duplicate memset 2016-08-02 21:05:00 +02:00
Lorenz Meier 033e9e140d Update MAVLink 2.0 version 2016-08-02 14:55:12 +02:00
Lorenz Meier e2d1524a7a Mission feasibility checker: Better feedback for landing waypoints 2016-08-02 14:54:40 +02:00
Lorenz Meier 670b0f7c6d Commander: MAVLink is an off-vehicle API we should not depend internally on 2016-08-02 14:54:16 +02:00
James Goppert 437221bec2 Make LPE default estimator. (#4483) 2016-08-02 02:02:01 -07:00
Beat Küng c22e7ed5c9 Tools/mavlink_shell.py: implement a simple shell with history 2016-08-02 09:10:18 +02:00
Beat Küng aefa319fc4 fw_pos_control_l1: fix compiler problem (implicit float conversion) (#5198)
issue (GCC 6.1.1):
../src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp:1284:27: error: implicit conversion from ‘float’ to ‘double’ to match other operand of binary expression [-Werror=double-promotion]
  if ((fabs(air_gnd_angle) > M_PI) || (ground_speed_2d.length() < 3.0f)) {
2016-08-02 00:04:44 -07:00
Vasily Evseenko 457526ebe7 Don't push bad values from lidar to EKF2 (#5196)
Report terrain altitude
2016-08-01 23:30:40 -07:00
James Goppert a58c2f416f Update sitl_gazebo. (#5195) 2016-08-01 15:30:31 -04:00
Julian Oes ccea9c9e6f fmu: flash safety button correctly even disabled (#5189)
If the circuit breaker to disable IO safety is engaged, the safety
button should still blink in the appropriate pattern: double flash for
safety off, solid on for armed.
2016-08-01 02:18:36 -07:00
Julian Oes 623b99327d param: lock the bus as short as possible (#5187)
Since the FRAM and the baro are on the same bus on the Pixracer, we
currently need to lock down everything (instead of just this SPI bus)
for the time when the params are written.
Therefore, we need to keep this locking as short as possible.

This change makes the locking even shorter by moving all param_get and
param_name and param_size calls out of the lock.
2016-08-01 02:15:21 -07:00
sander 5710a0c040 Remove default geofence from gazebo_standard_vtol 2016-07-31 22:09:44 +02:00
Lorenz Meier a38263b8e7 Enforce enough braking power when users set higher horizontal speeds 2016-07-31 17:43:15 +02:00
Julian Oes dd70b3752a mpu9250: set accel DLPF to 41 Hz (#5177)
Previously, the accel DLPF was not set, so it's not clear what the
settings are or should be.
2016-07-31 08:04:01 -07:00
Lorenz Meier d809faec63 Fixes for Gazebo 2016-07-31 16:52:53 +02:00
Julian Oes 21bc5d1716 land_detector: remove leftover printf (#5178) 2016-07-31 07:49:11 -07:00
Lorenz Meier 4e81263d3a Updated Tools/sitl_gazebo 2016-07-31 15:56:35 +02:00
Lorenz Meier 11f1a11934 Lock yaw integral if we hit a yaw limit 2016-07-31 14:14:55 +02:00
Lorenz Meier a1c8585342 EKF2: Report zero as position until local pos is valid 2016-07-31 14:01:32 +02:00
Lorenz Meier c835fb36a6 5611: Bump sampling frequency back up to 40 Hz from 25 Hz to help with altitude estimation 2016-07-31 12:20:48 +02:00
Julian Oes 0d80a77e46 unit_tests: move hysteresis test to new framework 2016-07-30 12:26:56 +02:00
Julian Oes 8f1d350d3c unit_test: add ut_assert_true and ut_assert_false 2016-07-30 12:26:56 +02:00
Julian Oes 6bf4bd5f35 land_detector: remove unused variable 2016-07-30 12:26:56 +02:00
Julian Oes 50cac88e5b land_detector: big refactor, share update function
This is a big refactor and general cleanup of the land detector. The
main functional change is to share the hysteresis lib across all land
detectors.
2016-07-30 12:26:56 +02:00
Julian Oes 9f928308c4 land_detector: astyle 2016-07-30 12:26:56 +02:00
Julian Oes 3d0fa410a8 hysteresis: astyle 2016-07-30 12:26:56 +02:00
Julian Oes fd6ad6565c commander: use hysteresis lib for auto_disarm
Since the auto disarm hysteresis was implemented wrongly, it's now
replaced with the hysteresis library call.
2016-07-30 12:26:56 +02:00
Julian Oes f7ad8c03b4 hysteresis: use 64bit for everything in us 2016-07-30 12:26:56 +02:00
Julian Oes 93acff8641 MulticopterLandDetector: remove always true call
The result from `!get_freefall_state()` was always true because
`get_freefall_state()` is already called before `get_landed_state()` is
called. Only if we're not in a freefall, we check if we are landed.
2016-07-30 12:26:56 +02:00
Julian Oes 740bfc0b32 MulticopterLandDetector: use hysteresis lib
The hysteresis was not properly implemented in the land detector and is
therefore replaced by the library call, both for the freefall detector
and the land detector.
2016-07-30 12:26:56 +02:00
Julian Oes ee1669e174 hysteresis: add to systemlib CMakeLists.txt 2016-07-30 12:26:56 +02:00
Julian Oes f365832c0b hysteresis: we needed different hysteresis
Sometimes, we only need a histeresis in one direction.
2016-07-30 12:26:56 +02:00
Julian Oes 401d807261 systemlib: added library for hysteresis
There have been two cases where a hysteresis function wasn't working
correctly. It is therefore a good idea to abstract the hysteresis
functionality into a library.
2016-07-30 12:26:56 +02:00
Julian Oes 36299c59b4 unittests: whitespace 2016-07-30 12:26:56 +02:00
sander 788f04ea58 Remove debug info 2016-07-30 11:43:52 +02:00
sander 94fc8bda02 Fix indenting 2016-07-30 11:43:52 +02:00
sander 2bca19fc5e Remove acceptance radius from takeoff altitude for MC 2016-07-30 11:43:52 +02:00
sander e4f20f98cd Implement altitude acceptance radius 2016-07-30 11:43:52 +02:00
Lorenz Meier b5ef5cabb5 Updated src/drivers/gps/devices 2016-07-30 11:40:50 +02:00
James Goppert 5f16c97662 Added mb12xx sensor enable. (#5164) 2016-07-29 16:18:27 -04:00
Daniel Agar 390a7165dd make tests (#5163)
* make tests use px4 instead of mainapp

* commander_tests ALTCTL - not rotary requires altitude
2016-07-29 11:46:47 -04:00
Julian Oes 5a262ec6bc uorb: came across a wrong comment 2016-07-29 17:44:50 +02:00
Julian Oes a18eabead4 navigator: whitespace 2016-07-29 17:44:50 +02:00
Daniel Agar 2de66b1a9d FW navigation in high winds (#5097) 2016-07-29 06:05:48 -07:00
Beat Küng ad2a13dcc8 cmake TAP config: add topic_listener 2016-07-29 14:50:03 +02:00
Beat Küng 0fa3bd4691 ms5611: use px4_getopt instead of getopt
- px4_getopt is threadsafe
- getopt does not do argument reordering (ms5611 start -T 5607 did not work)
2016-07-29 14:50:03 +02:00
David Sidrane 1b0f41e36e Added support to MS5611 Driver for MS5607 2016-07-29 14:50:03 +02:00
Lorenz Meier fa421a91e2 Add missing teest targets for MindPX 2016-07-29 14:10:44 +02:00
Lorenz Meier 6ab9dc0acf Testing cleanup from Daniel Agar 2016-07-29 13:49:14 +02:00
Daniel Agar 99aa5f49fc FW ALTCTL requires altitude 2016-07-29 13:48:21 +02:00
Daniel Agar 6aa935fed6 FW don't allow ACRO or RATTITUDE 2016-07-29 13:48:21 +02:00
Lorenz Meier e70223c2be Allow transition commands also in manual if no switch is used 2016-07-29 13:43:24 +02:00
Roman 1f1839d978 sensors: fixed code style
Signed-off-by: Roman <bapstroman@gmail.com>
2016-07-29 13:28:09 +02:00
Roman 9ece090dbe vtol_att_control: use transition switch instead of aux1
Signed-off-by: Roman <bapstroman@gmail.com>
2016-07-29 13:28:09 +02:00
Roman 499d362b8b added transition switch 2016-07-29 13:28:09 +02:00
Beat Küng 302719527a nuttx defconfig: increase nr of file descriptors, due to mavlink shell 2016-07-29 13:07:17 +02:00
Beat Küng e8d44da2c0 Tools: add mavlink_shell.py script to start a shell over mavlink 2016-07-29 13:07:17 +02:00
Beat Küng 2241ab9cac mavlink: add a shell using SERIAL_CONTROL MAVLink message 2016-07-29 13:07:17 +02:00
Julian Oes 78a9472b25 px4iofirmware: astyle 2016-07-29 12:46:17 +02:00
Julian Oes dcb7c0e4c2 px4iofirmware: correct newline 2016-07-29 12:46:17 +02:00
Julian Oes 79a1b84b09 px4iofirmware: clean up override decision
The override checking was scattered across two places and is now unified
in controls_tick(). The part in mixer_tick only decides which mixer (or
none) to use give the override flag.
2016-07-29 12:46:17 +02:00
Julian Oes de76c398ca px4io: whitespace fixes 2016-07-29 12:46:17 +02:00
Julian Oes ec035b7268 px4iofirmware: no override in multirotor mode
This fixes a bug where multirotors got into override mode when the FMU
is dead/not responding.
The main bug was that the check was for FMU_OK || MANUAL_OVERRIDE_OK
in order to get further in the override checks.

Also a mixer_tick was called inside the controls_tick even though these
are called in px4io.c after each other anyway.
2016-07-29 12:46:17 +02:00
Julian Oes 57b3bbf657 px4iofirmware: don't set FMU_OK flags immediately
The FMU_OK flags are later checked anyway based on
system_state.fmu_data_received_time.
2016-07-29 12:46:17 +02:00
Julian Oes 31d5c59ab7 px4iofirmware: remove unused define 2016-07-29 12:46:17 +02:00
Julian Oes a9a5f3a19e px4io: add FMU fail test mode
In order to test what happens in px4iofirmware when the FMU stops
sending PWM or control commands, I added a test mode. When the test mode
is activated, no controls are sent.
2016-07-29 12:46:17 +02:00
Julian Oes 55d21242fe Snapdragon: keep copying mainapp.config for now
mainapp.config can't be renamed to px4.config just yet because it would
clash with the name used for the DSP side.
2016-07-29 11:15:10 +02:00
James Goppert b6a9ff756c Rename mainapp to px4. 2016-07-29 11:05:01 +02:00
Sebastian Quilter 3b7ba915a8 small refactor (#5155) 2016-07-28 14:49:37 -07:00
Eric Ye 9f5b081257 Wrap help line to fit through mini-dm. (#5157)
It currently gets cut off on mini-dm, split it into multiple lines
so all of it comes through.
2016-07-28 14:47:57 -07:00
sander 4b414d96eb Init _mission_throttle 2016-07-28 16:44:27 +02:00
sander 0ce08ed9f8 Code style 2016-07-28 16:44:27 +02:00
sander ce3749d04f Make tecs init airspeed mode dependent 2016-07-28 16:44:26 +02:00
sander 0cf77a30b1 Init tecs with transition airspeed for vtols without airspeed sensor 2016-07-28 16:44:26 +02:00
David Sidrane 415fbae31e Fix build for HW w/o mux 2016-07-28 08:50:59 +02:00
Beat Küng 50a14cfd29 tap_esc: disable the _mode param, use the number of configured channels instead
Not sure why the Mode enum exists in the first place...
2016-07-28 08:50:59 +02:00
Beat Küng 3a0f4c84a5 motor_test: add iterate command 2016-07-28 08:50:59 +02:00
Beat Küng cbcbce3a28 tap_esc: use correct number of outputs 2016-07-28 08:50:59 +02:00
Beat Küng 6245a9b134 motor_test: make -m & -p optional (select all motors/0 output if not given) 2016-07-28 08:50:59 +02:00
Beat Küng d660fb094b tap_esc: add RPMSTOPPED macro, make sure driver starts with stopped motors 2016-07-28 08:50:59 +02:00
Beat Küng d6d3a56116 tap_esc: add buffer size check for _esc_feedback.esc[] 2016-07-28 08:50:59 +02:00
Beat Küng c55c978145 tap_esc: reset outputs only when armed really changed (not on each topic update) 2016-07-28 08:50:59 +02:00
Beat Küng 4045068187 tap_esc: properly initialize _outputs 2016-07-28 08:50:59 +02:00
Beat Küng 8602ff7856 tap_esc: fix code style, IS_armed -> _is_armed 2016-07-28 08:50:59 +02:00
Beat Küng 3f9f320f18 tap_esc: improve error handling & reporting 2016-07-28 08:50:59 +02:00
Beat Küng a8e28c7232 tap_esc: fix argument ordering in memset 2016-07-28 08:50:59 +02:00
David Sidrane 632e4630b1 TAP:ESC motors and LED working - The code is still hardcoded for 4 ESC
But the basics are working. N.B. To Stop the moros a value of 0 need to be
sent. LED color mask are misleeding - LED is On or Off per ESC.
2016-07-28 08:50:59 +02:00
Julian Oes a71cfe92f1 fmu: whitespace fix 2016-07-28 08:49:22 +02:00
Julian Oes 664092b7d4 fmu: support ESC calibration
The FMU was lacking support to do the ESC calibration. This is needed
for Pixracer.
2016-07-28 08:49:22 +02:00
Julian Oes 3289e0cee6 fmu: don't disarm with disarmed set
If disarmed PWM values have been set, we can't accept a disarm command.
If we did, the PWM output stop alltogether after the high pulse of the
ESC calibration.
2016-07-28 08:49:22 +02:00
Julian Oes d63870ad71 fmu: don' de-initialize
Once the PWM outputs are initialized, there is no point in
de-initializing them again.
2016-07-28 08:49:22 +02:00
Julian Oes f4e35873a1 DriverFramework: updated submodule (#5148)
This brings fixes for Edison which should not have any influence on
Snapdragon or Raspberry Pi.
2016-07-27 23:47:53 -07:00
Sander Smeets c4eb65862f Reduce esc calibration pwm timeout (#5011) 2016-07-27 01:52:20 -07:00
Daniel Agar a9cb2d2fbe navigator mission don't report loiter if landed 2016-07-27 10:39:07 +02:00
Julian Oes c4cb916afa Fix sdlog2/logger path/file name overflows. (#5138)
* logger: prevent logpath buffer overflows

The handling of the log path had the potential to cause buffer
overflows, especially on POSIX platforms where the paths are often much
longer than just 64 chars.

* sdlog2: prevent logpath buffer overflows

When the log folder path was created, this was done with the unsafe
sprintf function instead of snprintf. This caused buffer overflows in
SITL but the overflow was usually not detected until recent testing of
some work in progress.
2016-07-27 00:55:29 -07:00
Julian Oes 4656b34244 DriverFramework: update submodule
This fixes a gyro/accel scaling bug on Snapdragon.
2016-07-26 17:11:29 +02:00
Beat Küng 4fa59c3cde sdlog2 README: describe geotagging.py script 2016-07-26 10:20:22 +02:00
h3ct0r b6e57e1347 Added geo tagger script to geo reference any set of arbitraty JPG images that does not have the CAM trigger, but have a valid creation date 2016-07-26 10:14:51 +02:00
Julian Oes 83feb83fe2 cmake: don't build load_mon for POSIX/QURT 2016-07-26 09:58:12 +02:00
Gus Grubba c3b58822a8 Fixes to log download (#5133)
* Fixes to log download

* Fixing indentation
2016-07-25 08:15:23 -04:00
Andreas Antener 50175ca7ea manual condition includes threshold values 2016-07-25 08:56:19 +02:00
Roman aea7bd5b47 fw_attitude_control: calculate attitude setpoint for STAB mode
- attitude setpoint generation for stabilized mode was shifted back
to the fw attitude controller. since the fw position controller is polling
on global position attitude setpoints were not generated when global
position was not published.

Signed-off-by: Roman <bapstroman@gmail.com>
2016-07-25 08:56:19 +02:00
Andreas Antener f069880504 VTOL: don't wait on TECS in FW state if TECS is not running 2016-07-25 08:56:19 +02:00
Andreas Antener 254358ef86 fixed implicit conversion 2016-07-25 08:56:19 +02:00
Andreas Antener 89a2f5057f fixed code style 2016-07-25 08:56:19 +02:00
Andreas Antener 6ff65cd8b2 reset attitude setpoint where necessary 2016-07-25 08:56:19 +02:00
Andreas Antener 0a997577f5 allow manual yaw in all manual modes and also use it as threshold to snap into heading lock 2016-07-25 08:56:19 +02:00
Andreas Antener 9f7f6e4d3d removed roll lock for altitude hold 2016-07-25 08:56:19 +02:00
Roman 6226a0c77d fw_pos_control_l1: fixed code style
Signed-off-by: Roman <bapstroman@gmail.com>
2016-07-25 08:56:19 +02:00
Roman ec334f7c9b fw_pos_control_l1: limit max roll and pitch setpoints for manual modes
Signed-off-by: Roman <bapstroman@gmail.com>
2016-07-25 08:56:18 +02:00
tumbili 8c8120e2fc fw position controller: logic cleanup
cleaned up logic when not to use pitch setpoint from TECS

Signed-off-by: tumbili <roman@px4.io>
2016-07-25 08:56:18 +02:00
tumbili fd51bf44d5 fw position / fw attitude control: move attitude setpoint generation to
position controller

- attitude setpoints for all modes are now computed in the fw position
controller

Signed-off-by: tumbili <roman@px4.io>
2016-07-25 08:56:18 +02:00
Roman e3f3233ee4 fw position controller: fixup attitude setpoint generation
- generate complete attitude setpoint for position and altitude
control mode
- fix generation of roll setpoint for position control which lead to
wing rock
- add roll and pitch setpoint offsets so that they are logged as well

Signed-off-by: Roman <bapstr@ethz.ch>
2016-07-25 08:56:18 +02:00
Lorenz Meier 880fa47ba2 Fix install in Mac OS X Gazebo 2016-07-24 23:09:17 +02:00
James Goppert 7458f1e07d Update sitl_gazebo. (#5136)
* Update sitl_gazebo.

* Update sitl_gazebo.
2016-07-24 17:07:14 -04:00
James Goppert 563122f5d3 sitl_gazebo update. 2016-07-24 16:30:01 -04:00
James Goppert 4f62a35993 Fixed sitl_gazebo. 2016-07-24 16:27:12 -04:00
James Goppert 05315abc89 Optical flow simulator and install cleanup. (#5132)
sitl CI is having some issue cloning, but I have verified it locally for various configs
2016-07-24 13:07:14 -04:00
Eric Ye 5cee3fa0e1 Proper return value on qshell help 2016-07-23 08:25:03 +02:00
Eric Ye 76d74640ae Add "help" to qshell for qurt
Fixes issue #5111
2016-07-23 08:25:03 +02:00
Julian Oes 7399e60e96 ecl: update submodule
This includes just some minor fixes.
2016-07-23 08:05:47 +02:00
James Goppert a4ef364f80 Added innovation logging to LPE. (#5124) 2016-07-22 19:19:30 -04:00
Henry Zhang 0730e681bc Nuttx config: MAVLink app needs more FDs. 2016-07-22 11:16:18 +02:00
Henry Zhang 2b93f16118 mindpx-v2: build topic_listener, sd_bench, tests, motor_ramp. 2016-07-22 11:16:18 +02:00
Julian Oes 317fd270d1 RPi: add mainapp.config again
This file got deleted accidentally because all .config files were in
gitignore.
2016-07-22 09:33:43 +02:00
Julian Oes b99f51a035 gitignore: don't ignore all .config files 2016-07-22 09:33:43 +02:00
Michael Schaeuble ae66085f89 MPU6050: Apply calibration after coordinate frame rotation 2016-07-22 09:21:55 +02:00
Michael Schaeuble 1fc8e38157 Fix incorrect indentation 2016-07-22 09:21:55 +02:00
Michael Schaeuble 7d11b32981 Add correct rotation for MPU6050 on Bebop 2016-07-22 09:21:55 +02:00
Michael Schaeuble 2197bf518d Fix code style 2016-07-22 09:21:55 +02:00
Michael Schaeuble 28de6d2cbd Update mainapp.config and add MPU6050 2016-07-22 09:21:55 +02:00
Michael Schaeuble d94bdb0829 Add missing defines for Bebop sensor drivers 2016-07-22 09:21:55 +02:00
Michael Schaeuble e73d8d73e1 Add DF wrapper for MPU6050 2016-07-22 09:20:27 +02:00
Beat Küng 8ab841e046 sensors: poll on best-voted gyro (#5106)
This is a follow-up to 399d4ef833
2016-07-21 14:52:32 -07:00
Beat Küng 03b3bfa98d tap: add the motor_test command to the build config 2016-07-20 14:04:15 +02:00
Beat Küng 2c0c30eadf drv_tap_esc.h: fix file permissions 2016-07-20 14:04:15 +02:00
Beat Küng 38e4882b5f tap_esc: subscribe to test_motor topic and set outputs accordingly in non-armed state
This makes it possible to use the 'motor_test' command
2016-07-20 14:04:15 +02:00
Beat Küng 0f6a6f7150 mavlink_messages.cpp: only warn once, when MAVLink log opening fails
This happens for example if no SD card is present.
2016-07-20 13:07:32 +02:00
Beat Küng 9a8c092116 mavlink_messages.cpp: fix coding style: prepend _ to class members 2016-07-20 13:07:32 +02:00
David Sidrane 5ded579bf3 TAP:More IO Init (#5096) 2016-07-19 11:58:44 -10:00
Beat Küng 7b52eced66 commander: write timestamp of commander_state topic on init and state change 2016-07-19 09:21:35 +02:00
David Sidrane a420d47797 Minor fix usage (#5094) 2016-07-18 15:01:55 -10:00
Beat Küng 5b85fdb636 fix sdlog2 replay: changed format string from 9c73eae941 (#5090) 2016-07-18 15:25:49 +02:00
James Goppert 9fcf121380 LPE: Don't use home as local origin (#5067) 2016-07-17 10:16:17 -04:00
Mark Whitehorn 981353f439 fix bug in RC scan for SUMD input 2016-07-16 16:35:03 +01:00
Julian Oes fa614a3cc1 RPi: just use RPI instead of RPI2.
The reason for this change is that RPi2 and RPi3 are compatible, and
hopefully all differences coming up can be resolved without ifdefs but
at runtime.
2016-07-16 15:51:00 +01:00
Julian Oes 2bf40efe8b RPi2: fuse mainapp/common and navio2
We currently only support Navio2, so let's fuse the two configurations.
2016-07-16 15:51:00 +01:00
Miguel Arroyo 17be06cf1a Fixes Navio2 Config Typo 2016-07-16 15:51:00 +01:00
Julian Oes 1939b88a33 RPi2: use cross/native instead of release/default 2016-07-16 15:51:00 +01:00
Julian Oes f241518d0e RPi2: bring default and release cmake in sync
The two cmake files for default and release where out of
sync. This change bases them on a common cmake file.
2016-07-16 15:51:00 +01:00
Daniel Agar d733fc9139 travis-ci use tagged docker image (#5068) 2016-07-16 08:41:19 -04:00
Beat Küng a1b710025b Improve new logger update rate (#5073)
* logger: disable some default topics, which are most likely not used

This is also to safe CPU and lower the amount of file descriptors used.

* logger: use the hrt timer for more accurate scheduling

Under NuttX with the default rate of 285Hz, the actual measured rate was
only 200Hz while on Linux it was ~280Hz. The reason is that NuttX only
uses a usleep() granularity of 1ms, so that the typical sleep time is
longer than what we set.

Now the logger waits on a semaphore, which gets activated periodically
with a hrt timer. With this the measured rate is exactly the expected one,
285Hz.
2016-07-15 16:55:32 -07:00
Beat Küng ee58f0d11d encoders.msg: remove this topic, it's never published (#5074) 2016-07-15 14:59:52 -07:00
lovettchris b48c081e5c Reset _transfer_in_progress if mavlink transfer times out. (#5077) 2016-07-15 14:59:30 -07:00
Julian Oes 87e964ec10 commander: POSCTL with localpos for MC
Fixedwings need a global position estimate for POSCTL.
2016-07-15 14:43:36 +01:00
Julian Oes f430c39f5b commander: allow POSCTL with local position
We want to allow flying POSCTL with optical flow only without GPS.
2016-07-15 14:43:36 +01:00
Julian Oes 1cfa429efe DriverFramework: update submodule
Small additions for Intel Edison.
2016-07-15 12:58:10 +02:00
David Sidrane 33e4f38d82 Add GPS and Compass (#5066) 2016-07-14 08:26:40 -10:00
David Sidrane e2a6ae676f More complete IO init (#5065) 2016-07-14 07:32:11 -10:00
Beat Küng 4a199c1360 gyro calibration: avoid double initialization of gyro_scale data
They're initialized in do_gyro_calibration already
2016-07-14 14:17:38 +02:00
Julian Oes f1b8bed5df gyro_calibration: set scale to 1 instead of 0 2016-07-14 13:13:56 +02:00
David Sidrane 8a2df2a458 Avoid unnecessary Write Cycle 2016-07-13 20:42:05 +02:00
David Sidrane 5d1bd6fb2c TAP used FLASH Based parameter storage - needs timing eval 2016-07-13 20:42:05 +02:00
David Sidrane 8d13dba0cc Update NuttX with backport of stm32 FLASH driver to support F4 ==master_flash 2016-07-13 20:42:05 +02:00
David Sidrane 5e8d6375c9 Back Port nuttx_v3 FLASH based parameter hooks 2016-07-13 20:42:05 +02:00
David Sidrane 39ce201efe TAP:Fix build to use correct ROMFS 2016-07-13 20:19:05 +02:00
David Sidrane 78bc7d850b Fix Syntax error - but I suspect the USE_IO logic can be simplified 2016-07-13 07:52:58 -10:00
Julian Oes 3ed8b735c2 mavlink: only warn once if broadcast fails
This fixes the issue where the console was spammed if a broadcast failed
after a connection had previously been established.
2016-07-13 19:40:59 +02:00
Beat Küng 399d4ef833 sensors: only poll on first gyro for now
This fixes a bug with following setup:
- two (or N > 1) connected gyros
- ekf2 enabled
In this case, sensors would publish with the combined rate of the gyros,
but with N following messages having the same gyro data & timestamp.
Apparently ekf2 cannot handle this, the other estimators can.

We may want to rethink what the proper solution is here.
2016-07-13 14:35:03 +02:00
Julian Oes eda2915f0b mavlink: whitespace fix 2016-07-13 10:10:45 +02:00
Julian Oes d9343fa925 mavlink: use new copy_if_updated interface 2016-07-13 10:10:45 +02:00
Julian Oes 8345a0368b mavlink: add function to copy only if updated
The MavlinkOrbSubscription only had an interface to either always copy
or copy based on a timestamp. This commit adds a copy interface if the
topic has been updated.
2016-07-13 10:10:45 +02:00
Julian Oes 8ded6a58ab mavlink_log: enable queueing
We don't want to drop messages if possible for mavlink log messages, so
let's use the orb queueing.
2016-07-13 10:10:45 +02:00
Julian Oes 314ee6b7e0 commander: remove some if confusion
This is a try to simplify the if statements a bit. Also, a check of
new_arming_state which was impossible, is removed.
2016-07-13 10:10:45 +02:00
Julian Oes 631ce1fc55 commander: proper arguments for preflight check 2016-07-13 10:10:45 +02:00
Andreas Antener af8cd3f880 correctly scale and trim outputs in IO 2016-07-13 09:29:13 +02:00
Roman 13905c2480 px4io driver: send roll, pitch and yaw scale parameter values to io
Signed-off-by: Roman <bapstr@ethz.ch>
2016-07-13 09:29:12 +02:00
Roman 08bbd6dbfa px4iofirmware: added scale parameters for roll, pitch and yaw
since pure manual control for fixed wings in handled on the io side
the scale parameters for roll, pitch and yaw had to be introduced there
as well.

Signed-off-by: Roman <bapstr@ethz.ch>
2016-07-13 09:29:12 +02:00
tumbili 71e2a43790 consider scale parameters in rc calibration code 2016-07-13 09:29:12 +02:00
tumbili f0dd5a103c allow scaling controls in full manual mode for fixed wings 2016-07-13 09:29:12 +02:00
tumbili 784883af22 added parameters to allow scaling controls in full manual mode
for fixed wings
2016-07-13 09:29:12 +02:00
xiaoyuli 7718343b27 fix the function of disabling safety switch (#5031) 2016-07-12 23:43:17 +02:00
Daniel Agar de14418e93 fw_pos_ctrl_l1 var naming consistency and effc++ 2016-07-12 23:40:39 +02:00
Daniel Agar ebce725720 px4fmu-v2 disable motor_ramp 2016-07-12 23:36:05 +02:00
Daniel Agar 59b4350aa0 implement MAV_CMD_NAV_LOITER_TO_ALT and general mission cleanup 2016-07-12 23:36:05 +02:00
Lorenz Meier 7419151314 Update EKF2 replay timestamp handling 2016-07-12 22:17:22 +02:00
David Sidrane 0576031a81 TAP PID (#5036) 2016-07-12 05:07:03 -10:00
Beat Küng f8382a2713 upload scripts: add TAP for the uploader script 2016-07-12 16:00:33 +02:00
David Sidrane 5cc58fa067 Reserving 32Kib of FLASH for parameters (#5035) 2016-07-12 03:57:31 -10:00
James Goppert 817f695297 Change to LPE terrain model to account for velocity scaling. (#5027) 2016-07-11 16:02:39 -04:00
Lorenz Meier a740d80a20 Mag voter: Be more forgiving on load changes 2016-07-11 15:16:35 +02:00
Lorenz Meier 021f0840ae Fix Hobbyking Pixracers 2016-07-11 15:03:07 +02:00
tommises 4fa2c54485 Mocap timestamp cleanup (#5021) 2016-07-11 12:46:29 +02:00
Beat Küng c9652fd42a logger: update set of default topics to match functionality of sdlog2
logging rate with these topics: ~50KB/s

The rates may need to be adjusted
2016-07-11 10:04:44 +02:00
Beat Küng 4ec9e53deb param SYS_LOGGER: remove experimental for new logger
It's ready to be used!
2016-07-11 10:03:02 +02:00
Beat Küng 68e14ceb29 tap startup script: add -t param for logger 2016-07-11 10:01:16 +02:00
Beat Küng 49614cfe38 SITL init scripts: add replay tryapplyparams & replay trystart
These will only start replay if there's an environment variable 'replay',
otherwise they do nothing.

We apply the parameters even before loading the modules, so that the
modules 'see' the same state as the recorded system had. We will have to
see how well this works in practice.
2016-07-11 09:26:35 +02:00
Beat Küng db13ac4c53 posix_sitl_default.cmake: add -DORB_USE_PUBLISHER_RULES if it's a replay build 2016-07-11 09:25:16 +02:00
Beat Küng e9726af54c Makefile: check for 'replay' env variable and change build dir accordingly
For replay with the new logger, we want a separate build dir so that the
parameters file and orb rules don't get mixed up.
2016-07-11 09:25:07 +02:00
Randy Mackay 80134d2b7d IR-LOCK: rework driver (from jschall) (#5024)
* irlock: change output format to tangent of angles

* irlock: put all targets in single struct

* irlock: eliminate tanf function in constant
2016-07-11 09:05:29 +02:00
Lorenz Meier 71d150f6ec MAVLink app: Fix rate handling 2016-07-10 17:05:33 +02:00
Lorenz Meier c7130081cc Update ECL 2016-07-10 16:33:07 +02:00
Lorenz Meier 02b3adc4a7 Update DriverFramework 2016-07-10 16:32:59 +02:00
Lucas De Marchi 18330f7ab7 Move __STDC_FORMAT_MACROS to build system
__STDC_FORMAT_MACROS changes the behavior of inttypes.h to allow
defining format macros for printf-like functions. It needs to be defined
before any include is done, otherwise due to include chains and header
guards it may not take effect.

Instead of having to define it everywhere it is used, move the define to the
build system. Also update ecl and DriverFramework submodules to deal with the
changed definitions.
2016-07-10 16:31:36 +02:00
tommises d2194d787f Refactored Mavlink stream configuration (#5015)
Streams ordered same way in all modes.
2016-07-10 16:22:22 +02:00
Lorenz Meier f39d284193 Update vision fields for attitude_estimator_ekf 2016-07-10 14:21:56 +02:00
Lorenz Meier 7601788c43 INAV: clean up vision timestamps 2016-07-10 12:44:00 +02:00
Lorenz Meier 8b3045baa2 MAVLink: clean up vision timestamps 2016-07-10 12:43:47 +02:00
Lorenz Meier c0a406b81f LPE: Clean up vision timestamps 2016-07-10 12:43:34 +02:00
Lorenz Meier 826eaed2ee EKF2: Clean up vision timestamps 2016-07-10 12:43:21 +02:00
Lorenz Meier 4f875560b7 Att Q Estimator: New vision timestamp 2016-07-10 12:43:10 +02:00
Lorenz Meier 07384d6b5a Vision msg: Cleanup timestamp 2016-07-10 12:42:56 +02:00
tommises 19b56c1574 Use timestamp received from companion computer as timestamp_boot 2016-07-10 12:29:19 +02:00
tommises 5bd574dd05 Fixed timestamp synchronization 2016-07-10 12:29:19 +02:00
tommises f69e9a3d37 Fixed VISION_POSITION_ESTIMATE.usec
Fixed units to be microseconds and not milliseconds.
2016-07-10 12:29:19 +02:00
David Sidrane a23785842c tap-v1 Uses New PWM LED driver structure 2016-07-10 11:46:47 +02:00
David Sidrane ea4d9a34fd mindpx-v2 Uses New PWM LED driver structure 2016-07-10 11:46:47 +02:00
David Sidrane a36f392b58 Rework PWM LED Driver 2016-07-10 11:46:47 +02:00
David Sidrane da96144e80 Added Power button and cleanup sdio 2016-07-10 11:46:47 +02:00
David Sidrane 5de19500c2 TAP-v1 set Console Baud Rate to 57600 2016-07-10 11:46:47 +02:00
Mark Whitehorn 09227526b6 enable use of GPS time for new logger folder/file naming (#5010) 2016-07-10 11:15:27 +02:00
Lorenz Meier 7afe2e8dd8 Iris SITL: Default gains 2016-07-08 00:02:48 +02:00
Lorenz Meier eb6af9afb9 VTOL updates 2016-07-07 23:30:57 +02:00
Lorenz Meier 38652ec940 SITL: Re-tune multicopter gains 2016-07-07 23:28:21 +02:00
Miguel Arroyo 3c11c0d8d8 Adds Calibration Support for RPi2 and Navio2 (#4999) 2016-07-07 22:38:17 +02:00
Andreas Bircher 2317589950 fixing the publishing of the triggering stamps (#5005) 2016-07-07 16:50:46 +02:00
Lorenz Meier e86c1851a7 Mag fusion update to ECL 2016-07-07 16:49:28 +02:00
Julian Oes ddba274496 sdlog2: fix poll_counter that I broke earlier 2016-07-07 16:48:27 +02:00
Julian Oes 544ea72d4c Snapdragon: set CPUs scaling to performance mode
Sdlog2 misses least updates when the CPU scaling governor is set at
maximum performance. This is not optimal to save power but the best
effort until there is a RT patched kernel on Snapdragon.
2016-07-07 16:48:27 +02:00
Julian Oes 03dbcf5464 sdlog2: don't forget to copy after poll
The previous changes broke sdlog2 on NuttX because no orb_copy was
called after polling in the case when sdlog2 was not actually logging.
2016-07-07 16:48:27 +02:00
Julian Oes 772dc302b6 sdlog2: raise min write size back
Turns out in practice there was not really a difference, so there was
no reason to change it.
2016-07-07 16:48:27 +02:00
Julian Oes fe91527604 sdlog2: poll for sensor and replay on Snappy
This brings better performance, so less missed updates on Snappy, as
well as a bit of a cleanup of the poll and orb_copy logic.
2016-07-07 16:48:27 +02:00
Julian Oes 5f18f9bbba sdlog2: select MIN < MAX bytes to write
Previously, the MAX and MIN were both 512 meaning that usually it would
start writing at > 512 bytes but only write 512 bytes which results in
a 512 bytes write shortly followed by a e.g. 30 bytes write.

Also, performance (measured in missed poll updates) seems slightly
better on Snapdragon with bigger chunks.
2016-07-07 16:48:27 +02:00
Julian Oes 1631cfdc83 Eagle: SDLOG_PRIO_BOOST to raise sdlog2 priority
This should lead to less drops on Snapdragon although it's hard to
verify this.
2016-07-07 16:48:27 +02:00
Julian Oes f7bb43b20b DriverFramework: update submodule (#5004)
This brings various PRs and fixes.
2016-07-07 16:24:13 +02:00
Beat Küng 168c744232 replay: fix string printf output: add .c_str() 2016-07-07 12:51:42 +02:00
Beat Küng 6e44760819 replay: add 'tryapplyparams' command
This only applies parameters from the log file and user-supplied overrides.
It is intended to be called as one of the first startup commands (after
param load), so that during startup, all applications find the parameters
from the replayed system.

Note that this is an optional command and 'replay start' will again load
and apply the parameters in any case.
2016-07-07 12:51:42 +02:00
Beat Küng 84a1a10006 logger: check if we are in replay mode via ENV variable 'replay' 2016-07-07 12:51:42 +02:00
Beat Küng 28ad6066aa replay: add replay module, build for sitl_default, but do not load on startup
This adds a new module that does:
- read an parse an ULog file, given via ENV variable 'replay'
- apply all parameters from the log file
- read and apply user-defined override parameters from a file
- publish all messages in 'real-time' from the log file and add a constant
  offset to the timestamp to match the system time.
- apply changed parameters in the log (which are not overridden)
2016-07-07 12:51:42 +02:00
Beat Küng ffcefd9047 orb: read & apply publisher rules from file (currently disabled via #ifdef)
If enabled, orb reads a rules file (./rootfs/orb_publisher.rules) on
startup. This can contain rules about which module is allowed to publish
which topic. It is completely transparent, so a publisher does not know
if he's not allowed to publish, and publications will look as if they
succeeded.

To test, add
#define ORB_USE_PUBLISHER_RULES
to uORBManager.hpp
2016-07-07 12:51:42 +02:00
Daniel Agar 4252511b8e add bitmask param metadata 2016-07-07 12:42:59 +02:00
Andreas Bircher 9974b6f747 Camera trigger update (#4998)
* updating the camera driver, correct init and keepAlive function

* removing debug output
2016-07-07 11:40:11 +02:00
Lorenz Meier 15880f8d13 Less verbose 2016-07-07 11:40:11 +02:00
Lorenz Meier aa77e8ee23 Cleanup 2016-07-07 11:40:11 +02:00
Lorenz Meier 50b93b161c Camera trigger: Make interface dependent on parameter, not command line 2016-07-07 11:40:11 +02:00
Lorenz Meier 78f7f00ae2 Camera trigger: Make interface dependent on parameter, not command line 2016-07-07 11:40:11 +02:00
Lorenz Meier 4683e20187 Clean up camera trigger interface code 2016-07-07 11:40:11 +02:00
Beat Küng 9c73eae941 sensor_combined: replace accel & gyro integral with value, use float for dt
Reason: the value is easier to read & handle (for example plotting). In
most places the value is needed, not the integral.

Note that this breaks the replay format for sdlog2 replay
2016-07-07 11:35:50 +02:00
Beat Küng 8e136779ec stack sizes: reduce stack sizes for modules that use sensor_combined
The sensor_combined topic got reduced from ~780 bytes to 72 bytes.
2016-07-07 11:35:50 +02:00
Beat Küng c5ea4b43be sensor_combined.msg: make timestamps relative
This is needed for the new logger & saves some space as well.
2016-07-07 11:35:50 +02:00
Beat Küng c66f26245c sensor_combined.msg: use uint32 for integral_dt
There is no reason to make this 64 bit. The same should be done in
the sensor raw messages, together with further cleanup.
2016-07-07 11:35:50 +02:00
Beat Küng 30301187f0 cleanup sensors_init: remove the static const int ERROR and use PX4_ERROR 2016-07-07 11:35:50 +02:00
Beat Küng d846ad5dac sensors: move voting into sensors module
- voting is now at a central place instead of duplicated within the
  estimators
  -> this also means that estimators that did not do voting so far,
     now have voting, like ekf2
- estimators requiring more than that can still subscribe to the raw
  sensors
- allows sensors_combined to be 3 times smaller
  - reduces logger, memcpy (cache) & RAM overhead
- all modules requiring only 1 or 2 sensor values now automatically get
  the voted result
- this also adds voting to baro
2016-07-07 11:35:50 +02:00
Beat Küng c50d267bfb sensors: cleanup includes and logging (warnx -> PX4_WARN/ERR/INFO) 2016-07-07 11:35:50 +02:00
Beat Küng 0c30ee8d37 fix resource leak in attitude_estimator_q_main: unsubscribe topics 2016-07-07 11:35:50 +02:00
Beat Küng b4ecc5a8d9 sensor_combined cleanup: remove many unneeded fields
Decreases the message size from 780 to 280 bytes.
In particular, all modules using sensor_combined must use the integral now.
The sensor value can easily be reconstructed by dividing with dt.

Voters now need to be moved into sensors module, because error count and
priority is removed from the topic.

Any module that requires additional data from a sensor can subscribe to
the raw sensor topics.

At two places, values are set to zero instead of subscribing to the raw
sensors (with the assumption that no one reads them):
- mavlink mavlink_highres_imu_t::abs_pressure
- sdlog2: sensor temperatures
2016-07-07 11:35:50 +02:00
Beat Küng c407123a72 cleanup sensor_combined: remove adc & differential_pressure fields
These are not really used. differential_pressure is just copied from the
topic with the same name.

for sdlog2 we assume no one needs the diff pressure fields and set it to 0.
We plan to switch to the new logger soon anyway.
2016-07-07 11:35:50 +02:00
Beat Küng 2c2477a07d fix sensors leaks: unsubscribe topics when exiting 2016-07-07 11:35:50 +02:00
Beat Küng ac45c9001b sensors: cleanup syntax: replace &x[0] with x 2016-07-07 11:35:50 +02:00
Beat Küng 78b45c4778 sensors: remove duplicated initialization 2016-07-07 11:35:50 +02:00
Beat Küng ddc4d70d51 airspeed_calibration: remove unused include 2016-07-07 11:35:50 +02:00
David Sidrane 1d5c5497b5 Reduces wasted FLASH by > 4K (#4994)
* Reduces wasted FLASH by > 4K

* Removed PX4_IMPLEMENT_PX4_LOG_MODULENAME

* Moved implamentation of px4_log_modulename to px4_log.c
2016-07-06 23:52:08 +02:00
James Goppert 056f73f5d2 Changed LPE distance sensor timeout logic. (#4996) 2016-07-06 10:31:55 -04:00
Lorenz Meier 703141d650 Estimator cleanup 2016-07-06 13:37:46 +02:00
Lorenz Meier 332f669d9b Add tap-v1 config 2016-07-06 13:34:35 +02:00
Lorenz Meier 7ed0eba50e USB config is now in main boot 2016-07-06 13:31:24 +02:00
Lorenz Meier 8a2155f2af UAVCAN is now in main RCs 2016-07-06 13:31:11 +02:00
Lorenz Meier 96f053273c Always start default mc apps 2016-07-06 13:30:58 +02:00
Beat Küng 09ecc84cc7 gps file dump: re-implement with an uORB topic & write to the log file (#4987)
Drawbacks of the previous method: when writing to the SD card, there are
high delays in the write() call of several 100ms, every now and then. The
frequency and length of these events depend on:
- SD card
- used logger bandwidth
- bandwidth of gps data (RTCM)
Since the whole gps thread was blocked during this period, it lead to
gps timeouts and lost module.

What we do now is: publish an orb topic with queuing. This makes it async
and the logger takes care of buffering. This means it's best to:
- use high logger rate
- use large logger buffer
- reduce logger bandwith by disabling unused topics
2016-07-06 09:32:37 +02:00
James Goppert 7e883809e3 Bump matrix version to 1.0.1. 2016-07-06 01:43:59 -04:00
James Goppert c38f23c0e1 Bump matrix version. (#4993) 2016-07-05 21:20:17 -04:00
James Goppert 9c0ed52bb8 Updated matrix lib to 1.0.0. (#4991)
* Updated matrix lib to 1.0.0.

* Bump matrix version.
2016-07-05 17:38:35 -04:00
James Goppert 09ddc24801 Added agl smoothing to LPE. (#4976) 2016-07-05 16:54:08 -04:00
Julian Oes 3524fd7d24 ekf2: don't ignore function argument (#4990) 2016-07-05 17:40:37 +02:00
Ivan Dimitrov e342299204 Fixed filename in the Doxygen field. See issue "wrong doxygen descriptor (file name) #4979" 2016-07-05 15:17:05 +02:00
Beat Küng c4e77cf411 logger: fix '-r 0' parameter: should be unlimited rate instead of 1Hz 2016-07-05 14:08:25 +02:00
Beat Küng c94fe845ec fix logger: remove space in format for changed parameters 2016-07-05 14:08:25 +02:00
Beat Küng a455962e17 logger: only call write_add_logged_msg when sucessfully subscribed 2016-07-05 14:08:25 +02:00
Eike dc1f343501 Change lower range limit of SF10a to 0.01m (#4977)
* SF10a driver added

* Remove Sf10a driver

* Set lower range boundary to 0.01m for LPE
2016-07-04 21:41:58 +02:00
Daniel Agar 7f89994785 use NAV_ACC_RAD for vertical waypoint acceptance (#4978) 2016-07-04 21:41:16 +02:00
Daniel Agar a9a3050682 EKF2 HIL gps decrease s_variance_m_s 5.0 -> 1.0 (#4973) 2016-07-04 08:18:15 +02:00
Andreas Antener 8d254058fa added square wave mode and PWM max parameter 2016-07-03 22:23:25 +02:00
bharathr d96810f250 Removed px4 config file for 200qx P1 board, updated P2 board version to support Qualcomm ESCs 2016-07-03 12:43:54 +02:00
bharathr 29be7c3003 Updated motor-esc mappings in 200qx config file 2016-07-03 12:43:54 +02:00
bharathr 9131647566 Fixed UART_ESC_MODEL parameter in 200qx config file 2016-07-03 12:43:54 +02:00
bharathr 00243a9842 Updated 200qx config files (removed calib files, cleaned up and renamed all files) 2016-07-03 12:43:54 +02:00
Martin K. Schröder 97d9fd38be Update Matrix.hpp (#4966)
This was horribly wrong. Matrix is first cast into a matrix of size NxM (which is supposed to be the size of the result - NOT the starting point) so the transpose result becomes garbage. Instead make "Me" an MxN matrix as the original. Took me a whole evening to figure out this problem. Now my Kalman filter finally returns good results.
2016-07-03 12:29:58 +02:00
Lorenz Meier bc6e83f5e3 Version reporting: Be more accurate about platforms 2016-07-02 13:00:07 +02:00
Lorenz Meier d85e416680 Fix default handling for battery params 2016-07-02 12:59:49 +02:00
Lorenz Meier 9258bb2ae8 v1.4.0 transitional support for battery count 2016-07-02 12:08:57 +02:00
Lorenz Meier 88cf8f23f6 Fix ver command 2016-07-02 12:08:30 +02:00
Lorenz Meier fd17c87eb4 Fix release parsing 2016-07-02 12:00:56 +02:00
Lorenz Meier 972a6f7be8 Fix MAVLink reporting of Firmware version, implement dev / release version reporting 2016-07-02 11:43:24 +02:00
Lorenz Meier 2a729028bd SITL: Set battery cells 2016-07-02 11:41:23 +02:00
tumbili 7e282f579b sensors app: logic fixed and cleanup
- do not exit sensors app if sensor init failed
- do not spam console if we fail over first/second gyro

Signed-off-by: tumbili <roman@px4.io>
2016-07-01 23:11:38 +02:00
Hidenori ee58188162 Split Navio2 specific parts from general RPI2 files
For Navio2, make posix_navio2_release and use navio2.config.
2016-07-01 23:08:17 +02:00
Hidenori 506d1855ff rename files and add navio target 2016-07-01 23:08:17 +02:00
Miguel Arroyo b871b322d2 Using Actuator Control Group 0 & Checkstyle fixes 2016-07-01 23:08:17 +02:00
Hidenori 76ee17e532 RC input and PWM output for Navio2 2016-07-01 23:08:17 +02:00
Daniel Agar 54e14cd4b6 add latest version to README (#4960) 2016-07-01 23:00:35 +02:00
James Goppert cb3120764a Made LPE var pub threshold a parameter. (#4959) 2016-07-01 13:27:29 -04:00
Lorenz Meier a0fdfb0c21 Strip ESC calib commandline tool 2016-07-01 18:23:08 +02:00
Lorenz Meier ed19d1ff6b EKF2 wrapper: Optimize for size 2016-07-01 18:22:56 +02:00
Lorenz Meier fad07a45b9 Mathlib: Optimize for sixe 2016-07-01 18:21:35 +02:00
Lorenz Meier 8162300522 Switch fixed wing to EKF2. Does not link yet. 2016-07-01 18:09:20 +02:00
Lorenz Meier e43625cfc1 ROMFS: Clear out SITL mixers from deployed image, delete unused mixers, move test mixers to test config 2016-07-01 18:08:32 +02:00
Lorenz Meier 42d8459e87 We are not using the conversion scripts in this ZIP file any more 2016-07-01 18:04:47 +02:00
Lorenz Meier 82b2fa5ecb Commander should not depend on MAVLink 2016-07-01 18:04:09 +02:00
Lorenz Meier 37edb43b60 ROMFS: Strip README files 2016-07-01 18:03:38 +02:00
Lorenz Meier 6268cdc86a Solo is just a normal X quad 2016-07-01 18:03:23 +02:00
James Goppert 00dfc99e08 LPE Variance Dependent Publication (#4914)
* Use variance to control publishing for LPE.

* Don't stop publishing if we have gps/ baro.

* LPE tuning and cleanup.

* Added bias saturation to LPE.

* Added vector enabled low pass filter block.

* Added rk4 integration and pub lowpass to LPE.

* Fix std::abs issue on mac/ reset lowpass on state reset.

* Don't estimate gyro bias when rotating at high speed  att_est_q.

* Lowered low pass on position to 5 Hz for LPE.

* Streamline state space update for LPE.

* Added health flags to est2 log.

* Revert to old tuning, more conservative, less faults.

* Formatting.

* Fix for fault message on LPE.

* Added subscription throttling to LPE.

* Formatting.
2016-07-01 11:43:09 -04:00
sander 2a395c3fec Moved to integrationtests 2016-07-01 11:44:37 +02:00
sander 1548a9a2a1 Change mission to new format and reset defaults 2016-07-01 11:44:37 +02:00
Andreas Antener 25e749de77 use MC auto rates always in AUTO
removed duplicate weathervaning limit
2016-07-01 11:31:57 +02:00
Daniel Agar a2b1269b27 check_code_style don't paginate output (#4952)
- fixes #4943
2016-06-30 21:00:11 -04:00
Lorenz Meier 2214e7c202 Commander: Remove annoying GPS fix regained warning 2016-06-30 16:59:17 +02:00
tumbili 998579befc mc pos control: zero yaw setpoint move rate in attitude setpoint topic
- fixed bug where a non-zero yaw setpoint move rate could make the drone
yaw around in non-manual modes

Signed-off-by: tumbili <roman@px4.io>
2016-06-30 16:42:51 +02:00
Lorenz Meier 0a40034159 Takeoff: Fix coordinate scaling (#4947) 2016-06-30 16:26:05 +02:00
Andreas Antener 5dcc62d8f9 allow yaw setpoint offset to be reduced once maxed out 2016-06-30 14:30:59 +02:00
Daniel Agar 377726a9a7 sitl gazebo plane fix land detector startup order (#4932) 2016-06-30 13:56:06 +02:00
Daniel Agar 07fa814597 FW vtol landing always forced (#4939) 2016-06-30 13:55:47 +02:00
Lorenz Meier 9649050c2e Update ECL to master 2016-06-30 13:29:47 +02:00
tumbili 036f42999a vtol delta quad plane: adjusted default controller gains
Signed-off-by: tumbili <roman@px4.io>
2016-06-29 13:29:57 +02:00
tumbili 57a665ad99 vtol delta quad plane: adjusted mixer scaling
Signed-off-by: tumbili <roman@px4.io>
2016-06-29 13:28:58 +02:00
Samay Siga fcee34a9d1 Quad tilt vtol config (#4473)
* Added new VTOL Config

I added new Vehicle ID for our VTOL aircraft - Quad - Tilt Rotor - FW

Added
13010_claire
claire.main.mix
claire.aux.mix

* Added files via upload

* Delete 13010_claire

* Create 13010_claire

* Update 13010_claire

* Update claire.main.mix

* Update claire.aux.mix
2016-06-29 09:14:18 +02:00
Andreas Antener 5ed4e4e3a5 use proper matching for VTOL fixed-wing state regarding position acceptance 2016-06-28 22:44:49 +02:00
Andreas Antener 53b5758eb4 added mission name to assertion outputs 2016-06-28 22:44:49 +02:00
Andreas Antener 85b5b399b9 updated FW horizontal acceptance radius to work with deltaquad 2016-06-28 22:44:49 +02:00
Andreas Antener 26de353d4f added mission file to test name 2016-06-28 22:44:49 +02:00
Andreas Antener 2f581a296e enable VTOL tests on CI again 2016-06-28 22:44:49 +02:00
Andreas Antener c9f278e46f fix rcS for standard vtol 2016-06-28 22:44:49 +02:00
Andreas Antener 0e5a83f3c1 temporarily disabled running mission test on CI 2016-06-28 22:44:49 +02:00
Andreas Antener 37884dc5dd fixed landing and transition detection test 2016-06-28 22:44:49 +02:00
Andreas Antener d995f758c2 added mission test to CI run 2016-06-28 22:44:49 +02:00
Andreas Antener f252ac3eff added mission checks for landing and VTOL transition 2016-06-28 22:44:49 +02:00
Andreas Antener 57fa9d2070 use separate altitude offset check in FW 2016-06-28 22:44:49 +02:00
Andreas Antener 05dc643f17 increased fixed wing radius for mission tests and added more informative output for position matching 2016-06-28 22:44:49 +02:00
Andreas Antener 361abd7f04 added VTOL test missions 2016-06-28 22:44:49 +02:00
Andreas Antener 00d56b9ef8 added VTOL mission test, updated mission test to check mission depending on vehicle state 2016-06-28 22:44:49 +02:00
Andreas Antener 150eb779ae added draft script to run missions against SITL 2016-06-28 22:44:49 +02:00
Andreas Antener 5c88353d05 removed GCS link from mavros 2016-06-28 22:44:49 +02:00
Beat Küng 8a12dee125 cmake: remove all module.mk files & cmake conversion script (#4918)
It seems these files are leftovers.
2016-06-28 09:26:36 +02:00
Beat Küng b28bfce186 position_estimator_inav: fix compiler issue for GCC 6.1.1 (#4923)
GCC output:
implicit conversion from ‘float’ to ‘double’ to match other operand of
binary expression [-Werror=double-promotion]

It seems gcc 6.1.1 uses the float variant of fabs, whereas older gcc's
use the double version. This makes it compile for both.
2016-06-28 09:25:36 +02:00
Roman Bapst ec35e77175 px4io driver: fix reporting of mixer limits (#4922)
mixer limit topic was not filled correctly

Signed-off-by: tumbili <roman@px4.io>
2016-06-27 17:31:43 +02:00
Daniel Agar 050eedc4f8 mavlink publish WIND_COV (#4913)
* mavlink publish WIND_COV

-closes #4678

* px4fmu-v2_default disable logger and sync configs
2016-06-27 16:16:24 +02:00
James Goppert 5935b18581 Added EPH/EPV min to LPE. (#4915) 2016-06-27 08:46:00 +02:00
Eike 04e8b40a5c Posix LPE target (#4911) 2016-06-27 08:43:39 +02:00
Daniel Agar 422acc0b69 travis-ci add check_format to qgc_firmware 2016-06-26 17:42:00 -04:00
Daniel Agar b8b855f2aa param.c fix style 2016-06-26 17:36:45 -04:00
Lorenz Meier 3c2bd4f6dd Param interface: Only mark as changed if value changed 2016-06-26 22:29:14 +02:00
Lorenz Meier acc8acd059 FMU driver: Fix typo 2016-06-26 22:27:45 +02:00
Lorenz Meier 33e259e827 Update controller gains to match better vehicle models 2016-06-26 22:25:55 +02:00
Lorenz Meier 47a4b95217 Updated simulation models 2016-06-26 22:25:26 +02:00
Lorenz Meier e9fb929f50 Annotate build type classes for ver command 2016-06-26 21:38:14 +02:00
Daniel Agar cb320f6e8a param set default battery parameters (#4912) 2016-06-26 21:27:11 +02:00
Lorenz Meier 27e20acbae Leave pin 5 and 6 of the AUX port available for camera triggering when the trigger is enabled 2016-06-25 12:15:32 +02:00
tommises e6bb21db65 Leave some pins available for camera trigger GPIO. 2016-06-25 12:11:19 +02:00
Julian Oes 6618cac10a RPi2: don't forget to start the baro 2016-06-25 12:00:49 +02:00
Julian Oes fedde86bf4 df_lsm9ds1_wrapper: new DF submodule, fixes 2016-06-25 12:00:49 +02:00
Julian Oes e56be33e50 RPi2: switch from ekf2 to q/inav 2016-06-25 12:00:49 +02:00
Julian Oes 8b8766e840 RPi2: put drivers back in 2016-06-25 12:00:49 +02:00
Julian Oes ea7cebbf10 scp_upload.sh: use ENV variable to set IP of RPi2 2016-06-25 12:00:49 +02:00
Julian Oes 4c0ed8bdd5 df_lsm9ds1_wrapper: astyle 2016-06-25 12:00:49 +02:00
Hidenori ef729ab2d8 MS5611 driver wrapper for RPi 2016-06-25 12:00:49 +02:00
Miguel Arroyo f0dbae2e19 Adds LSM9DS1 DriverFramework 2016-06-25 12:00:49 +02:00
Miguel Arroyo 8b8513fe8c Adds LSM9DS1 Wrapper 2016-06-25 12:00:49 +02:00
Henry Zhang ae6600e48f MAVLink app: fix mavlink forwarding issue. (#4907) 2016-06-25 11:02:01 +02:00
Andreas Daniel Antener 705a08bbbd do not modify attitude setpoint in velocity controlled mode (#4905) 2016-06-25 10:59:50 +02:00
Daniel Agar 8ba5afcd5a circleci ccache (#4906) 2016-06-25 00:25:13 -04:00
Daniel Agar 52c790b184 circleci sync submodules recursive 2016-06-24 20:21:46 -04:00
Lorenz Meier 645204eb42 Update MAVLink library versions 2016-06-24 12:47:59 +02:00
Lorenz Meier e432a406b6 Update MAVLink submodules 2016-06-24 11:45:23 +02:00
James Goppert bf9f3b6061 Added QAV-R (raceblade) 5". (#4897)
* Added QAV-R (raceblade) 5".

* Added I gain for qav-r.
2016-06-24 11:44:39 +02:00
Lorenz Meier 286efb6b34 Remove POOSIX porting noise from ms5611 driver (#4896) 2016-06-24 10:39:55 +02:00
Lorenz Meier d49598b8b3 Build SF10A on FMUv4 2016-06-24 10:31:28 +02:00
Lorenz Meier 7b2367cdff Remove unused topic from SF10A 2016-06-24 10:31:17 +02:00
ecmnet 993831aba8 SF10A driver fix 2016-06-24 10:28:25 +02:00
Roman eabc4647c2 mavlink receiver: fixed unit conversions for current
Signed-off-by: Roman <bapstr@ethz.ch>
2016-06-24 08:35:27 +02:00
Roman f754d23a0f mavlink receiver: fixed computation of cell count
Signed-off-by: Roman <bapstr@ethz.ch>
2016-06-24 08:10:35 +02:00
Lorenz Meier 925c340915 Remove unused code from simulated driver 2016-06-24 00:24:09 +02:00
Beat Küng e0c11f5545 fix ekf2_replay_main.cpp: remove timestamp_velocity from gps topic 2016-06-24 00:22:01 +02:00
Beat Küng cf5d959f1b gnss.cpp: switch to relative gps timestamp 2016-06-24 00:22:01 +02:00
Beat Küng 940ac5471d ekf2: remove unused gps_msg.time_usec_vel 2016-06-24 00:22:01 +02:00
Beat Küng f8e9a19889 gps_position: convert uint64 timestamp_time -> int32 timestamp_time_relative
We need to make this timestamp relative to the main timestamp. Necessary
for replay, and saves some space.
2016-06-24 00:22:01 +02:00
Beat Küng e2a7145379 vehicle_gps_position: remove timestamp_variance & timestamp_velocity (they're not used) 2016-06-24 00:22:01 +02:00
Beat Küng 89f5bd27e8 vehicle_gps_position: use timestamp field instead of timestamp_position
timestamp was unused. This allows to remove timestamp_position.
2016-06-24 00:22:01 +02:00
Lorenz Meier bf0b3c1585 More complete ESC feedback, ensure to include a timestamp 2016-06-24 00:08:24 +02:00
Lorenz Meier 34c0d3e99a Add TAP to vendor list 2016-06-24 00:08:24 +02:00
Lorenz Meier b04e2526a1 Fix compile errors for tap ESC 2016-06-24 00:08:24 +02:00
Lorenz Meier de1c865881 Move TAP ESC to FMUv4 to save flash on FMUv2 2016-06-24 00:08:24 +02:00
Lorenz Meier 1f8b75c9f3 Enable it in build 2016-06-24 00:08:24 +02:00
Lorenz Meier fab201a2d6 Initial import of TAP controllers 2016-06-24 00:08:24 +02:00
Mark Whitehorn 40a7bd009f implement Spektrum bind function for Pixracer R14 (#4887) 2016-06-23 23:27:51 +02:00
Lorenz Meier 024a86c309 Simulator: fix battery sim 2016-06-23 22:32:14 +02:00
Roman Bapst 571798c318 Pr external battery monitoring (#4881)
* mavlink receiver: added handling of battery status

handle incoming battery status messages in order to support external
battery monitoring

Signed-off-by: Roman <bapstr@ethz.ch>

* sensor params: added parameter for battery monitoring source

Signed-off-by: Roman <bapstr@ethz.ch>

* sensors: only publish battery status if we don't have external battery
monitoring activated

Signed-off-by: Roman <bapstr@ethz.ch>
2016-06-23 18:41:38 +02:00
sirPerna 9f95f457a9 Update default Caipirinha parameters (#4883)
* Update default parameters for TBS Caipirinha

* reverse channel 0 doesn't exist
2016-06-23 18:09:07 +02:00
Daniel Agar b09872e795 travis-ci fix git shallow clone for git ver (#4885) 2016-06-23 11:04:36 -04:00
tumbili c2825f701a ekf_att_pos_estimator: fixed saving params when landed
fixed logic such that parameters are saved when vehicle just landed.
only save parameters once when state changed from in_air to landed.

Signed-off-by: tumbili <roman@px4.io> and bkueng <beat-kueng@gmx.net>
2016-06-23 15:56:51 +02:00
tumbili 8026273cb0 land_detector: do not publish if landing or freefall state has not changed
Signed-off-by: tumbili <roman@px4.io> and bkueng <beat-kueng@gmx.net>
2016-06-23 15:56:51 +02:00
Beat Küng 7dea8d4a24 fix 10020_3dr_quad script: load proper mixer file (#4880)
fixes regression from 85245471c0
2016-06-23 14:54:20 +02:00
Nate Weibley 0551e001e2 Properly reflect flow control state if IOCTL fails (#4873)
The flow control state is improperly reflected as enabled if the arch/HAL rejects an IOCTL to turn it on. Mavlink::enable_flow_control updates _flow_control_enabled only if the IOCTL call does not fail.
2016-06-23 10:17:17 +02:00
Roman 27e61127a8 ekf2: fix if else logic
Signed-off-by: Roman <bapstr@ethz.ch>
2016-06-23 09:08:35 +02:00
Roman 6f6ae78cf2 ekf_att_pos_estimator: added logic for airspeed modes
Signed-off-by: Roman <bapstr@ethz.ch>
2016-06-23 09:08:35 +02:00
tumbili c1ba7ab62b vtol attitude control: fixed code style
Signed-off-by: tumbili <roman@px4.io>
2016-06-23 09:08:35 +02:00
sander bbf852787e Rename param to throttle 2016-06-23 09:08:35 +02:00
sander 3002852bfa Allow throttle updates below 10% 2016-06-23 09:08:35 +02:00
sander f2e425b75b commenting 2016-06-23 09:08:35 +02:00
sander 9d59ba125d remove debug info 2016-06-23 09:08:35 +02:00
sander 37531c018a Implement MAV_CMD_DO_CHANGE_SPEED throttle 2016-06-23 09:08:35 +02:00
Roman 7f8c183d99 added airspeed mode enum to control state topic
Signed-off-by: Roman <bapstr@ethz.ch>
2016-06-23 09:08:35 +02:00
Roman 22db94e352 removed debug printf
Signed-off-by: Roman <bapstr@ethz.ch>
2016-06-23 09:08:35 +02:00
sander cea2350d2e Time based front transition blending 2016-06-23 09:08:35 +02:00
sander b54982965b Allow VTOL transition based on time 2016-06-23 09:08:35 +02:00
tumbili 1bce38bd9b code style formatting 2016-06-23 09:08:35 +02:00
tumbili c2da51ccf5 use airspeed mode parameter to decide which method used to publish
control state airspeed
2016-06-23 09:08:34 +02:00
tumbili 099becb353 added parameter for airspeed mode selection
this will enable small planes flying without an
airspeed sensor
2016-06-23 09:08:34 +02:00
Daniel Agar e0a214da20 travis-ci OSX don't use homebrew (#4875)
* the OSX builds were spending the majority of the time just updating homebrew and installing a couple packages
2016-06-23 01:22:47 -04:00
Daniel Agar 3194153b21 travis-ci homebrew cleanup (#4874) 2016-06-22 21:55:12 -04:00
Daniel Agar b247dac120 travis-ci optimizations (#4870)
* move gcc 4.9 build to circleci

* travis-ci update to xcode 7.3

* travis-ci limit git fetching for OSX

* Makefile split firmware targets for CI

* OSX ccache
2016-06-22 17:42:49 -04:00
Lorenz Meier 56ddd29f1a Commander: Update params on last step of mag cal 2016-06-22 16:03:01 +02:00
Beat Küng e7f31393bc orb: reduce size of SubscriberData struct (#4771)
- priority field uses only the lower 8 bits, so we can merge with the
  update_reported flag
- orb_set_interval is not used often, so make the necessary data an
  optional pointer and alloc only when needed.

Memory savings:
- pixracer (w. ekf2): 7.3kB
- pixhawk: 5.3kB
2016-06-22 15:28:23 +02:00
Julian Oes dfa2ec8c6c DriverFramework: updated submodule (#4867)
This brings some makefile and script fixes, as well as an updated dspal.
2016-06-22 15:19:29 +02:00
Roman Bapst 37108870e1 fw_pos_control_l1: added roll setpoint for logging (#4869)
in altitude control mode for fixed wings the roll setpoint was not
logged because the position controller publishes the attitude setpoint
but the desired roll setpoint is calculated in the attitude control
module. Now the position controller calculates the roll setpoint as well
for the sake of logging.

Signed-off-by: tumbili <roman@px4.io>
2016-06-22 15:19:11 +02:00
Daniel Agar 36103d33d2 travis-ci only build qgc firmware 2016-06-22 13:51:39 +02:00
Daniel Agar 3f3a44fec5 cmake status message if MEMORY_DEBUG enabled 2016-06-22 13:51:39 +02:00
Daniel Agar 924fb49bf5 fw_pos_control_l1 shorten task name
-limited to 16 chars
2016-06-22 13:51:39 +02:00
Daniel Agar b65291579f show bad formatting diff 2016-06-22 13:51:39 +02:00
Daniel Agar 4d0bb9f1e2 update eclipse project file templates 2016-06-22 13:51:39 +02:00
jwilson 9794bb2f2f Running fix_code_style.sh on the requested source files. 2016-06-22 08:57:06 +02:00
jwilson acc1f04b67 Unfortunately, lot's of whitespace changes, required to satisfy unspecified code style format errors. 2016-06-22 08:57:06 +02:00
jwilson 1091319274 Removing shmem_posix.c from the unit testing since param_shmem_test is disabled. 2016-06-22 08:57:06 +02:00
jwilson a2c16a3b5e Another attempt to fix the build problem in the shmem code. 2016-06-22 08:57:06 +02:00
jwilson 701d6314d2 Fixes build problem in the shmem code. 2016-06-22 08:57:06 +02:00
jwilson a73ac821ab Fixes shared memory locking bug and eliminates the need for an AppsProm driver to reserve a shared memory region. 2016-06-22 08:57:06 +02:00
tumbili 6739ae9dfc ekf2: substract gyro bias from control state rates
Signed-off-by: tumbili <roman@px4.io>
2016-06-22 07:10:20 +02:00
tumbili c84870046e updated ecl: added method to return ekf bias state
Signed-off-by: tumbili <roman@px4.io>
2016-06-22 07:10:20 +02:00
Lorenz Meier b563fae118 Fix request data stream handling 2016-06-22 00:09:13 +02:00
Lorenz Meier de675845af Fix navigator timeout logic 2016-06-22 00:04:31 +02:00
Lorenz Meier 2f113a4ce3 MAVLink: Allow data rate updates 2016-06-21 16:38:53 +02:00
Lorenz Meier 1869ffd15f Fix unknown command message for Spektrum bind 2016-06-21 13:36:35 +02:00
Julian Oes 91127d51c0 commander: stay in failsafe even when landed
If the failsafe state is ended when landed, we would switch back to
POSCTL and therefore take off again, however, all we want is stay on
ground and wait for the auto disarm.
2016-06-21 10:21:34 +02:00
dong.chen 5ad671ed4c Solve the problem When lost rc signal, it will rtl repeated. 2016-06-21 10:21:34 +02:00
Julian Oes c7ec07be70 commander: properly use new param
The param COM_ARM_WO_GPS is set to 1 by default to allow arming without
GPS. This then sets a bool arm_without_gps which translates to
!GNSS_check in preflightCheck.
2016-06-21 10:21:34 +02:00
Julian Oes f67e74935e commander: remove leftover printf 2016-06-21 10:21:34 +02:00
Julian Oes 66dd72555a navigator: change default of RC loss param to RTL 2016-06-21 10:21:34 +02:00
Julian Oes ef04085ac5 commander: go to ALTCTL if GPS is lost in POSCTL
Previously, we renained in POSCTL and would drift away if GPS was lost.
2016-06-21 10:21:34 +02:00
Julian Oes 67a4a57491 commander: only warn if termination happens
The termination warnings were printed even if termination was not
actually enabled. This was confusing and is therefore fixed.
2016-06-21 10:21:34 +02:00
Julian Oes 872b08f677 commander: remove unneeded include 2016-06-21 10:21:34 +02:00
Julian Oes fdff6ea325 Revert "commander: remove unused/wrong failsafe handling"
This reverts commit 9e704a5e121c7516e2133d02b328500d9d66fb67.
2016-06-21 10:21:34 +02:00
Julian Oes d0355cef1f Revert "commander/navigator: remove param NAV_RCL_ACT"
This reverts commit 77ea4cebf41cd106fe771b9eb469aa2326339467.
2016-06-21 10:21:34 +02:00
Julian Oes 049146ef9c commander: param to allow arming without GPS 2016-06-21 10:21:34 +02:00
Julian Oes 3e9d1388af commander: remove unused/wrong failsafe handling
The deleted code conflicts with the failsafe handling in set_nav_state.
Also, flight termination was usually disabled by circuit breaker which
means this code had no effect anyway.
2016-06-21 10:21:34 +02:00
Julian Oes 016d514d80 commander/navigator: remove param NAV_RCL_ACT
The param NAV_RCL_ACT was not implemented as described. Also, it has the
completely the wrong name. It should be a COM param and not NAV.
Therefore, remove the param and delete the partly implemented
and probably never used functionality.
2016-06-21 10:21:34 +02:00
Julian Oes ea10c8c8a3 circuit_breaker: change default for GPS failure
We should definitely take action when GPS fails, this circuit breaker
shouldn't be engaged anymore.
2016-06-21 10:21:34 +02:00
Julian Oes 739d1cfd3f navigator: always run the loop, even without GPS
If the navigator stops when no more position updates arrive, it won't
switch to land mode when DESCEND is requested by the commander.
2016-06-21 10:21:34 +02:00
Julian Oes fe29d99d62 commander: use the gps_failure flag
The gps_failure flag had been ignored in some navigation states.
2016-06-21 10:21:34 +02:00
Julian Oes 4d10759699 commander: use DESCEND mode and not LANDGPSFAIL
Always use the DESCEND mode and not LANDGPSFAIL because LANDGPSFAIL will
try to loiter for some time and then request termination instead of
descending gently and trying to land.
2016-06-21 10:21:34 +02:00
Henry Zhang 178f32ab41 Commander:fill missing command ack. (#4814) 2016-06-21 10:20:33 +02:00
Chris Lovett 847d9ec4f4 Fix code style using Tools/fix_code_style.sh 2016-06-21 10:10:50 +02:00
Chris Lovett 534e10c96a Implement code review feedback. Add get_id_static to MavlinkStream items. Add implementation of MAV_CMD_SET_MESSAGE_INTERVAL, MAV_CMD_GET_MESSAGE_INTERVAL. Add deprecation message to REQUEST_DATA_STREAM. 2016-06-21 10:10:50 +02:00
Chris Lovett 4ef4be2d70 MavlinkReceiver::handle_message_request_data_stream walks into deleted memory when you send the "stop" bit on a stream. It also fails to restart the stream because it deletes the stream when you send the stop command, so restart needs to use stream_list to find the stream again. 2016-06-21 10:10:50 +02:00
Lorenz Meier 3f45d008eb Fix stack main usage in motor ramp app 2016-06-21 09:43:00 +02:00
Julian Oes 8aee4432a9 px4io: set safety on before going into bootloader (#4860)
Sometimes when flashing new firmware, the IO update fails because safety
is off. In this case, we should set safety on first before putting the
IO board into bootloader mode.
2016-06-21 09:15:38 +02:00
Lorenz Meier 85245471c0 Update 3DR quad config, remove rendundant entries 2016-06-20 22:37:05 +02:00
Andreas Antener 2c29652136 fixed code style in motor_ramp 2016-06-20 20:59:43 +02:00
Andreas Antener 0581f1af52 added motor_ramp to fmu v4 2016-06-20 20:24:46 +02:00
Andreas Antener 2dc97fc680 added check for running attitude controllers, cleaned-up output 2016-06-20 20:24:46 +02:00
Andreas Antener 4e0980aeb9 fixed sine output 2016-06-20 20:24:46 +02:00
Andreas Antener 7f56961e26 removed unnecessary output texts 2016-06-20 20:24:46 +02:00
Roman 87dc996a41 added option to output sine wave 2016-06-20 20:24:46 +02:00
Andreas Antener b3c3d6f88f fixed format error 2016-06-20 20:24:46 +02:00
Andreas Antener 7c76c7c25a added warning, set hold time to 1 sec 2016-06-20 20:24:46 +02:00
Andreas Antener a7834693e8 updated usage, increased prio and lowered max hold time 2016-06-20 20:24:46 +02:00
Andreas Antener d8cdb2032c constantly set outputs for ramp, otherwise the ESC doesn't keep it's setting (why?) 2016-06-20 20:24:46 +02:00
Andreas Antener ede032c557 ouput pwm values directly 2016-06-20 20:24:45 +02:00
Andreas Antener fabb37975d added motor_ramp to v2 config 2016-06-20 20:24:45 +02:00
Andreas Antener 0b930a36b9 added parameters to motor_ramp 2016-06-20 20:24:45 +02:00
Andreas Antener 1aeb139157 added motor ramp app, draft impl 2016-06-20 20:24:45 +02:00
Andreas Antener d1b27ab056 moved params NAV_OBL to COM_OBL 2016-06-20 19:23:11 +02:00
Andreas Antener 8727295f8e fix OBL parameters in commander 2016-06-20 19:03:10 +02:00
Andreas Antener d3d9f013f4 set OBL parameters for iris 2016-06-20 19:03:10 +02:00
Andreas Antener 095997ca59 changed order of arguments for readability 2016-06-20 19:03:10 +02:00
Andreas Antener fedb9de6ef fixed offboard loss timing handling 2016-06-20 19:03:09 +02:00
Andreas Antener ced8376268 added offboard lost actions with additional timeout 2016-06-20 19:03:09 +02:00
Daniel Agar e42b5804a0 travis-ci only run make check within docker (#4854)
* otherwise the build environment doesn't get the proper return code
2016-06-20 10:03:37 -04:00
Julian Oes d92496a7f7 df_ms5607_wrapper: astyle (#4853) 2016-06-20 15:29:30 +02:00
Michael Schaeuble f95f37cb7b Update to DF commit with the MS5607 driver 2016-06-20 12:55:01 +02:00
Michael Schaeuble 83ec092b46 Update bebop configuration and use parameters 2016-06-20 12:55:01 +02:00
Michael Schaeuble cc0d28e59b Update DF to include the MS5607 driver 2016-06-20 12:55:01 +02:00
Michael Schaeuble 0d9c031a2c Check for bebop ip as environment variable 2016-06-20 12:55:01 +02:00
Michael Schaeuble 847562f5d7 Don't build px4_simple_app anymore 2016-06-20 12:55:01 +02:00
Michael Schaeuble 47613fefa0 Don't advertise garbage, apply same fix from #4735 2016-06-20 12:55:01 +02:00
Michael Schaeuble 52d8723d55 Add df_ms5607_wrapper (a renamed copy from BMP280) 2016-06-20 12:55:01 +02:00
Michael Schaeuble 696a378120 Add modules and commands to bebop build 2016-06-20 12:55:01 +02:00
Michael Schaeuble 9933494d53 Add parrot bebop build structure 2016-06-20 12:55:01 +02:00
Lorenz Meier b2cfe05881 Adjust Typhoon H480 gains 2016-06-20 12:54:22 +02:00
Julian Oes 146c8ddbc3 px4_getopt: astyle 2016-06-20 09:37:43 +02:00
Lorenz Meier 97f6ad4e53 Even better Gazebo models 2016-06-18 19:28:48 +02:00
Lorenz Meier a812224103 Update standard VTOL 2016-06-18 18:18:00 +02:00
Lorenz Meier 95430180f0 Update gazebo 2016-06-18 17:37:24 +02:00
Lorenz Meier c647b6db4d Update gains 2016-06-18 17:36:48 +02:00
Lorenz Meier d860bdcdc0 Update VTOL gains 2016-06-18 17:03:49 +02:00
Lorenz Meier 229208610e Fix simulator code style 2016-06-18 17:03:11 +02:00
Lorenz Meier e7d02f6272 Update VTOL gains 2016-06-18 16:59:46 +02:00
Lorenz Meier 3ef6ee056f Sync rate control gains 2016-06-18 16:58:04 +02:00
Lorenz Meier 3c9f5694e7 Fix Gazebo models for VTOL and planes 2016-06-18 16:38:49 +02:00
Lorenz Meier 03813cc46b Update fixed VTOL model 2016-06-18 16:29:39 +02:00
Lorenz Meier afdc8cdf55 VTOL: Use standard attitude gains 2016-06-18 16:29:28 +02:00
Lorenz Meier 2242331f08 Update SITL Gazebo 2016-06-18 15:34:37 +02:00
Lorenz Meier eabb504445 Compress Iris Gazebo model 2016-06-18 13:16:05 +02:00
Lorenz Meier 7b109bacf2 Update Gazebo models 2016-06-18 12:08:45 +02:00
Lorenz Meier fd768fe5ac Update models 2016-06-18 10:41:35 +02:00
Lorenz Meier 5d18ea7502 Update models 2016-06-18 10:40:34 +02:00
Lorenz Meier 51df9771b3 Add support for more than 8 outputs, but do not enable it yet 2016-06-18 01:54:31 +02:00
Lorenz Meier 85e3073f14 Simulator: Send all actuator output groups 2016-06-18 01:50:42 +02:00
Lorenz Meier c285e231b7 Update jMAVSim 2016-06-17 22:44:42 +02:00
Lorenz Meier 9230688f54 Commander: Add transition command 2016-06-17 22:44:42 +02:00
Lorenz Meier e8274d3ddb SITL: Add gimbal meshes 2016-06-17 22:44:42 +02:00
Lorenz Meier e6b82898fb Add airframe model 2016-06-17 22:44:42 +02:00
Lorenz Meier 0126e49841 Solo: Use the right mixer 2016-06-17 22:44:42 +02:00
Lorenz Meier dff50072e9 Add new airframe meta files 2016-06-17 22:44:42 +02:00
Lorenz Meier 55267b9ad3 Add new airframe 2016-06-17 22:44:42 +02:00
Lorenz Meier 825ba912c3 Update plane mixer 2016-06-17 22:44:42 +02:00
Lorenz Meier 3770bfd641 Update Gazebo model for plane 2016-06-17 22:44:42 +02:00
Lorenz Meier d50e307243 Update Tailsitter model 2016-06-17 22:44:42 +02:00
Lorenz Meier c248adb18d Fix tuning gains for Solo and tailsitter 2016-06-17 22:44:42 +02:00
Lorenz Meier 96387ed824 Update SITL gazebo 2016-06-17 22:44:42 +02:00
Lorenz Meier acd7c37057 Get closer to correct tailsitter mixer, still incomplete 2016-06-17 22:44:42 +02:00
Lorenz Meier 413233341e Update SITL Gazebo model 2016-06-17 22:44:42 +02:00
Lorenz Meier afa9467dad Final plane mixer 2016-06-17 22:44:42 +02:00
Lorenz Meier 982c25b7da Update SITL Gazebo with new consistent interface 2016-06-17 22:44:42 +02:00
Lorenz Meier 184da9e743 Remove null mixers from plane now that we are doing it correctly 2016-06-17 22:44:42 +02:00
Lorenz Meier f11d42aab3 Simulator MAVLink: Forward port cleanly 2016-06-17 22:44:42 +02:00
Andreas Bircher 46ec1e6b95 fixing cherry-picking divergences 2016-06-17 22:39:02 +02:00
Andreas Bircher 6bd17c7ba4 adding user info 2016-06-17 22:39:02 +02:00
Andreas Bircher e951a356fe fixing the driver interface
Conflicts:
	PX4/src/drivers/camera_trigger/interfaces/src/pwm.cpp
	PX4/src/drivers/camera_trigger/interfaces/src/pwm.h
2016-06-17 22:39:02 +02:00
Andreas Bircher f038b16734 adding arming check before setting PWM 2016-06-17 22:39:02 +02:00
Kelly Steich eed968979f added parameter for choosing the camera interface mode
Conflicts:
	PX4/src/drivers/camera_trigger/camera_trigger.cpp
2016-06-17 22:39:02 +02:00
Andreas Bircher c49a2da261 adding arming check before setting PWM 2016-06-17 22:39:02 +02:00
Kelly Steich 2ec1e508d2 added setup method to constructor of camera interfaces
Conflicts:
	PX4/src/drivers/camera_trigger/interfaces/src/pwm.cpp
2016-06-17 22:39:02 +02:00
Andreas Bircher adffb85962 adding arming check before setting PWM 2016-06-17 22:39:02 +02:00
Kelly Steich 4c5f32ab16 delete the camera interface object in camera trigger destructor 2016-06-17 22:39:02 +02:00
Andreas Bircher f83c53c274 adding the initial pwm trigger logic 2016-06-17 22:39:02 +02:00
Kelly Steich 3671bfb743 added the camera interface info method to the camera trigger info method 2016-06-17 22:39:02 +02:00
Kelly Steich 29f31ae6ac fixed the triggering function logic
Conflicts:
	PX4/src/drivers/camera_trigger/camera_trigger.cpp
	PX4/src/drivers/camera_trigger/interfaces/src/camera_interface.h
	PX4/src/drivers/camera_trigger/interfaces/src/pwm.cpp
	PX4/src/drivers/camera_trigger/interfaces/src/pwm.h
	PX4/src/drivers/camera_trigger/interfaces/src/relay.cpp
	PX4/src/drivers/camera_trigger/interfaces/src/relay.h
2016-06-17 22:39:02 +02:00
Kelly Steich b31c346ea7 new file structure for the camera_trigger driver
Conflicts:
	PX4/cmake/configs/nuttx_px4fmu-v2_default.cmake
2016-06-17 22:39:02 +02:00
Julian Oes 1dec6e83c6 ecl: update submodule (#4839) 2016-06-17 21:16:54 +02:00
Eric Ye c446304751 Update makefile to ask for cmake 3.4.3 (#4831) 2016-06-17 10:47:06 -04:00
Daniel Agar bada390dde fw_pos_control_l1 fix FW_LND_FLALT usage (#4835)
-fixes #4745
2016-06-16 21:02:28 +02:00
David Sidrane 538d9ada25 Needed to avoid name collsion in upcomming Nuttx logger changes (#4830) 2016-06-15 21:51:53 +02:00
Daniel Agar e2801d35e4 fix comment spelling 2016-06-15 20:35:16 +02:00
Daniel Agar 64d9b8eefd fix COM_FLTMODE5 metadata typo 2016-06-15 20:35:16 +02:00
Daniel Agar 4ab8ddec53 rename cb_usb -> circuit_breaker_engaged_usb_check 2016-06-15 20:35:16 +02:00
Daniel Agar c22a9137dd commander cleanup headers 2016-06-15 20:35:16 +02:00
Daniel Agar 7bbfa5d94b cleanup px4_custom_mode 2016-06-15 20:35:16 +02:00
Daniel Agar d16daf5ba4 pwm_out_sim sleep if no fds (#4829)
-fixes #4828
2016-06-15 20:29:19 +02:00
James Goppert 2a26611cf5 Make LPE sonar reading more robust. (#4806) 2016-06-15 12:37:52 -04:00
Julian Oes a76eab367c DriverFramework: update submodule
This brings various PRs in:
- RPi build fixes
- unit tests on CI and on Mac
- some cmake cleanup
- CI style check for DF
2016-06-15 13:36:30 +01:00
Julian Oes d9d5d9d9e4 mc_pos_control: run the loop without position data
By running the loop in mc_pos_control without successfully polling on
position data, we still copy the manual input over so that
mc_att_control can consume it. This allows to fly in manual mode without
GPS and no position estimate.
2016-06-15 13:34:27 +01:00
Beat Küng 26b7ac3884 mavlink: remove an UDP remote port warning, print remote port in mode info 2016-06-15 09:56:34 +02:00
Beat Küng 574a67b93d fix px4_getopt: ensure progress in case of unknown options
Previously sdlog2 got stuck in an endless loop if an unknown argument was
given
2016-06-15 09:55:25 +02:00
Beat Küng 2b85c594b3 fix px4_getopt: correctly handle options that take an argument, but no argument is given
This lead to a segfault, for example 'logger start -r'
2016-06-15 09:53:37 +02:00
CarlOlsson d66af65a92 ekf2: fixed airspeed thr bug 2016-06-14 10:28:40 +02:00
Lorenz Meier b731a9e96c Fix AR Drone scaling param 2016-06-14 08:42:12 +02:00
Daniel Agar 2eac57731c travis-ci fix missing semicolon (#4812) 2016-06-14 02:18:22 -04:00
Daniel Agar f13b75a6d2 travis-ci fix s3 deploy conditions (#4810) 2016-06-14 01:56:42 -04:00
Daniel Agar 2f5357be7a travis-ci use px4io docker images (#4696) 2016-06-14 01:06:43 -04:00
Daniel Agar 6f7e978f33 initial circle-ci configuration (#4807) 2016-06-13 17:39:30 -04:00
Lorenz Meier 4cca4ea954 Add DOI 2016-06-12 11:53:55 +02:00
637 changed files with 33165 additions and 13936 deletions
-1
View File
@@ -64,7 +64,6 @@ CMakeLists.txt.user
GPATH
GRTAGS
GTAGS
*.config
*.creator
*.creator.user
*.files
+6 -6
View File
@@ -1,12 +1,15 @@
[submodule "mavlink/include/mavlink/v1.0"]
path = mavlink/include/mavlink/v1.0
url = git://github.com/mavlink/c_library.git
url = https://github.com/mavlink/c_library_v1.git
[submodule "mavlink/include/mavlink/v2.0"]
path = mavlink/include/mavlink/v2.0
url = https://github.com/mavlink/c_library_v2.git
[submodule "NuttX"]
path = NuttX
url = git://github.com/PX4/NuttX.git
url = https://github.com/PX4/NuttX.git
[submodule "src/modules/uavcan/libuavcan"]
path = src/modules/uavcan/libuavcan
url = git://github.com/UAVCAN/libuavcan.git
url = https://github.com/UAVCAN/libuavcan.git
[submodule "Tools/genmsg"]
path = Tools/genmsg
url = https://github.com/ros/genmsg.git
@@ -38,6 +41,3 @@
[submodule "src/drivers/gps/devices"]
path = src/drivers/gps/devices
url = https://github.com/PX4/GpsDrivers.git
[submodule "mavlink/include/mavlink/v2.0"]
path = mavlink/include/mavlink/v2.0
url = git://github.com/mavlink/c_library.git
+82 -94
View File
@@ -7,130 +7,118 @@ matrix:
fast_finish: true
include:
- os: linux
sudo: false
env: GCC_VER=4.8
- os: linux
sudo: false
env: GCC_VER=4.9
sudo: required
env: GCC_VER=4.8 DOCKER_REPO="px4io/px4-dev-base:2016-07-14"
services:
- docker
- os: osx
osx_image: xcode7
sudo: true
osx_image: xcode7.3
env: CCACHE_CPP2=1
cache:
ccache: true
pip: true
directories:
- $HOME/.ccache
addons:
apt:
sources:
- kubuntu-backports
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- build-essential
- ccache
- clang-3.5
- cmake
- g++-4.9
- gcc-4.9
- genromfs
- libc6-i386
- libncurses5-dev
- ninja-build
- python-argparse
- python-empy
- s3cmd
- texinfo
- zlib1g-dev
- $HOME/.pip/cache/
- $HOME/Library/Caches/pip
before_install:
- cd ${TRAVIS_BUILD_DIR} && git fetch --unshallow && git fetch --all --tags
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
pushd .
&& cd ~ && mkdir gcc && cd gcc
&& if [ "$GCC_VER" = "4.8" ]; then GCC_URL="https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2" ; fi
&& if [ "$GCC_VER" = "4.9" ]; then GCC_URL="https://launchpad.net/gcc-arm-embedded/4.9/4.9-2014-q4-major/+download/gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2" ; fi
&& wget -O gcc.tar.bz2 ${GCC_URL}
&& tar -jxf gcc.tar.bz2 --strip 1
&& exportline="export PATH=$HOME/gcc/bin:\$PATH"
&& if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
&& . ~/.profile
&& popd
&& git clone git://github.com/PX4/CI-Tools.git
&& ./CI-Tools/s3cmd-configure
&& mkdir -p ~/bin
&& wget -O ~/bin/astyle https://github.com/PX4/astyle/releases/download/2.05.1/astyle-linux && chmod +x ~/bin/astyle
&& astyle --version
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
cd ${TRAVIS_BUILD_DIR}
&& git fetch --unshallow && git fetch --all --tags
&& docker pull ${DOCKER_REPO}
;
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew tap PX4/homebrew-px4
&& brew update; brew update
&& brew install cmake ninja
&& brew install genromfs
&& sudo easy_install pip
&& sudo pip install empy
sudo -H easy_install pip
&& sudo -H pip install empy
&& wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ccache
&& sudo mv ccache /usr/local/bin
&& chmod +x /usr/local/bin/ccache
&& mkdir -p ~/bin
&& sudo ln -s /usr/local/bin/ccache ~/bin/c++
&& sudo ln -s /usr/local/bin/ccache ~/bin/cc
&& sudo ln -s /usr/local/bin/ccache ~/bin/clang
&& sudo ln -s /usr/local/bin/ccache ~/bin/clang++
&& sudo ln -s /usr/local/bin/ccache ~/bin/g++
&& sudo ln -s /usr/local/bin/ccache ~/bin/gcc
&& export PATH=~/bin:$PATH
&& wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ninja
&& sudo mv ninja /usr/local/bin
&& chmod +x /usr/local/bin/ninja
;
fi
before_script:
# setup ccache
- mkdir -p ~/bin
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-size
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-objcopy
- ln -s /usr/bin/ccache ~/bin/clang++
- ln -s /usr/bin/ccache ~/bin/clang++-3.4
- ln -s /usr/bin/ccache ~/bin/clang++-3.5
- ln -s /usr/bin/ccache ~/bin/clang
- ln -s /usr/bin/ccache ~/bin/clang-3.4
- ln -s /usr/bin/ccache ~/bin/clang-3.5
- export PATH=~/bin:$PATH
env:
global:
- NINJA_BUILD=1
# AWS KEY: $PX4_AWS_KEY
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
# AWS SECRET: $PX4_AWS_SECRET
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
- PX4_AWS_BUCKET=px4-travis
- GIT_SUBMODULES_ARE_EVIL=1
script:
- git submodule update --quiet --init --recursive
- ccache -M 1GB; ccache -z
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
arm-none-eabi-gcc --version && make check VECTORCONTROL=1;
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 px4fmu-v4_default
make tests;
fi
- ccache -s
after_success:
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${GCC_VER}" = "4.8" ]]; then
make package_firmware
&& find . -name \*.px4 -exec cp "{}" . \;
&& find . -maxdepth 1 -mindepth 1 -type f -name 'nuttx-*-default.px4' | sed 's/.\/nuttx-//' | sed 's/-default.px4//' | xargs -I{} mv nuttx-{}-default.px4 {}_default.px4
&& ./CI-Tools/s3cmd-put `find . -maxdepth 1 -mindepth 1 -type f -name '*_default.px4'` build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
&& ./CI-Tools/s3cmd-put Firmware.zip archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/
&& ./CI-Tools/s3cmd-put CI-Tools/directory/index.html archives/Firmware/$TRAVIS_BRANCH/
&& ./CI-Tools/s3cmd-put CI-Tools/index.html index.html
&& ./CI-Tools/s3cmd-put CI-Tools/timestamp.html timestamp.html
&& echo ""
&& echo "Binaries have been posted to:" https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
;
- make package_firmware && mkdir s3deploy-archive && cp Firmware.zip s3deploy-archive/
# find all px4 firmware (*.px4) and rename
- find . -type f -name 'nuttx-*-default.px4' -exec cp "{}" . \;
- find . -maxdepth 1 -mindepth 1 -type f -name 'nuttx-*-default.px4' | sed 's/.\/nuttx-//' | sed 's/-default.px4//' | xargs -I{} mv nuttx-{}-default.px4 {}_default.px4
- mkdir s3deploy-branch && mv *_default.px4 build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml s3deploy-branch/
# only deploy GCC 4.8 builds on master/beta/stable
- if [[ "$GCC_VER" == "4.8" && ( "$TRAVIS_BRANCH" == "master" || "$TRAVIS_BRANCH" == "beta" || "$TRAVIS_BRANCH" == "stable" ) ]]; then
export PX4_S3_DEPLOY=1;
fi
deploy:
provider: releases
api_key:
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
file: "Firmware.zip"
skip_cleanup: true
on:
tags: true
all_branches: true
repo: PX4/Firmware
condition: $GCC_VER = 4.8
# deploy *.px4 to S3 px4-travis/Firmware/$TRAVIS_BRANCH
- provider: s3
access_key_id: $PX4_AWS_KEY
secret_access_key:
secure: $PX4_AWS_SECRET
bucket: px4-travis
local_dir: s3deploy-branch
upload-dir: Firmware/$TRAVIS_BRANCH
acl: public_read
skip_cleanup: true
on:
all_branches: true
condition: $PX4_S3_DEPLOY = 1
# deploy Firmware.zip to S3 px4-travis/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID
- provider: s3
access_key_id: $PX4_AWS_KEY
secret_access_key:
secure: $PX4_AWS_SECRET
bucket: px4-travis
local_dir: s3deploy-archive
upload-dir: archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID
acl: public_read
skip_cleanup: true
on:
all_branches: true
condition: $PX4_S3_DEPLOY = 1
# on tags deploy Firmware.zip to Github releases
- provider: releases
api_key:
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
file: "Firmware.zip"
skip_cleanup: true
on:
tags: true
all_branches: true
repo: PX4/Firmware
condition: $GCC_VER = 4.8
notifications:
webhooks:
+73 -19
View File
@@ -121,6 +121,14 @@
# 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}")
execute_process(
COMMAND Tools/check_submodules.sh
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
# Use clang
#SET (CMAKE_C_COMPILER /usr/bin/clang-3.6)
#SET (CMAKE_CXX_COMPILER /usr/bin/clang++-3.6)
@@ -132,7 +140,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 +160,22 @@ 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)
# Add support for external project building
include(ExternalProject)
# 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})
@@ -188,6 +206,9 @@ if(DEFINED config_df_driver_list)
message("DF Drivers: ${config_df_driver_list}")
endif()
# force static lib build
set(BUILD_SHARED_LIBS OFF)
#=============================================================================
# project definition
#
@@ -202,14 +223,28 @@ 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")
#=============================================================================
# programs
# find programs and packages
#
# see if catkin was invoked to build this
if (CATKIN_DEVEL_PREFIX)
message(STATUS "catkin ENABLED")
find_package(catkin REQUIRED)
if (catkin_FOUND)
catkin_package()
else()
message(FATAL_ERROR "catkin not found")
endif()
else()
message(STATUS "catkin DISABLED")
endif()
find_package(PythonInterp REQUIRED)
#=============================================================================
@@ -217,6 +252,11 @@ find_package(PythonInterp REQUIRED)
#
enable_testing()
#=============================================================================
# generate compile command database
#
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#=============================================================================
# check required toolchain variables
#
@@ -235,7 +275,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 +286,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 +296,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 +350,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 +379,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 +404,33 @@ 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")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
set(CPACK_SET_DESTDIR "OFF")
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
find_program(DPKG_PROGRAM dpkg)
if (EXISTS ${DPKG_PROGRAM})
list (APPEND CPACK_GENERATOR "DEB")
endif()
endif()
include(CPack)
endif() # ros alternative endif
# vim: set noet fenc=utf-8 ff=unix ft=cmake :
+2 -2
View File
@@ -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
+12
View File
@@ -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
}
+12
View File
@@ -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
}
+76 -47
View File
@@ -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)
@@ -50,11 +50,11 @@ ifneq ($(CMAKE_VER),0)
$(warning sudo apt-get install cmake)
$(warning )
$(warning Official website:)
$(warning wget https://cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.sh)
$(warning chmod +x cmake-3.3.2-Linux-x86_64.sh)
$(warning sudo mkdir /opt/cmake-3.3.2)
$(warning sudo ./cmake-3.3.2-Linux-x86_64.sh --prefix=/opt/cmake-3.3.2 --exclude-subdir)
$(warning export PATH=/opt/cmake-3.3.2/bin:$$PATH)
$(warning wget https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.sh)
$(warning chmod +x cmake-3.4.3-Linux-x86_64.sh)
$(warning sudo mkdir /opt/cmake-3.4.3)
$(warning sudo ./cmake-3.4.3-Linux-x86_64.sh --prefix=/opt/cmake-3.4.3 --exclude-subdir)
$(warning export PATH=/opt/cmake-3.4.3/bin:$$PATH)
$(warning )
$(error Fatal)
endif
@@ -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,30 @@ 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
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# Functions
# --------------------------------------------------------------------
# describe how to build a cmake config
define cmake-build
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(PWD)/build_$@); fi
+@Tools/check_submodules.sh
+@(echo "PX4 CONFIG: $@" && cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
+@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(BUILD_DIR_SUFFIX))
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(BUILD_DIR)); fi
+@(echo "PX4 CONFIG: $(BUILD_DIR)" && cd $(BUILD_DIR) && $(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))
+@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(BUILD_DIR_SUFFIX))
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake $(2) -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(BUILD_DIR)); fi
+@(cd $(BUILD_DIR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
endef
# create empty targets to avoid msgs for targets passed to cmake
@@ -137,12 +147,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,16 +168,16 @@ px4fmu-v4_default:
px4-stm32f4discovery_default:
$(call cmake-build,nuttx_px4-stm32f4discovery_default)
px4fmu-v2_ekf2:
$(call cmake-build,nuttx_px4fmu-v2_ekf2)
mindpx-v2_default:
$(call cmake-build,nuttx_mindpx-v2_default)
posix_sitl_default:
$(call cmake-build,$@)
posix_sitl_test:
posix_sitl_lpe:
$(call cmake-build,$@)
posix_sitl_ekf2:
$(call cmake-build,$@)
posix_sitl_replay:
@@ -186,10 +202,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,$@)
@@ -199,10 +215,10 @@ 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:
@@ -223,14 +239,8 @@ run_sitl_ros: sitl_deprecation
# Other targets
# --------------------------------------------------------------------
.PHONY: gazebo_build uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
.NOTPARALLEL: gazebo_build uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
gazebo_build:
@mkdir -p build_gazebo
@if [ ! -e $(PWD)/build_gazebo/CMakeCache.txt ];then cd build_gazebo && cmake -Wno-dev -G$(PX4_CMAKE_GENERATOR) $(PWD)/Tools/sitl_gazebo; fi
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS)
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS) sdf
.PHONY: uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
.NOTPARALLEL: uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
uavcan_firmware:
ifeq ($(VECTORCONTROL),1)
@@ -241,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: \
@@ -251,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_,,$@))
@@ -286,15 +303,27 @@ ifeq ($(VECTORCONTROL),1)
@rm -rf ROMFS/px4fmu_common/uavcan
endif
unittest: posix_sitl_test
@export CC=clang
@export CXX=clang++
@export ASAN_OPTIONS=symbolize=1
unittest: posix_sitl_default
$(call cmake-build-other,unittest, ../unittests)
@(cd build_unittest && ctest -j2 --output-on-failure)
test_onboard_sitl:
@HEADLESS=1 make posix_sitl_test gazebo_iris
run_tests_posix: posix_sitl_default
@(cd build_posix_sitl_default/ && ctest -V)
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
package_firmware:
@zip --junk-paths Firmware.zip `find . -name \*.px4`
@@ -312,10 +341,10 @@ 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_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol gazebo_plane gazebo_solo gazebo_typhoon_h480
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
.PHONY: clean
+1 -1
Submodule NuttX updated: f0f4bdc872...93df871201
+1 -1
View File
@@ -1,6 +1,6 @@
## PX4 Pro Drone Autopilot ##
[![Build Status](https://travis-ci.org/PX4/Firmware.svg?branch=master)](https://travis-ci.org/PX4/Firmware) [![Coverity Scan](https://scan.coverity.com/projects/3966/badge.svg?flat=1)](https://scan.coverity.com/projects/3966?tab=overview)
[![Releases](https://img.shields.io/github/release/PX4/Firmware.svg)](https://github.com/PX4/Firmware/releases) [![DOI](https://zenodo.org/badge/22634/PX4/Firmware.svg)](https://zenodo.org/badge/latestdoi/22634/PX4/Firmware) [![Build Status](https://travis-ci.org/PX4/Firmware.svg?branch=master)](https://travis-ci.org/PX4/Firmware) [![Coverity Scan](https://scan.coverity.com/projects/3966/badge.svg?flat=1)](https://scan.coverity.com/projects/3966?tab=overview)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PX4/Firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+1 -8
View File
@@ -7,7 +7,7 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.mc_defaults
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
@@ -21,10 +21,3 @@ then
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 4
fi
set MIXER quad_x
set PWM_OUT 1234
set PWM_MIN 1100
set PWM_MAX 1950
@@ -15,22 +15,28 @@ then
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set MC_ROLL_P 7.0
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_I 0.01
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.12
param set MC_PITCHRATE_I 0.002
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.01
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 2.8
param set MC_YAW_P 3.5
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_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_MAX 20
param set MC_YAWRAUTO_MAX 20
param set MPC_XY_P 0.8
param set MPC_XY_VEL_P 0.1
param set MPC_ACC_HOR_MAX 2.0
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
+36
View File
@@ -0,0 +1,36 @@
#!nsh
#
# @name CruiseAder Claire
#
# @type VTOL Tiltrotor
#
# @maintainer Samay Siga <samay_s@icloud.com>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_TYPE 1
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 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 1
fi
set MIXER claire
set PWM_OUT 1234
set PWM_RATE 400
set PWM_MAX 2000
set MIXER_AUX claire
set PWM_AUX_RATE 50
set PWM_AUX_RATE 123
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
set PWM_AUX_DISARMED 1000
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
+27 -14
View File
@@ -11,31 +11,44 @@ sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
then
param set FW_AIRSPD_MAX 20
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 16
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 16
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 12.5
param set FW_AIRSPD_TRIM 16.5
param set LNDFW_AIRSPD_MAX 6
param set LNDFW_VELI_MAX 4
param set LNDFW_VEL_XY_MAX 3
param set LNDFW_VEL_Z_MAX 5
param set FW_R_TC 0.4
param set FW_P_TC 0.4
param set FW_THR_CRUISE 0.55
param set FW_L1_DAMPING 0.75
param set FW_L1_PERIOD 15
param set FW_LND_ANG 15
param set FW_LND_FLALT 5
param set FW_LND_FLALT 8
param set FW_LND_HHDIST 15
param set FW_LND_HVIRT 13
param set FW_LND_TLALT 5
param set FW_LND_TLALT 10
param set FW_THR_LND_MAX 0
param set FW_PR_FF 0.35
param set FW_P_LIM_MAX 20
param set FW_P_LIM_MIN -30
param set FW_R_LIM 45
param set FW_PR_FF 0.45
param set FW_PR_IMAX 0.4
param set FW_PR_P 0.08
param set FW_RR_FF 0.6
param set FW_PR_P 0.005
param set FW_RR_FF 0.45
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.04
param set FW_RR_P 0.013
param set FW_P_RMAX_NEG 70
param set FW_P_RMAX_POS 70
param set FW_R_RMAX 70
param set SYS_COMPANION 157600
param set PWM_MAIN_REV0 1
param set PWM_MAIN_REV1 1
param set PWM_MAIN_REV2 1
param set PWM_DISARMED 0
param set PWM_MIN 900
param set PWM_MAX 2100
param set MIS_TAKEOFF_ALT 50
param set NAV_LOITER_RAD 30
fi
set PWM_DISARMED p:PWM_DISARMED
+34
View File
@@ -0,0 +1,34 @@
#!nsh
#
# @name Lumenier QAV-R (raceblade) 5" arms
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer James Goppert <james.goppert@gmail.com>
#
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 8.0
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 8.0
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.003
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.15
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set PWM_MIN 1075
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
fi
+1 -1
View File
@@ -29,7 +29,7 @@ then
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.8
param set BAT_V_SCALING 0.00838095238
param set BAT_V_DIV 34.32838
fi
set OUTPUT_MODE ardrone
+2
View File
@@ -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
+1 -1
View File
@@ -79,7 +79,7 @@ then
param set RC5_TRIM 1500
fi
set MIXER solo
set MIXER quad_x
set PWM_OUT 1234
set MIXER_AUX none
+5 -2
View File
@@ -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
+1 -1
View File
@@ -6,7 +6,7 @@
#
# Start the attitude and position estimator
#
ekf_att_pos_estimator start
ekf2 start
#
# Start attitude controller
+6 -1
View File
@@ -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
+2 -12
View File
@@ -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
+21 -1
View File
@@ -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
-29
View File
@@ -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
-9
View File
@@ -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
+20 -4
View File
@@ -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
#
@@ -530,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
@@ -583,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
@@ -638,7 +654,7 @@ then
then
fi
else
if logger start -b 12
if logger start -b 12 -t
then
fi
fi
Binary file not shown.
+38
View File
@@ -0,0 +1,38 @@
# mixer for the CruiseAder Claire tilt mechansim servo, aileron and elevator
=======================================================================
Tilt mechanism servo mixer
---------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 10000 10000 0 -10000 10000
Aileron mixers
-------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
Elevator mixers
-------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 -10000 -10000 0 -10000 10000
@@ -0,0 +1,7 @@
# CruiseAder Claire Main Multirotor mixer for PX4FMU
#
#===========================
R: 4x 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
@@ -1,26 +0,0 @@
Mixer for SITL plane, using the VTOL airframe for now
=========================================================
Z:
Z:
Z:
Z:
# mixer for the elevons
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 5000 5000 0 -10000 10000
S: 0 1 -5000 -5000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 5000 5000 0 -10000 10000
S: 0 1 5000 5000 0 -10000 10000
# mixer for the pusher/puller throttle
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
@@ -1,18 +0,0 @@
Multirotor mixer for PX4FMU
===========================
This file defines a single mixer for a quadrotor in the V configuration. All controls
are mixed 100%.
R: 4v 10000 10000 10000 0
Gimbal / payload mixer for last two channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 3 6 10000 10000 0 -10000 10000
@@ -6,13 +6,21 @@ are mixed 100%.
R: 4x 10000 10000 10000 0
#mixer for the elevons
Z:
# left elevon
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 5000 5000 0 -10000 10000
# right elevon
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 -5000 -5000 0 -10000 10000
# mixer for the virtual elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
-7
View File
@@ -1,7 +0,0 @@
Multirotor mixer for PX4FMU
===========================
This file defines a single mixer for a quadrotor in the X configuration. All controls
are mixed 100%.
R: 4x 10000 10000 10000 0
@@ -19,13 +19,13 @@ input is inverted between the two servos.
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 -6000 -6000 0 -10000 10000
S: 1 1 6500 6500 0 -10000 10000
S: 1 0 -8000 -8000 0 -10000 10000
S: 1 1 8000 8000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 -6000 -6000 0 -10000 10000
S: 1 1 -6500 -6500 0 -10000 10000
S: 1 0 -8000 -8000 0 -10000 10000
S: 1 1 -8000 -8000 0 -10000 10000
Motor speed mixer
-----------------
+1 -1
View File
@@ -190,7 +190,7 @@ else
fi
fi
if sf10a start
if sf1xx start
then
fi
+2 -67
View File
@@ -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
+36
View File
@@ -0,0 +1,36 @@
Mixer for SITL plane
=========================================================
Z:
Z:
# mixer for the rudder
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
# mixer for the flaps
M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
# mixer for the pusher/puller throttle
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
# mixer for the left aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 0 0 -10000 -10000 0 -10000 10000
# mixer for the right aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
# mixer for the elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
@@ -1,24 +1,26 @@
Mixer for standard vtol plane (SITL) with motor x configuration
=========================================================
This file defines a single mixer for a standard vtol plane (SITL gazebo) with motors in X configuration.
The plane has two ailerons and one elevator. The ailerons and elevator are treated as elevons
in order to make the standard vtol simulation compatible with the tailsitter simulation.
This file defines a single mixer for a standard vtol plane (SITL gazebo) with motors in X configuration. The plane has two ailerons and one elevator.
R: 4x 10000 10000 10000 0
# mixer for the elevons
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 -5000 -5000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 5000 5000 0 -10000 10000
# mixer for the pusher/puller throttle
M: 1
O: 10000 10000 0 -10000 10000
S: 1 3 0 20000 -10000 -10000 10000
# mixer for the left aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
# mixer for the right aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
# mixer for the elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
+21
View File
@@ -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
+25
View File
@@ -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
+20
View File
@@ -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
+28
View File
@@ -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
+83
View File
@@ -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
+17
View File
@@ -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
+38
View File
@@ -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
+28
View File
@@ -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
+24
View File
@@ -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
+49
View File
@@ -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
+347
View File
@@ -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
+105
View File
@@ -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.
+3
View File
@@ -0,0 +1,3 @@
# Hexa X
R: 6x 10000 10000 10000 0
+7
View File
@@ -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
-9
View File
@@ -1,9 +0,0 @@
QGC WPL 110
0 1 0 16 0 0 0 0 47.3979949951 8.54559612274 25.0 1
1 0 2 3000 4.0 0.0 0.0 0.0 47.3980331421 8.54578971863 25.0 1
2 0 3 16 0.0 0.0 -0.0 0.0 47.399269104 8.54557228088 25.0 1
3 0 3 16 0.0 0.0 -0.0 0.0 47.3992652893 8.54230213165 25.0 1
4 0 3 16 0.0 0.0 -0.0 0.0 47.3974761963 8.54239082336 25.0 1
5 0 3 16 0.0 0.0 -0.0 0.0 47.3976669312 8.54509449005 25.0 1
6 0 2 3000 3.0 0.0 0.0 0.0 47.3977851868 8.54526233673 25.0 1
7 0 3 21 25.0 0.0 -0.0 0.0 47.3979797363 8.54460906982 25.0 1
+8 -1
View File
@@ -1,6 +1,12 @@
#!/bin/bash
ip=192.168.42.1
if [ -z ${BEBOP_IP+x} ]; then
ip=192.168.42.1
echo "\$BEBOP_IP is not set (use default: $ip)"
else
ip=$BEBOP_IP
echo "\$BEBOP_IP is set to $ip"
fi
port=9050
echo "Connecting to bebop: $ip:$port"
@@ -25,6 +31,7 @@ echo "Connection successfully established"
sleep 1
adb shell mount -o remount,rw /
adb shell touch /home/root/parameters
../Tools/adb_upload.sh $@
+15 -2
View File
@@ -9,8 +9,21 @@ then
${DIR}/fix_code_style.sh --dry-run $file | grep --quiet Formatted
if [[ $? -eq 0 ]]
then
echo $file 'bad formatting, please run "./Tools/fix_code_style.sh' $file'"'
exit 1
${DIR}/fix_code_style.sh --quiet < $file > $file.pretty
echo
git --no-pager diff --no-index --minimal --histogram --color=always $file $file.pretty
echo
rm -f $file.pretty
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
+20 -37
View File
@@ -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' \
+54
View File
@@ -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
+6 -6
View File
@@ -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()
-1
View File
@@ -115,7 +115,6 @@ print("""
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#ifndef PRIu64
+206
View File
@@ -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()
+2
View File
@@ -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"):
+46 -2
View File
@@ -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):
+8
View File
@@ -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)
+5
View File
@@ -68,6 +68,11 @@ def main():
os.remove(file_path)
continue
# delete documentation
if file.startswith("README"):
os.remove(file_path)
continue
# only prune text files
if ".zip" in file or ".bin" in file or ".swp" in file \
or ".data" in file or ".DS_Store" in file:
+9 -1
View File
@@ -5,6 +5,14 @@ if [[ "$#" < 2 ]]; then
exit
fi
if [ -z ${AUTOPILOT_HOST+x} ]; then
host=px4autopilot
echo "\$AUTOPILOT_HOST is not set (use default: $host)"
else
host=$AUTOPILOT_HOST
echo "\$AUTOPILOT_HOST is set to $host"
fi
echo "Uploading..."
# Get last argument
@@ -19,6 +27,6 @@ do
fi
# echo "Pushing $arg to $last"
#adb push $arg $last
scp $arg pi@px4autopilot:$last
scp $arg pi@$host:$last
((i+=1))
done
@@ -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.
+404
View File
@@ -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()
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
#
# Setup environment to make PX4 visible to Gazebo.
#
# Note, this is not necessary if using a ROS catkin workspace with the px4
# package as the paths are exported.
#
# License: according to LICENSE.md in the root directory of the PX4 Firmware repository
if [ "$#" != 2 ]
then
echo usage: source setup_gazebo.bash src_dir build_dir
echo ""
return 1
fi
SRC_DIR=$1
BUILD_DIR=$2
# setup Gazebo env and update package path
export GAZEBO_PLUGIN_PATH=${BUILD_DIR}/build_gazebo:${GAZEBO_PLUGIN_PATH}
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:${SRC_DIR}/Tools/sitl_gazebo/models
# Disabling the remote model download seems only necessary with Gazebo 6
#export GAZEBO_MODEL_DATABASE_URI=""
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SRC_DIR}/Tools/sitl_gazebo/Build/msgs/:${BUILD_DIR}/build_gazebo
echo -e "GAZEBO_PLUGIN_PATH $GAZEBO_PLUGIN_PATH"
echo -e "GAZEBO_MODEL_PATH $GAZEBO_MODEL_PATH"
echo -e "LD_LIBRARY_PATH $LD_LIBRARY_PATH"
+2 -2
View File
@@ -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 ../
+39 -37
View File
@@ -1,22 +1,29 @@
#!/bin/bash
rc_script=$1
debugger=$2
program=$3
model=$4
build_path=$5
curr_dir=`pwd`
set -e
echo args: $@
sitl_bin=$1
label=$2
debugger=$3
program=$4
model=$5
src_path=$6
build_path=$7
echo SITL ARGS
echo rc_script: $rc_script
echo sitl_bin: $sitl_bin
echo label: $label
echo debugger: $debugger
echo program: $program
echo model: $model
echo src_path: $src_path
echo build_path: $build_path
mkdir -p $build_path/src/firmware/posix/rootfs/fs/microsd
mkdir -p $build_path/src/firmware/posix/rootfs/eeprom
touch $build_path/src/firmware/posix/rootfs/eeprom/parameters
working_dir=`pwd`
sitl_bin=$build_path/src/firmware/posix/px4
if [ "$chroot" == "1" ]
then
@@ -35,32 +42,29 @@ fi
if [ "$#" -lt 5 ]
then
echo usage: sitl_run.sh rc_script debugger program model build_path
echo usage: sitl_run.sh rc_script debugger program model devel_path
echo ""
exit 1
fi
# kill process names that might stil
# be running from last time
pkill gazebo
pkill mainapp
jmavsim_pid=`jps | grep Simulator | cut -d" " -f1`
pgrep gazebo && pkill gazebo
pgrep px4 && pkill px4
jmavsim_pid=`ps aux | grep java | grep Simulator | cut -d" " -f1`
if [ -n "$jmavsim_pid" ]
then
kill $jmavsim_pid
fi
set -e
cd $build_path/..
cp Tools/posix_lldbinit $build_path/src/firmware/posix/.lldbinit
cp Tools/posix.gdbinit $build_path/src/firmware/posix/.gdbinit
cp $src_path/Tools/posix_lldbinit $working_dir/.lldbinit
cp $src_path/Tools/posix.gdbinit $working_dir/.gdbinit
SIM_PID=0
if [ "$program" == "jmavsim" ] && [ ! -n "$no_sim" ]
then
cd Tools/jMAVSim
cd $src_path/Tools/jMAVSim
ant create_run_jar copy_res
cd out/production
java -Djava.ext.dirs= -jar jmavsim_run.jar -udp 127.0.0.1:14560 &
@@ -71,15 +75,9 @@ then
if [ -x "$(command -v gazebo)" ]
then
# Set the plugin path so Gazebo finds our model and sim
export GAZEBO_PLUGIN_PATH=$curr_dir/build_gazebo:${GAZEBO_PLUGIN_PATH}
# Set the model path so Gazebo finds the airframes
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:$curr_dir/Tools/sitl_gazebo/models
# The next line would disable online model lookup, can be commented in, in case of unstable behaviour.
# export GAZEBO_MODEL_DATABASE_URI=""
export SITL_GAZEBO_PATH=$curr_dir/Tools/sitl_gazebo
make --no-print-directory gazebo_build
source $src_path/Tools/setup_gazebo.bash ${src_path} ${build_path}
gzserver --verbose $curr_dir/Tools/sitl_gazebo/worlds/${model}.world &
gzserver --verbose ${src_path}/Tools/sitl_gazebo/worlds/${model}.world &
SIM_PID=`echo $!`
if [[ -n "$HEADLESS" ]]; then
@@ -98,37 +96,41 @@ then
# This is not a simulator, but a log file to replay
# Check if we need to creat a param file to allow user to change parameters
if ! [ -f "${build_path}/src/firmware/posix/rootfs/replay_params.txt" ]
if ! [ -f "$rootfs/replay_params.txt" ]
then
touch ${build_path}/src/firmware/posix/rootfs/replay_params.txt
touch $rootfs/replay_params.txt
fi
fi
cd $build_path/src/firmware/posix
cd $working_dir
if [ "$logfile" != "" ]
then
cp $logfile rootfs/replay.px4log
cp $logfile $rootfs/replay.px4log
fi
# Do not exit on failure now from here on because we want the complete cleanup
set +e
sitl_command="$sudo_enabled $sitl_bin $chroot_enabled $src_path $src_path/${label}/${model}"
echo SITL COMMAND: $sitl_command
# Start Java simulator
if [ "$debugger" == "lldb" ]
then
lldb -- mainapp ../../../../${rc_script}_${program}_${model}
lldb -- $sitl_command
elif [ "$debugger" == "gdb" ]
then
gdb --args mainapp ../../../../${rc_script}_${program}_${model}
gdb --args $sitl_command
elif [ "$debugger" == "ddd" ]
then
ddd --debugger gdb --args mainapp ../../../../${rc_script}_${program}_${model}
ddd --debugger gdb --args $sitl_command
elif [ "$debugger" == "valgrind" ]
then
valgrind ./mainapp ../../../../${rc_script}_${program}_${model}
valgrind $sitl_command
else
$sudo_enabled ./mainapp $chroot_enabled ../../../../${rc_script}_${program}_${model}
$sitl_command
fi
if [ "$program" == "jmavsim" ]
+2 -2
View File
@@ -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
+20
View File
@@ -0,0 +1,20 @@
machine:
services:
- docker
checkout:
post:
- git submodule sync --recursive
- git submodule update --init --recursive
## Customize dependencies
dependencies:
cache_directories:
- "~/.ccache"
pre:
- docker pull px4io/px4-dev-nuttx-gcc4.9
test:
override:
- docker run --rm -v `pwd`:`pwd`:rw -w=`pwd` -v $HOME/.ccache:$HOME/.ccache:rw -e CCACHE_DIR=$HOME/.ccache --user=$UID -it px4io/px4-dev-nuttx-gcc4.9 /bin/bash -c "ccache -z; make px4fmu-v4_default; ccache -s"
+48 -45
View File
@@ -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
@@ -659,6 +660,7 @@ function(px4_add_common_flags)
endif()
if ($ENV{MEMORY_DEBUG} MATCHES "1")
message(STATUS "address sanitizer enabled")
set(max_optimization -Os)
set(optimization_flags
@@ -759,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
@@ -786,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.*")))
@@ -855,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()
#=============================================================================
@@ -894,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}
)
@@ -941,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)
@@ -972,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)
+128
View File
@@ -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")
+16 -4
View File
@@ -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
#
+3 -5
View File
@@ -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
#
+25 -12
View File
@@ -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,20 +53,33 @@ 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
#
@@ -81,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
@@ -100,7 +113,7 @@ set(config_module_list
#
# Logging
#
modules/logger
#modules/logger
modules/sdlog2
#
+15 -14
View File
@@ -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)
@@ -48,37 +48,39 @@ set(config_module_list
#drivers/bst
#drivers/snapdragon_rc_pwm
#drivers/lis3mdl
#drivers/bmi160
#
# 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/sd_bench
systemcmds/top
systemcmds/config
systemcmds/nshterm
systemcmds/mtd
systemcmds/dumpfile
#systemcmds/topic_listener
systemcmds/ver
systemcmds/sd_bench
systemcmds/tests
#
# 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
@@ -87,22 +89,21 @@ set(config_module_list
modules/load_mon
modules/navigator
modules/mavlink
modules/gpio_led
#modules/gpio_led
modules/uavcan
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
#
# modules/segway # XXX Needs GCC 4.7 fix
modules/fw_pos_control_l1
modules/fw_att_control
modules/mc_att_control
+18 -2
View File
@@ -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,6 +23,7 @@ set(config_module_list
drivers/mb12xx
drivers/srf02
drivers/sf0x
drivers/sf1xx
drivers/ll40ls
drivers/trone
drivers/gps
@@ -48,6 +49,7 @@ set(config_module_list
drivers/bmp280
drivers/bma180
drivers/bmi160
drivers/tap_esc
#
# System commands
@@ -67,6 +69,18 @@ set(config_module_list
systemcmds/dumpfile
systemcmds/ver
systemcmds/sd_bench
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
#
@@ -84,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
@@ -169,6 +182,9 @@ set(config_module_list
# Hardware test
#examples/hwtest
# EKF
examples/ekf_att_pos_estimator
)
set(config_extra_builtin_cmds
@@ -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,38 +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
#
# System commands
@@ -55,15 +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/topic_listener
#
# General system control
@@ -72,8 +49,6 @@ set(config_module_list
modules/load_mon
modules/navigator
modules/mavlink
modules/gpio_led
modules/uavcan
modules/land_detector
#
@@ -84,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
@@ -94,7 +68,6 @@ set(config_module_list
#
# Logging
#
modules/sdlog2
modules/logger
#
@@ -122,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
@@ -168,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
@@ -182,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")
+15 -7
View File
@@ -1,9 +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
@@ -13,13 +15,16 @@ set(CMAKE_PROGRAM_PATH
set(config_module_list
examples/px4_simple_app
# examples/px4_simple_app
#
# Board support modules
#
drivers/device
modules/sensors
platforms/posix/drivers/df_ms5607_wrapper
platforms/posix/drivers/df_mpu6050_wrapper
platforms/posix/drivers/df_ak8963_wrapper
#
# System commands
@@ -32,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
@@ -47,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
#
@@ -56,7 +59,6 @@ set(config_module_list
modules/sdlog2
modules/logger
modules/commander
modules/load_mon
modules/param
modules/systemlib
modules/systemlib/mixer
@@ -94,3 +96,9 @@ set(config_module_list
platforms/posix/px4_layer
platforms/posix/work_queue
)
set(config_df_driver_list
ms5607
mpu6050
ak8963
)
+2 -2
View File
@@ -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")
+2 -3
View File
@@ -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
+2 -2
View File
@@ -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)
-50
View File
@@ -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,17 +1,15 @@
# 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
#
@@ -20,7 +18,8 @@ set(config_module_list
drivers/device
modules/sensors
platforms/posix/drivers/df_mpu9250_wrapper
platforms/posix/drivers/df_bmp280_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
@@ -32,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
@@ -51,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
#
@@ -60,7 +58,6 @@ set(config_module_list
modules/sdlog2
modules/logger
modules/commander
modules/load_mon
modules/param
modules/systemlib
modules/systemlib/mixer
@@ -73,6 +70,11 @@ set(config_module_list
#
# PX4 drivers
#
drivers/gps
drivers/navio_sysfs_rc_in
drivers/navio_sysfs_pwm_out
drivers/navio_gpio
drivers/navio_rgbled
#
# Libraries
@@ -97,13 +99,16 @@ set(config_module_list
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
)
)
#
# DriverFramework driver
#
set(config_df_driver_list
mpu9250
bmp280
lsm9ds1
ms5611
hmc5883
trone
isl29501
)
)
+13
View File
@@ -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}
)
+3
View File
@@ -0,0 +1,3 @@
include(configs/posix_rpi_common)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
+6 -5
View File
@@ -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
+5 -5
View File
@@ -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
@@ -72,8 +72,8 @@ set(config_extra_builtin_cmds
sercon
)
set(config_sitl_rcS
posix-configs/SITL/init/rcS
set(config_sitl_rcS_dir
posix-configs/SITL/init/
CACHE FILEPATH "init script for sitl"
)

Some files were not shown because too many files have changed in this diff Show More