Compare commits

...

788 Commits

Author SHA1 Message Date
Daniel Agar e63f9d9bf6 mathlib Limits move radians/degrees to header (#9102) 2018-03-19 12:45:42 -04:00
Alessandro Simovic cd250831d5 commander: removed duplicated startup tune
Addressing review comments in PR #9096
2018-03-19 14:15:52 +01:00
Martina be275b880b tunes: add fallthrough macro 2018-03-19 14:15:52 +01:00
Simone Guscetti ee0ae079ff tests: test_hrt modernize NULL with nullptr 2018-03-19 14:15:52 +01:00
Simone Guscetti 879c698cab libtunes: Change TuneID::ERROR in ERROR_TUNE
This prevents the expanction of the ERROR macro inside the TuneID enum
2018-03-19 14:15:52 +01:00
Simone Guscetti 79dacdda2c tune_control: update comment 2018-03-19 14:15:52 +01:00
Simone Guscetti e140c37fe3 systemcmds: tests update to cpp file for test_hrc 2018-03-19 14:15:52 +01:00
Simone Guscetti 50d35f63be tune_control: Remove the tune defines 2018-03-19 14:15:52 +01:00
Simone Guscetti ce952d8f64 drv_tone_alarm: Add tune definition 2018-03-19 14:15:52 +01:00
Simone Guscetti 4c6daf0748 libtunes: Update tunes and mkblctrl to use the tune_definition 2018-03-19 14:15:52 +01:00
Simone Guscetti 26b721ac8b libtunes: Add new tune_definition file 2018-03-19 14:15:52 +01:00
Simone Guscetti 20905ce478 stm32: board_reset, keep legacy definition for old chips 2018-03-19 09:46:58 +01:00
Simone Guscetti 217a67f956 px4_micro_hal: Add up_internal for stm32f7 builds
This is included in other stm32 architectures in the stm32.h file.
2018-03-19 09:46:58 +01:00
Simone Guscetti 2b81331f8a stm32: board_reset, change backup register
Change to be coherent with the change on NuttX upstream, in the future
STM32_BKP_BASE will be removed. This is using the definition over stm32_rtc.h interface.
2018-03-19 09:46:58 +01:00
Beat Küng 76aa044105 navigator mission: add yaw offset to vehicle's yaw for ROI cmds and disabled gimbal yaw 2018-03-19 09:42:41 +01:00
Beat Küng 09dba29b6c fix vehicle_roi.msg: re-add ROI_WPINDEX
The indexes are directly mapped from MAVLink, thus the actual value is
important.
2018-03-19 09:42:41 +01:00
Beat Küng a0372c6183 vmount: implement VEHICLE_CMD_DO_SET_ROI_WPNEXT_OFFSET 2018-03-19 09:42:41 +01:00
Beat Küng cc777a80ff vehicle_roi.msg: remove unsupported fields 2018-03-19 09:42:41 +01:00
Beat Küng aaa67632ca navigator: remove redundant switch block for ROI handling 2018-03-19 09:42:41 +01:00
Shivam Chauhan 062e44061d bmp280 changed variable name to resolve shadow declaration issue. (#9100) 2018-03-18 11:29:27 -04:00
Thomas Stastny 52e5e0df14 fw_att_control: schedule trims for airspeed and flap deployment (#8937) 2018-03-16 16:55:44 -04:00
ksschwabe 6d445cf5a6 Adds ability for generate_listener.py to process out-of-tree uORB message definitions as well (#9097) 2018-03-16 12:44:25 -04:00
barzanisar 34dd68bee1 Update syslink_main.cpp 2018-03-16 14:56:40 +01:00
barzanisar a6e35ab7f7 Beat's changes to make QGC connect with crazyflie 2018-03-16 14:56:40 +01:00
barzanisar 691a5c6532 Beat's changes in syslink work so reverting this
No need for this since beat's changes in syslink_main.cpp work for connecting crazyflie to QGC. 
Will open a separate PR for it.
2018-03-16 14:13:21 +01:00
barzanisar 0f79222ff9 This makes QGC connect with crazyflie
Discussed in https://github.com/PX4/Firmware/issues/8924
2018-03-16 09:31:58 +01:00
AlexKlimaj 08a53a9056 batt_smbus add complementary filter and small fixes (#9080)
* Batt_smbus. Added complementary filter to remaining capacity, reversed warning state checks, and added remaining/discharged out of range checks to handle bad battery calibrations

* Changed errx to PX4_ERR

* Added PX4_ERR returns
2018-03-15 14:46:27 -04:00
Kabir Mohammed 7776789b7d rc.sensors : fix startup for lidars on Pixhawk boards (#9058) 2018-03-15 13:26:35 -04:00
Amir Melzer f68f897820 update submodule to include changes in the ASLUAV BMS message (#9083) 2018-03-15 13:13:07 -04:00
Matthias Grob ed0b6db2de mc_att_control: clarify comment about yaw feed forward 2018-03-15 17:57:46 +01:00
Matthias Grob ff25c7f48a ensure attitude setpoint initialization before arming
- On initialization _v_att_sp got filled with zeros
  leaving invalid quaternions
- While not armed mc_pos_control did not publish any
  attitude setpoint which makes no sense
- The attitude control just uses the data in _v_att_sp
  if it was (ever) updated or not
2018-03-15 17:16:14 +01:00
Matthias Grob e32b04fff1 mc_att_control: catch numerical out of domain case
While operating on exactly normalized float quaternions
it can aparently still happen that one of the elements
gets just slightly above 1 or below -1 and hence out of
the domain of the acosf and asinf functions resulting in
NaN. The constrain function uses stricly smaller/bigger
comparisons and catches all tested cases.
2018-03-15 17:16:14 +01:00
Matthias Grob 42f4e62a04 mc_att_control: clarify corner case comment 2018-03-15 17:16:14 +01:00
Matthias Grob 9f69447e22 mc_att_control: replace nasty corner case condition
I found a better solution for the condition of the numerical
corner case and also tried to comment it more clearly.
2018-03-15 17:16:14 +01:00
Matthias Grob d2ead02fb5 mc_att_control: catch numerical corner cases
- Delete left over identity matrix.

- Corner case with a zero element when using the signum function:
We always need a sign also for zero.

- Corner case with arbitrary yaw but and 180 degree roll or pitch:
Reduced attitude control calculation always rotates around roll
because there's no right choice when neglecting yaw. In that small
corner case it's better to just use full attitude contol and hence
rotate around the most efficient roll/pitch combination.
2018-03-15 17:16:14 +01:00
Matthias Grob dc28c47544 mc_att_control: correct head comment 2018-03-15 17:16:14 +01:00
Matthias Grob c4fb2b26fd mc_att_control: prepare yaw weight from gain ratio
According to the paper the quaternion controller is built on
the yaw weight represents the ratio between the roll/pitch and
the yaw attitude control time constant. It also states that as a
thumb rule a value of ~0.4 works alright for most multicopter
platforms. The default attitude gains of PX4 which were determined
independent of the paper from experimental results have a ratio of
2.8/6.5 = 0.43 which matches.
2018-03-15 17:16:14 +01:00
Matthias Grob 6317d36ec9 mc_att_control: remove time constant parameter
Because the parameter does not make sense from a control theory
perspective. Either you have a gain with the unit 1/s or an inverse
gain or time constant with the unit s. But the time constant parameter
was neither bound to any exact unit nor did it apply instead of a gain.
Rather it adjusted multiple gains from rate and attitude control
according to an arbitrary scale. This can only by accident lead to
good tuning.
2018-03-15 17:16:14 +01:00
Matthias Grob ba5f2254cd mc_att_control: add reduced quaternion attitude control
to prioritize yaw compared to roll and pitch by combining
the shortest rotation to achieve a total thrust vector with
the full attitude respecting the desired yaw
not by scaling down the control output with the gains
2018-03-15 17:16:14 +01:00
Matthias Grob 9ff9692270 mc_att_control: switch to quaternion attitude control (no yaw reduction yet) 2018-03-15 17:16:14 +01:00
Daniel Agar 1abf90c6d4 EKF2 only publish wind_estimate if wind velocity is being estimated
- refactor body wind velocity calculation
2018-03-15 07:18:58 +01:00
Daniel Agar 7607c71ca8 fw_pos_control_l1 project virtual waypoint to handle landing overshoot 2018-03-14 16:39:19 -04:00
Daniel Agar d1dca4e74c fw_pos_ctrl_l1 move takeoff to control_takeoff() 2018-03-14 16:39:19 -04:00
Daniel Agar c72340e039 fw_pos_ctrl_l1 move landing to control_landing() 2018-03-14 16:39:19 -04:00
Daniel Agar f194c5424c move hmc5883 i2c address into driver 2018-03-14 14:38:40 -04:00
Daniel Agar bb7466c596 move rgbled i2c address into driver 2018-03-14 14:38:40 -04:00
Karl Schwabe 2a5a7b3a1e Adds ability to have out-of-tree uORB message definitions
If the EXTERNAL_MODULES_LOCATION variable has been set, and the
EXTERNAL_MODULES_LOCATION/msg/ directory exists containing a
CMakeLists.txt file with the following format:
    set(config_msg_list_external
      message1.msg
      message2.msg
      message3.msg
      ...
      PARENT_SCOPE
      )
then the messages defined in config_msg_list_external are added to the
msg_files list in Firmware/msg/CMakeLists.txt and are used to generate uORB
message headers. The generate uORB message headers are generated in the same
location as the normal uORB message headers in the build directory, namely,
<build_dir>/uORB/topics. The uORB topic sources are generated in
<build_dir>/msg/topics_sources.
2018-03-14 10:01:43 +01:00
Daniel Agar dacec87d6b px4fmu-v3 add missing lsm303d and sort 2018-03-14 08:02:19 +01:00
Daniel Agar de85acb8b0 px4fmu-v2 version detection and init cleanup
- if an invalid version is detected reinit, then reset
2018-03-14 08:02:19 +01:00
Daniel Agar 24be68b27a eclipse project add paths for new params 2018-03-13 23:30:50 -05:00
Beat Küng 2bcc5cf3e5 imu filter defaults: set IMU_GYRO_CUTOFF to 80 and MC_DTERM_CUTOFF to 30
tested on at least 5 different vehicles, including AeroFC. The values
should be conservative, good setups (with low vibrations) can increase
these values even further.

increasing IMU_GYRO_CUTOFF allows for better tuning gains (increased P).
2018-03-13 20:54:49 +01:00
Beat Küng a99e49a856 landing_target_estimator: fix param type: int -> int32_t 2018-03-13 17:35:15 +01:00
Beat Küng 22acb1dab1 cmake configs: add landing_target_estimator wherever local_position_estimator is enabled
LTEST_MODE is defined in landing_target_estimator and required by
local_position_estimator.
2018-03-13 17:35:15 +01:00
Beat Küng 7ee464c264 LPE: refactor to use ModuleParams 2018-03-13 17:35:15 +01:00
Beat Küng 83d55773af LPE: refactor to use ModuleBase 2018-03-13 17:35:15 +01:00
Beat Küng 9fb9b2916a LPE: use default & delete keywords for constructors & destructors 2018-03-13 17:35:15 +01:00
Beat Küng f7ee3c2015 cmake configs: add vtol_att_control for required parameters VT_B_DEC_MSS & VT_B_REV_DEL
Required by Navigator.
2018-03-13 17:35:15 +01:00
Beat Küng 279b66bfbd ekf2: use new Param class
reduces RAM usage by 1.3KB
2018-03-13 17:35:15 +01:00
Beat Küng eb33145ac8 px4_param.h: add ParamExtFloat & ParamExtInt (required by ekf2) 2018-03-13 17:35:15 +01:00
Beat Küng 89a775b401 navigator: remove use of final to allow extending class hierarchy 2018-03-13 17:35:15 +01:00
Beat Küng 8a5cdac1f4 FixedwingPositionControl: fix ordering of PRINT_MODULE_USAGE_NAME 2018-03-13 17:35:15 +01:00
Beat Küng e0af2912a1 navigator: avoid use of a static variable last_geofence_check 2018-03-13 17:35:15 +01:00
Beat Küng 320bdc6482 navigator: refactor to use ModuleBase class 2018-03-13 17:35:15 +01:00
Beat Küng 246be4f0ab precland: use 'default' for destructor 2018-03-13 17:35:15 +01:00
Beat Küng 2e6904b8a4 navigator: use '#pragma once' as include guard 2018-03-13 17:35:15 +01:00
Beat Küng f2dddc65a5 navigator: use new Param class 2018-03-13 17:35:15 +01:00
Beat Küng 32eaf278ad Battery: remove unnecessary updateParams() call in constructor 2018-03-13 17:35:15 +01:00
Beat Küng 523bb11577 module template: update to use the new Param classes 2018-03-13 17:35:15 +01:00
Beat Küng 0d26aeafe2 px4_parameter.h: remove this file - it's not used anymore 2018-03-13 17:35:15 +01:00
Beat Küng fca99cf775 param: refactor BlockParam classes
- make the selected parameter a template argument. This
  enables type-checking at compile-time.
- move things to src/platforms.
  This provides consistent includes with ModuleBase
- add ModuleParams base class (replaces Block & SuperBlock)
- drop the Block* prefix from the class names
2018-03-13 17:35:15 +01:00
Beat Küng 0e4034d01e param: add a px4_parameters_public.h.jinja template
Generates an enum with all params & additional type information for static
type checking

The generated public param header is required to build the modules using
the new BlockParam classes.
2018-03-13 17:35:15 +01:00
Beat Küng 0a5af01454 NavigatorMode: inherit from Block instead of SuperBlock 2018-03-13 17:35:15 +01:00
Amir Melzer 118214c6b5 update submodule to include ASL_PWR_BRD 2018-03-13 15:24:44 +01:00
Philipp Oettershagen ff66605a8a Fix: Increase pwmsim module stack by 100 bytes again because load_mon was giving warning about low stack 2018-03-13 12:51:33 +01:00
Jan Okle 63121b74df NuttX update - fix kinetis transmission status handling in the serial interrupt (#8944)
https://github.com/PX4-NuttX/nuttx/commit/efc3d9e92bd10623ab3025f012fd7d481e1a7267
2018-03-12 11:56:59 +01:00
David Sidrane de9368319f Do not change mode to read temperature
The mode change was not necessary and in fact caused the chip to not update the registerfile resulting in MAG timeouts
2018-03-12 11:56:59 +01:00
Beat Küng bb6802a1ed kinetis: fix PPM decoding
On kinetis, the TPM_STATUS_TOF was used to detect missed interrupts for
PPM decoding. However this was not correct, because the TOF bit was set on
each timer overflow. This happened regularly after every 64ms interval,
which meant that most PPM frames were just discarded.

I have not found any equivalent register/solution that is used on STMF4,
so this just removes the TOF handling. However there is now no way to
detect missed edges/interrupts!
2018-03-12 11:56:59 +01:00
Beat Küng 5a7885610d fmu: fix PPM publication if RC_SERIAL_PORT is not defined
Before, the RC channel was published as fast as the fmu was running
(around 200Hz in unarmed state).

And fix code style.
2018-03-12 11:56:59 +01:00
Beat Küng dde922a971 fxos8701cq: add a 'stop' command 2018-03-12 11:56:59 +01:00
Beat Küng 06df2fcb65 rc.interface: disable AUX mixer on NXPHLITE_V3 2018-03-12 11:56:59 +01:00
David Sidrane 0ed631227f fxos8701cq:Work with fxos8701cq and fxos8700cq
Allow whoami of fxos8701cq and fxos8700cq
2018-03-12 11:56:59 +01:00
Daniel Agar 5335778f6e nxphlite start correct sensors and disable debug 2018-03-11 18:19:12 -05:00
Mohammed Kabir f95f4c5f09 UAVCAN : Correct startup sequence and improve parameter description 2018-03-10 23:09:19 -05:00
Vasily Evseenko ebe74ccb2e Add 'forced on' flow control mode to mavlink UART (#8776) 2018-03-10 14:54:57 -05:00
acfloria fd0be3c412 Remove MavLink dependency in navigator 2018-03-09 21:16:28 +01:00
Simone Guscetti dbdb2c9c22 px4-fmuv5: config fix stm32f7 max SD card speed
In the stm32f7 the configuration variable for SD card with DMA changed from CONFIG_STM32_SDIO_DMA to CONFIG_STM32F7_SDMMC_DMA
the maximum clock speed of 16MHz can now be achieved.
2018-03-09 14:54:54 +01:00
Roman 64b97cb18e fw_att_control: in acro use thrust from rate setpoint topic
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-09 13:48:14 +01:00
Thomas Stastny 74730273c1 fw_att_control move angular rate limits to body angular rates (#9023)
* ecl: attitude_fw update
- move angular rate limits to body angular rates
- handle rattitude/acro vs attitude mode rate limits
2018-03-08 22:55:45 -05:00
Daniel Agar 2ce8b6a984 delete VT_FW_PITCH_TRIM parameter (#9014) 2018-03-07 09:08:59 -05:00
Roman ac2b3ccadc vtol_att_control: default front transition throttle to 100%
- the main idea is to prevent airspeed less systems to stall after a
transition

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman e4ea7262fd tailsitter.cpp: small cosmetic fix
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 03338935e0 vtol_att_control: make sure blending airspeed is smaller than transition airspeed
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman e0ca38e794 standard vtol: fix mc weight calculation
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 23257bf6ee standard vtol: simplify blending weight calculation
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman b66bc712af tailsitter: avoid doing same calculation twice
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 1d8f588d37 vtol_att_control: switch from division to multiplication for variable
calculation

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 9e16543dbe tiltrotor: represent time since transition in seconds
- more intuitive
- avoids tons of divisions

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman ae2e6c7a18 tailsitter: represent time since transition in seconds
- more intuitive
- avoids tons of divisions

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman bf22f02567 tailsitter: removed usage of hrt_elapsed and small cleanup
- do not call hrt_elapsed_time since it's expensive
- remove P2 front transition phase (was not even used)

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 196d0e40b4 standard vtol: use time in second since transition start instead of using
microseconds

- seconds is more intuitive
- avoids tons of divisions by 1e6f

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 5a2a5127fa tailsitter: removed common vtol parameters
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 2c0436c37c sitl tiltrotor config: front transition throttle parameter name change
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 07a84f2246 tiltrotor: removed common vtol parameters
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 6900f97b72 vtol_att_control: use airspeed_disabled flag instead of airspeed mode
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 8f71633516 sitl configs: updated VT_TRANS_THR parameter name change
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman 4859cc04dc ROMFS: updated VT_TRANS_THR parameter name change
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-07 14:01:51 +01:00
Roman daa6c6ffc8 vtol_att_control: consolidated standard parameters & fix usage of hrt_elapsed time
- standard vtol was implementing many custom parameters although they
are generic and should be shared between the vtol types
- removed heavy usage of hrt_elapsed_time() which is a system call and
could be computationally expensive
2018-03-07 14:01:51 +01:00
Julian Oes 9c6b1a0f04 navigator: fix incorrect takeoff altitude
This fixes a problem where we do not properly go to the set takeoff
altitude but end up lower.

The problem was that the setpoint triplet is reset when the navigation
mode changes. So in this case, the triplet is reset when we switch from
takeoff to loiter which can happen before reaching the actual takeoff
altitude.

The fix is an ugly hack to prevent the reset in the case of takeoff to
loiter. A better solution would be to remove the general reset and have
all navigation modes do the proper resets themselves.

This hotfix should however be lower risk.
2018-03-07 08:48:44 +01:00
Daniel Agar 623e16e8be logger SITL add additional messages by default 2018-03-06 17:42:33 +01:00
Daniel Agar 6f47894929 rc.sensors ms5611 driver auto detect ms5607/ms5611 2018-03-06 13:47:37 +01:00
Daniel Agar ba90952e07 px4fmu-v2 board_on_reset also reinit spi 2018-03-06 13:47:37 +01:00
AlexKlimaj 83d01a7c76 Updated batt_smbus. Expanded battery_status.msg. Fixed mavlink_messages.cpp temperature. (#8991)
* Updated and expanded batt_smbus to work with bq40z50-R2. Expanded battery_status.msg. Fixed mavlink_messages.cpp temperature, added commented out expanded battery_status.msg parameters for future mavlink expansion.

* Changed errx to PX4_ERR

* Added PX4_ERR returns
2018-03-06 10:42:20 +01:00
Roman bf097d7fa4 convergence config: increase idle speed in mc mode
- this makes sure that all motors are idling in mc mode. having this too
low can lead to a motor stopping in flight which is critical for
attitude control
- experienced loss of attitude control in RTL during descent prior to this
change

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-05 15:48:13 -05:00
Daniel Agar 493c41c76e VtolLandDetector require vehicle_status timestamp 2018-03-05 15:46:24 -05:00
Daniel Agar 354584acfc MulticopterLandDetector initialize all class members 2018-03-05 15:46:24 -05:00
Daniel Agar 69470f6991 land_detector use THROTTLE index 2018-03-05 15:46:24 -05:00
Daniel Agar 458db2e508 vehicle_global_position remove redundant evh and evv
- vehicle_status_flags condition_global_velocity_valid is also unnecessary
2018-03-05 13:20:28 -05:00
Beat Küng 03b8cd78b3 gps: explicitly disable flow control
If the GPS driver was used on another port (e.g. TELEM2), it would get
stuck in a `write` call and not return anymore. Disabling flow control
fixes that.

CPU usage is unchanged.
2018-03-05 16:43:14 +01:00
Daniel Agar 1290db7cb7 differential pressure sensors delete test helpers
- these are redundant with listener differential_pressure
2018-03-05 08:32:59 +01:00
Daniel Agar b9081fb0ab vehicle_global_position delete unused pos_d_deriv 2018-03-05 01:41:18 -05:00
Daniel Agar 2ddd04cba6 px4fmu-v2 disable ulanding 2018-03-05 01:19:56 -05:00
Coby 664001921e quad_plus geometry fix typo in rear motor name (#9008) 2018-03-04 18:24:10 -05:00
Daniel Agar 2f96dbb216 gnd_att_control param fix incorrect FW metadata 2018-03-04 18:23:12 -05:00
Daniel Agar 5cbd19aef2 Jenkins archive nuttx elf files 2018-03-04 17:52:34 -05:00
Daniel Agar 5ef27c5425 mavlink add minimal mode (#8947) 2018-03-04 17:50:28 -05:00
Daniel Agar 6caeb2da4f pwm_out_sim reduce stack 1310 -> 1000 2018-03-04 14:12:15 -05:00
Daniel Agar 38f5f60a1e pwm_out_sim cleanup
- move to ModuleBase
 - strip down to PWM 8 and 16 modes only
 - remove all dead code
 - implement missing pwm ioctls (current value, rates, etc)
 - default rate 50Hz -> 400Hz
2018-03-04 14:12:15 -05:00
PX4 Jenkins 3d6854099e Update mavlink v2.0 submodule Sun Mar 4 07:43:12 UTC 2018 2018-03-04 10:45:51 -05:00
ToppingXu e340f6fd7a FixedwingPositionControl: fix air_gnd_angle judgement condition.
air_gnd_angle is from acos(), and never return a value that bigger than
M_PI_F
2018-03-02 21:57:11 +01:00
Matthias Grob d39a8b5a48 Battery: Switch thrust based load compensation back to linear
To account for the parameter definition.
My tests if quadratic is actually better in practise were anyways not conclusive.
2018-03-02 21:07:09 +01:00
Matthias Grob 5bb9babc20 Mavlink: round battery percentage up instead of down 2018-03-02 16:18:52 +01:00
Daniel Agar 4c4f990b3b EKF2 remove FW_ARSP_MODE check 2018-03-02 08:58:08 +01:00
Sander Smeets 2ef9c4ec35 VTOL force land even when transitioning to FW (#8958) 2018-03-01 16:51:50 -05:00
Roman ff86d15c13 caipirinha vtol: do not lock elevons in hover mode
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-01 22:07:36 +01:00
Daniel Agar 3b0b5645e1 vtol_att update poll fd before poll call 2018-03-01 18:27:57 +01:00
Anthony Lamping 1ef7b351be CI: assmue plan file format 2018-03-01 12:21:22 -05:00
Anthony Lamping 3be6a439f1 CI: better detect end of mission
if the vehicle doesn't land and disarm at the end of the mission, the current sequence doesn't reset to 0
2018-03-01 12:21:22 -05:00
Anthony Lamping 25b02a9d0f CI: Jenkins use plan file missions 2018-03-01 12:21:22 -05:00
Anthony Lamping 3b69361a00 CI: move missions into a folder 2018-03-01 12:21:22 -05:00
Anthony Lamping 4158b5e6a9 CI: remove old mission formats 2018-03-01 12:21:22 -05:00
Anthony Lamping e9c7023083 CI: add missions in plan file format 2018-03-01 12:21:22 -05:00
Roman ea3586cfd9 tailsitter: stop fiddling with thrust during transition and just let
the mc pos controller handle it for now

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-01 12:16:27 -05:00
Roman 08534588cd fw_pos_control: get vtol parameter values if vehicle is vtol
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-01 12:16:27 -05:00
Roman ee2163ce69 vtol_att_control: prevent segfault when no command line args given
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-01 11:35:34 -05:00
Andreas Antener 198708ba2e rotation: updated board rotation meta data 2018-02-28 10:08:58 +01:00
Andreas Antener ab9ee3aa6c conversion: added -45 deg pitch rotation 2018-02-28 10:08:58 +01:00
Andreas Antener add20389f6 conversion: added rotation +45 degree in pitch 2018-02-28 10:08:58 +01:00
Paul Riseborough 11e3081efd ecl: Fixes bug preventing use of GPS reported speed accuracy (#8981) 2018-02-28 15:32:01 +11:00
Beat Küng 40675bd1f4 logger: fix potential semaphore counter overflow
When the timer callback is called at a higher rate than the logger can
execute the main loop (which is never the case under normal conditions),
the semaphore counter will increase unbounded, and eventually lead to
an assertion failure in NuttX.
The maximum semaphore counter is 0x7FFF, and when the logger runs at
default rate (3.5ms), the logger task must be blocked for 0x7FFF*3.5/1000
= 114 seconds continuously for an overflow to happen.

I see 2 cases where that could happen:
- the logger execution blocks somehow, or busy-loops in an inner loop
- a higher-prio task runs busy and hogs the CPU over a long period of time
2018-02-27 21:01:29 +01:00
Beat Küng 17cb5c4d58 hardfault_log: fix comment 2018-02-27 21:01:29 +01:00
Roman 49e349c753 updated sitl_gazebo: small tiltrotor fix to enable turns
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-27 16:28:22 +01:00
Julian Oes 38e5a06136 jMAVSim: update submodule again
This gets rid of a printf.
2018-02-26 10:37:34 +01:00
PX4 Jenkins 91d6f35fc8 Update jmavsim submodule Sat Feb 24 23:05:44 CST 2018 2018-02-25 19:07:23 +01:00
PX4 Jenkins e0b32a6846 Update mavlink v2.0 submodule Sat Feb 24 02:43:15 EST 2018 2018-02-24 23:12:47 -08:00
Matthias Grob 611ab577d8 Battery: Fix estimate initialization
On the Intel Aero and probably also other specific platforms
the first measured voltage values despite connected battery are unuasable.
The solution here is to start filtering and determining warning
only after a measurement above 2.1V was received.
2018-02-24 16:27:44 +01:00
Matthias Grob 83ac74367c Battery: move member initialization values to class declaration 2018-02-24 16:27:44 +01:00
Julian Oes 3917eb2d00 mavlink: don't send wrong time
This prevents the autopilot from sending an invalid unix timestamp.
Usually, if no time is set yet by a GPS, the date is somehow set
to 2000-01-01, therefore we can ignore anything earlier than 2001.
2018-02-23 16:14:02 +01:00
Matthias Grob df7364d2e2 Battery: Correct unit for capacity parameter 2018-02-23 15:30:17 +01:00
Roman ea8db53d15 fmu: removed obsolete _trim_pwm member and implemented proper fetching
of mixer trim values

Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-23 15:28:22 +01:00
Roman 04a89f7e9b mixer lib: added methods to fetch the active trim values
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-23 15:28:22 +01:00
Roman 29c60a1fd4 mixer_group: do not clamp offset to arbitrary value
- allow the user to apply an offset that covers the entire servo range

Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-23 15:28:22 +01:00
ChristophTobler 6a987b5a15 update submodule sitl_gazebo to include isinf() fix 2018-02-23 09:10:39 +01:00
Roman 2549b702f0 pwm_out_sim, simulator_mavlink: fixed code style
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
Roman 10bf6a4b59 params cmd: be less verbose
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
Roman a1f169f752 updated sitl_gazebo for tiltrotor support
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
Roman 159834ce1b posix-configs: set tiltrotor transition parameters
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
Roman ddb2dd89db simulator mavlink: support for quad tiltrotor mav type
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
Roman e9c715f89b pwm_out_sim: various fixes for tiltrotor simulation
- increased the number of pwm outputs
- handle PWM_SERVO_SET_MIN_PWM and PWM_SERVO_SET_MAX_PWM

Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
Roman 2886fe8da3 posix-configs: added sitl startup script for gazebo quad tiltrotor model
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
Roman 86c472d8ff ROMFS sitl: added a mixer for the gazebo quad tiltrotor model
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
mcsauder 3ef6bc7d93 Update CMakeLists for the drivers/imu directory. 2018-02-22 12:48:34 -05:00
Julian Oes 4cac6d1a44 tune_control: added define for tune strength
This adds a define for the tune strength instead of hard-coding it with
a magic number.
2018-02-22 15:24:46 +01:00
Paul Riseborough abb067c788 ecl: Use EKF version with external vision nav axis rotation bug fixes (#8935) 2018-02-22 22:02:50 +11:00
Daniel Agar 19e706fede fw_att_control fix attitude setpoint publication 2018-02-21 21:07:29 -05:00
Daniel Agar a0f115b9ae fw_att_control consolidate flaps code 2018-02-21 21:07:29 -05:00
Daniel Agar 4cb71f209f fw_att_control centralize manual setpoint generation 2018-02-21 21:07:29 -05:00
Daniel Agar 7fa858ad84 fw_att_control only store battery_status scale 2018-02-21 21:07:29 -05:00
Daniel Agar 94b8e4a2bf fw_att_control remove commented warnings 2018-02-21 21:07:29 -05:00
Daniel Agar dcc47020a4 fw_att_control update params before poll 2018-02-21 21:07:29 -05:00
Daniel Agar bf42964432 fw_att_control don't store entire vehicle_land_detected message 2018-02-21 21:07:29 -05:00
Daniel Agar 97815df1a8 uorb_graph update fw_att_control special case 2018-02-21 21:07:29 -05:00
Daniel Agar 063714c42c fw_att_control initialize all fields in header 2018-02-21 21:07:29 -05:00
Daniel Agar 15fb60c48f fw_att_control delete unused loop_counter 2018-02-21 21:07:29 -05:00
Daniel Agar 1897b93cd2 fw_att_control rename fw_att_control_main.cpp to match class 2018-02-21 21:07:29 -05:00
Daniel Agar 426f2cce2e fw_att_control split header into separate file 2018-02-21 21:07:29 -05:00
Daniel Agar 80de3f48c8 fw_att_control remove debug code 2018-02-21 21:07:29 -05:00
Daniel Agar 559e2c211a fw_att_control move to ModuleBase 2018-02-21 21:07:29 -05:00
Daniel Agar a35abf2453 rename nuttx board support packages for consistecy (#8777) 2018-02-19 19:12:32 -05:00
Beat Küng 7b5b1c4f23 mc_att_control: update & reset d-term lowpass filter only when frequency changes 2018-02-19 17:02:31 +01:00
Beat Küng 5b7c062f67 mc_att_control_main: remove unused _rates_sp_prev 2018-02-19 17:02:31 +01:00
Beat Küng f346b00ee0 mc_att_control rate controller: use a butterworth lowpass filter on the D-term
The filter is disabled by default, thus the behavior is unchanged.
2018-02-19 17:02:31 +01:00
Beat Küng ca9c3b18ff mc_attitude_control: avoid using a static variable for last_run
and call hrt_absolute_time() only once.
2018-02-19 17:02:31 +01:00
Beat Küng 54d1395206 IMU_GYRO_CUTOFF, IMU_ACCEL_CUTOFF: reduce minimum to 0, allowing to disable filtering 2018-02-19 17:02:31 +01:00
Beat Küng 4bf1980ff6 MC_ROLL_P, MC_PITCH_P: increase maximum value to 12
- use the same value for both
- lower control latency allows increasing these gains
2018-02-19 17:02:31 +01:00
Beat Küng 8d9e9d3a7b RC input: allow disabling the RC filtering via RC_FLT_CUTOFF
The default value of 10 Hz adds noticeable lag.
2018-02-19 09:29:46 -05:00
Daniel Agar 8fc659dcb2 commander only copy actuator_controls if engine failure enabled 2018-02-19 15:28:47 +01:00
Daniel Agar 43c7f7edbe commander remove vehicle_attitude usage 2018-02-19 15:28:47 +01:00
Daniel Agar 71fef78bdd commander remove unused include 2018-02-19 15:28:47 +01:00
Daniel Agar 50e96b24b0 commander remove unused differential pressure check 2018-02-19 15:28:47 +01:00
Daniel Agar ecf46b4f91 commander remove globallocalconverter 2018-02-19 15:28:47 +01:00
Daniel Agar 2c7d45064e mavlink EXTENDED_SYS_STATE initialize landed and vtol state 2018-02-19 15:28:47 +01:00
Daniel Agar 4e45d7959c commander remove gps receiver checks 2018-02-19 15:28:47 +01:00
Julian Oes a6e863ac89 sitl_gazebo: updated submodule (#8917)
* This includes the new basic camera control.
2018-02-19 09:28:34 -05:00
Lorenz Meier a24a40c6c4 Update CONTRIBUTING.md
Updated link to flight review
2018-02-19 12:23:56 +01:00
Vasily Evseenko 135162522a Don't use ADSB messages with undefined fields in navigator (#8900)
Don't use ADSB messages with undefined fields in navigator
2018-02-18 11:08:40 +01:00
Daniel Agar a1f660119c fw_pos_control_l1 consolidate message updates 2018-02-17 18:11:43 +01:00
Daniel Agar 458d8f7b02 fw_pos_control_l1 move to ModuleBase 2018-02-17 18:11:43 +01:00
Daniel Agar 4aeb70fcfe rcS move logger startup to rc.logging and end of init
- fixes #8903
2018-02-17 18:09:50 +01:00
Martina f932217fdc mavlink_receiver: decode obstacle_distance message 2018-02-16 19:59:31 +01:00
Martina 883fb8ce57 CMakeLists: add obstacle_distance message 2018-02-16 19:59:31 +01:00
Martina f5bfabfab9 add obstacle_distance message 2018-02-16 19:59:31 +01:00
Beat Küng 37a082255a rc.interface: enable aux mixer for FMU-v5 2018-02-16 07:58:40 +01:00
Vicente Monge a272cbbd08 Included field timestamp for micrortps bridge messages. 2018-02-15 22:32:18 +01:00
ChristophTobler f9cb575ced mavlink_receiver: add evh/evv to vision msg
this will be used by the ekf2 at some point
2018-02-15 11:26:01 -05:00
Avinash Reddy Palleti 12c343317c Add aerofc baudrate to list
Adding aerofc baudrate 921600 into the list
2018-02-15 10:23:59 +01:00
Daniel Agar a04110cad1 Jenkins temporarily disable ROS vtol mission test old 3 2018-02-14 20:29:20 -05:00
Beat Küng 89b2fa2ba0 microRTPS_transport.h: add clarifying comment for Transport_node::write() 2018-02-14 12:14:34 +01:00
ritul jasuja 13a3791c47 Send RTPS header and payload in one stream
This avoids assembling the header and payload on the receiver side
2018-02-14 12:04:35 +01:00
Beat Küng 2517d3854c printload: fix buffer overflow on NuttX
The NuttX config variable CONFIG_TASK_NAME_SIZE does not include the
null terminator byte, thus the buffer needs to be longer by 1 byte.
2018-02-14 11:17:44 +01:00
ChristophTobler 80eca30689 microRTPS_bridge: mark task as not running when running stop() 2018-02-13 20:50:00 -05:00
Anthony Lamping c22dc2beaf CI: mission WP reached - satisfy based on mavros topics instead of distance check (#8879) 2018-02-13 20:49:18 -05:00
Roman 8ec1fb9999 ROMFS: added mixer for tailsitter simulation
- simulated tailsitter needs a virtual elevator since we cannot simulate
elevons yet (liftDrag plugin does not model longitudinal moment Cm)

Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-13 20:47:40 -05:00
Roman d63a8033d0 updated sitl_gazebo: tailsitter fixes
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-13 20:47:40 -05:00
acfloria 6be5a0aacc Add AERT mixer 2018-02-13 20:45:19 -05:00
Phillip Kocmoud 4d0964385b Update rc.sensors : mRo X2.1 to enable the LIS3MDL
This change allows the LIS3MDL based GPS magnetometers to autostart on the mRo x2.1.
2018-02-12 21:33:39 -05:00
Julian Oes cc36c8ee37 mission: warn at 2/3 of the max distance
This was wrong, instead of warning at 2/3 of the max distance as
mentioned in the comment, we would start to warn at 3/2 of the distance
which would then never actually happen.
2018-02-12 17:36:54 -05:00
Lorenz Meier 85b88f723d Update README
Update maintenance team duties according to latest discussions on dev call.
2018-02-12 21:58:11 +01:00
Beat Küng 4b64bfdd95 mc_pos_control: disable roll/pitch modification in manual for multicopters
This causes severe oscillations in aggressive maneuvers with high tilt
angles. It's an issue on VTOL's too, but the modification is specifically
for VTOL's and VTOL's typically do not fly with such high tilt angles
(>50 deg).
See also: https://github.com/PX4/Firmware/issues/7949
2018-02-12 10:53:54 +01:00
Daniel Agar 8b63dbecde FW controllers initialize vtol_type to a non-valid value
- tailsitter is vtol type 0
2018-02-11 17:12:45 +01:00
PX4 Jenkins 36e72a67fa Update mavlink v2.0 submodule Sun Feb 11 02:43:17 EST 2018 2018-02-11 16:38:09 +01:00
Anthony Lamping b1f08a9640 ROS launch: cleanup
* remove non-functional gazebo headless arg
* remove unused namespace args
* simplify mavros launch, use mavros's px4.launch instead
* fix single_vehicle_spawn spelling
* formatting with xmllint: remove empty lines, set intent to 4 spaces, add xml tag for editors, add comments to break up spections
* remove old and deprecated launch files
2018-02-11 15:16:35 +01:00
nanthony21 a637063965 fix formattting 2018-02-11 14:08:02 +01:00
nanthony21 53b4f6406f cell_voltage is no longer constant 2018-02-11 14:08:02 +01:00
nanthony21 9c7de38b75 battery compensation is now performed on the cell voltage rather than the total voltage 2018-02-11 14:08:02 +01:00
Daniel Agar e04d30c9cf param markdown metadata handle float enums 2018-02-10 20:37:47 -05:00
Daniel Agar 2eb684ded3 mavlink add MAV_TYPE enums 2018-02-10 20:37:47 -05:00
Daniel Agar 1a0238f20c tone_alarm fix circuit breaker param handling 2018-02-10 20:37:47 -05:00
Daniel Agar 6355eedd7a move NAV_RC_LT into Mission group 2018-02-10 20:37:47 -05:00
Daniel Agar 3928507f65 mc_pos_control MPC_CRUISE_90 missing max 2018-02-10 20:37:47 -05:00
Daniel Agar 232b38a669 RCX_REV params add enum metadata 2018-02-10 20:37:47 -05:00
Daniel Agar 2d27b1eb52 delete unused MAV_TEST_PAR 2018-02-10 20:37:47 -05:00
Daniel Agar f621c334a8 sensors don't find parameters that are unused by QGC 2018-02-10 20:37:47 -05:00
Daniel Agar 5b80adeadb move SENS_EN_MB12XX to mb12xx driver 2018-02-10 20:37:47 -05:00
Daniel Agar dbb3621bdb move SENS_EN_TFMINI to tfmini driver 2018-02-10 20:37:47 -05:00
Daniel Agar 3e2c9d1113 move SENS_EN_LEDDAR1 to leddar_one driver 2018-02-10 20:37:47 -05:00
Daniel Agar 23be7d4f96 move SENS_EN_SF1XX to sf1xx driver 2018-02-10 20:37:47 -05:00
Daniel Agar fb29ea0079 move SENS_EN_TRANGER to teraranger driver 2018-02-10 20:37:47 -05:00
Daniel Agar 8a67b5b447 move SENS_EN_SF0X to sf0x driver 2018-02-10 20:37:47 -05:00
Daniel Agar f6a37d8c74 move SENS_EN_LL40LS to ll40ls driver 2018-02-10 20:37:47 -05:00
Daniel Agar cf54023c96 lis3mdl i2c address is not board specific 2018-02-09 22:40:34 +01:00
Daniel Agar ad6df56438 lis3mdl add mixxing PX4_I2C_BUS_EXPANSION ifdef 2018-02-09 22:40:34 +01:00
Daniel Agar c459a04b9b organize all telemetry drivers in subdirectory 2018-02-09 22:40:34 +01:00
Daniel Agar 681e351f62 organize all IMU drivers in subdirectory 2018-02-09 22:40:34 +01:00
Daniel Agar f7a17ad5e5 cmake improve ROMFS dependencies for px4io inclusion (#8860)
- fixes #8858
2018-02-09 12:57:34 -05:00
Beat Küng 782ed5d324 modules documentation script: add anchor for '### Usage' sections
So that they are unique.
2018-02-09 09:53:25 -05:00
Daniel Agar c7dfd2d17f ROMFS fix LeddarOne nsh init 2018-02-08 19:58:42 -05:00
Daniel Agar caf50dbea2 batt_smbus delete IOCTL usage 2018-02-08 19:00:48 +01:00
Daniel Agar 64fa1ec6a5 batt_smbus readd to configurations and fix compilation errors 2018-02-08 19:00:48 +01:00
johannes b69a4df20c tools-ecl-ekf: remove commas to prevent csv file import errors
- remove commas from a csv table file string to avoid import errors
2018-02-08 17:18:41 +01:00
ChristophTobler bce08334d0 update sitl_gazebo submodule
includes range finder topic fix
2018-02-08 17:05:26 +01:00
Beat Küng 4772a25b77 rcS: add clarifying comment for Pixhawk 3 Pro UART port 2018-02-08 14:48:49 +01:00
Haukanes 35acdfa717 Start frsky_telemetry for PX4FMU_V4PRO 2018-02-08 14:46:55 +01:00
José Roberto de Souza 0b9025b2d2 px4fmu-v2: Build individual distance sensors
We are running out of flash memory in px4fmu-v2 so removing all the
distance sensors from binary and adding then individually.
Right now only LeddarOne is not being buid.
2018-02-08 11:26:26 +01:00
José Roberto de Souza 10df6729f3 ROMFS: aerofc: Do not start MAVLink in telemetry if LeddarOne is in use 2018-02-08 11:26:26 +01:00
José Roberto de Souza d0baf95df3 drivers: Add LeddarOne lidar driver
More information: https://leddartech.com/modules/leddarone/
2018-02-08 11:26:26 +01:00
Lorenz Meier eaf401a32f README: Add hint to QA session on dev call 2018-02-07 08:11:54 +01:00
Anthony Lamping 74bd40c09d multi uav launch: spawn urdf 2018-02-07 08:09:32 +01:00
Lorenz Meier 0413f407a5 Gazebo: Update to fix geotagging 2018-02-07 08:09:18 +01:00
Anthony Lamping 86ae744266 CI: allow Gazebo to restart on crash (#8817)
* add respawn_gazebo arg to be used with empty_world.launch
* catch rospy sleep method's exceptions
* fix copy-paste mistake in land state failure message
2018-02-06 15:11:09 -05:00
Daniel Agar b40323b8d8 Jenkins simplify docker environment setup 2018-02-05 15:37:04 -05:00
Daniel Agar f7285e1cfa UAVCAN improve dependencies within libuavcan submodule
- fixes #8828
2018-02-05 11:48:22 -05:00
johannes 26f9e56014 change short option for overwrite to be a single letter 2018-02-05 15:34:03 +01:00
johannes 5357d680d2 print "skipping files" information to console 2018-02-05 15:34:03 +01:00
johannes 0e82e2ec67 update the batch process script for the ekf analysis tool to support resumed analysis:
- ulog files are skipped from the analysis, if a corresponding .pdf file already exists
	- an overwrite flag can be set to analyse all the files
2018-02-05 15:34:03 +01:00
David Riseborough 83133b1bca This commit fixes the way baud rate is generated from the program argument in
the FTPS client and agent.

A table has been added to the FTPS client and agent code that correlates
the baud rate value with the encoding.

A function has been added to the FTPS client and agent to take the program
argument for baud rate and use it to look up the table and return the entry
containing both the value and the encoding.

The value is displayed for the user and the encoding is sent to the uart
node constructor.

Signed-off-by: David Riseborough <drisebor@hotmail.com>
2018-02-05 08:25:03 +01:00
elia 64f032441c add validity flags which are used by ekf2 main module 2018-02-04 21:17:37 +01:00
Daniel Agar f5c1124812 move tailsitter_recovery lib to mc_att_control 2018-02-04 18:15:57 +01:00
Daniel Agar b3b1161d53 mathlib filters include automatically 2018-02-04 18:15:57 +01:00
Daniel Agar 6f248bc7e9 move runway_takeoff lib to fw_pos_control_l1 2018-02-04 18:15:57 +01:00
Daniel Agar f73f95965a parameter culling include subdirectories of modules 2018-02-04 18:15:57 +01:00
Daniel Agar 6a4ef78111 move launchdetection lib to fw_pos_control_l1 2018-02-04 18:15:57 +01:00
Julian Oes d646abcee7 px_uploader: improve silicon check
- Move check to proper location, out of the try catch block for OTP.
- Add Pixhawk specific check to notify users that want to flash
  px4fmu-v3_default on Pixhawks with older v4 bootloaders that do not
  support the silicon errata check.
2018-02-04 18:14:51 +01:00
Julian Oes a1ab84e5b9 px_uploader: make rev check a bit more intuitive 2018-02-04 18:14:51 +01:00
Lorenz Meier 6d00de7b25 Uploader: Move flash size check into appropriate bootloader version region 2018-02-04 18:14:51 +01:00
Lorenz Meier df32297162 Gazebo SITL: Make Rospack optional 2018-02-03 19:20:51 +01:00
Julian Oes d175a75691 px_uploader: fix Python3 upload
This fixes the error below when using Python3:

  File "Tools/px_uploader.py", line 128, in
  __init__
      self.image.append('\xff')
      TypeError: an integer is required
2018-02-03 09:33:13 -05:00
ChristophTobler 305859f356 disable power module (#8804)
- currently doesn't work on all boards...
2018-02-02 12:00:39 -05:00
Daniel Agar 976b890c56 commander increase stack by 90 bytes (3160 -> 3250) 2018-02-02 08:34:39 +01:00
Matthias Grob 5ad03d7ef2 mc_pos_control: comment typo in flow sensor altitude 2018-02-02 00:38:01 -05:00
Matthias Grob 11d480240a mathlib Functions: removed inline, fixed style 2018-02-02 00:38:01 -05:00
Matthias Grob 8e68f5ed79 mathlib Functions: improve documentation and limit checking 2018-02-02 00:38:01 -05:00
Daniel Agar 8c201c88ca Jenkins always distclean each build 2018-02-02 00:30:33 -05:00
Julian Oes 9c86cdab2e Robustify mission upload/download (take 2) (#8794)
* Revert "mavlink_mission: don't retransmit automatically"

This reverts commit 4e008fe89120e24e321e93fb551753242797f022.

* mavlink_mission: don't retry to send mission item

The mission items need to be requested one by one by a ground station.
This is a "pull" protocol and we should not retry to "push" the mission
items down.

If we do this we can trigger the situation where the autopilot keeps
retrying and the ground station does not time out because it keeps
receiving items (even though the items are the wrong ones).

* mavlink_mission: reduce retry timeout

When actively re-requesting lost mission items, we can be more agressive
and therefore lose less time when a mission item is lost on the way.
2018-02-01 16:59:22 -05:00
Daniel Agar 102c0ead53 cmake consolidate px4 executable builds and upload 2018-02-01 09:00:13 -05:00
Daniel Agar 2ff81393bc move posix, nuttx, qurt components into platforms 2018-01-31 17:17:07 +01:00
Beat Küng a644ed90dd mavlink: use orb_unsubscribe() instead of close() for orb subscription 2018-01-31 15:18:51 +01:00
ChristophTobler acaf7cd267 rcS: automate tfmini start
disable mavlink on aero telemetry if tfmini enabled and start on mavlink companion device for others (needs SYS_COMPANION to be 0)
2018-01-31 11:36:06 +01:00
Paul Riseborough 8a1b6d548f ecl: Update to version that fixes height reset bug 2018-01-31 10:46:52 +01:00
Beat Küng 0c6280ba45 tune_control: fix clang-tidy errors 2018-01-31 07:57:52 +01:00
Beat Küng 86acd23704 cmake configs: add lib/tunes for all configs that have tune_control enabled 2018-01-31 07:57:52 +01:00
Beat Küng 2577eb7527 sensors: adc_poll: remove unneeded argument 2018-01-31 07:57:52 +01:00
Beat Küng 90a6989440 px4fmu-v5 cmake config: re-add drivers/bmi055
Accidentally dropped in bad813e911
2018-01-31 07:57:52 +01:00
Beat Küng c8c918ce98 cmake configs: add systemcmds/tune_control
This is now required in the startup scripts
2018-01-31 07:57:52 +01:00
Beat Küng 10597fcf12 fmu-v5 board_config: add BOARD_BATTERY1_V_DIV and BOARD_BATTERY1_A_PER_V 2018-01-31 07:57:52 +01:00
PX4 Jenkins a916a6c2db Update sitl_gazebo submodule Wed Jan 31 00:19:55 UTC 2018 2018-01-31 01:36:11 -05:00
Daniel Agar 4c5b42f256 parameters move bson buffered file support into tinybson 2018-01-30 09:17:56 -05:00
Daniel Agar 59fd22be1b parameters import/export test 2018-01-30 09:17:56 -05:00
ChristophTobler 8d4036df7d aerofc cmake: add baro driver again 2018-01-30 09:17:01 -05:00
ChristophTobler d2e45d14fa update ecl to include ev hgt fix 2018-01-30 12:32:30 +01:00
Paul Riseborough eed8b00857 mc_pos_control: Release estimator speed limit only when speed demand is significant
This prevents unexpected increases in stick sensitivity when stick is moved after periods of inactivity.
2018-01-29 22:30:34 +01:00
Paul Riseborough 6ef43e5b75 ecl: Use latest master 2018-01-29 22:30:34 +01:00
Paul Riseborough f8693b49c2 mc_pos_control: Fix compile error after rebase 2018-01-29 22:30:34 +01:00
Paul Riseborough 388eb6ee4c ros: update local_position publication
Ensure all data is set.
2018-01-29 22:30:34 +01:00
Paul Riseborough 64551607bc simulator: update local_position publication
Ensure all data is set.
2018-01-29 22:30:34 +01:00
Paul Riseborough 4b2dcddec2 position_estimator_inav: update local_position publication
Ensure all data is set.
2018-01-29 22:30:34 +01:00
Paul Riseborough 33b75d8e87 mavlink: update local_position publication
Ensure all data is set.
2018-01-29 22:30:34 +01:00
Paul Riseborough c294393377 local_position_estimator: update local_position publication
Ensure all data is set.
2018-01-29 22:30:34 +01:00
Paul Riseborough 642a4a5fc7 mc_pos_control: respect estimator max speed and min height limits 2018-01-29 22:30:34 +01:00
Paul Riseborough 1e9361572f sensors: Add parameter for flow sensor minimum range 2018-01-29 22:30:34 +01:00
Paul Riseborough fc78de4c26 ekf2: Update parameter descriptions for air data fusion 2018-01-29 22:30:34 +01:00
Paul Riseborough f866698fb2 ekf2: Update parameter description for max optical flow rate 2018-01-29 22:30:34 +01:00
Paul Riseborough b117fddb21 ekf2: publish estimator position control limits 2018-01-29 22:30:34 +01:00
Paul Riseborough 0ed78f259e msg: Add estimator required control limits to vehicle_local_positiion 2018-01-29 22:30:34 +01:00
ChristophTobler d53c531979 mpu9250 wrapper: set autopublish rate
before it didn't integrate IMU values and HIGHRES_IMU was using the filtered values
2018-01-29 16:55:45 +01:00
Simone Guscetti 47e5382e7e libtunes: insert explicit fallthrough 2018-01-29 09:45:59 -05:00
Martina 3e09f6309e tune_control: add string library after rebase 2018-01-29 09:45:59 -05:00
Martina 1a50759521 tone_alarm: fix rebase error 2018-01-29 09:45:59 -05:00
Simone Guscetti 9cb95b64ca libtunes: change variable name
This make the variable purpose more clear.
2018-01-29 09:45:59 -05:00
Martina 2ec5ea48a3 tunes: for custom tunes set silence from tune control message and set
silence to 0 when the end of the string is reached
2018-01-29 09:45:59 -05:00
Martina 9611641bb7 tune_control: add silence to tune_control message 2018-01-29 09:45:59 -05:00
Martina d5b2ba276b tunes: change tune update interval to 100000 us 2018-01-29 09:45:59 -05:00
Martina 0f1f2d870f tune_control: add silence to tune_control msg 2018-01-29 09:45:59 -05:00
Martina d10372c6b5 tunes: change config_tone definition and add pointer to the beginning
of the tune to repeat it
2018-01-29 09:45:59 -05:00
Martina 1988141c6d tunes: add pointer to the beginning of a tune to allow tune replay 2018-01-29 09:45:59 -05:00
Simone Guscetti 402ad9f48f rcS: partially change rcS to start the modified tone driver
- Start tone_alrm driver after uorb
- Replace tone_alarm $TUNE_ERR with tune_control play -m ${TUNE_ERR}
- TUNE_ERR is a string
2018-01-29 09:45:59 -05:00
Simone Guscetti a4659b1228 mkblctrl: Repalce old tune interface with the new one
untested on real hardware
2018-01-29 09:45:59 -05:00
Simone Guscetti 117966d2a1 cmake configs: Add tunes library to each board using tone_alarm 2018-01-29 09:45:59 -05:00
Simone Guscetti 08490b0182 commander_helper: Modify to use the tunes library 2018-01-29 09:45:59 -05:00
Simone Guscetti 26d2e69ecf libtunes: Add maximum update interval 2018-01-29 09:45:59 -05:00
Simone Guscetti 8054bbb985 tone_alarm: Adapt tone_alarm driver to use libtunes 2018-01-29 09:45:59 -05:00
Simone Guscetti f63be6b055 libtunes: If default tune does not exist
return -EINVAL
2018-01-29 09:45:59 -05:00
Simone Guscetti 915f728145 libtunes: Separate the default tunes from tunes.cpp 2018-01-29 09:45:59 -05:00
Simone Guscetti 6e712876a4 tune_control: Add checks for the strength 2018-01-29 09:45:59 -05:00
Simone Guscetti 591f9a8a38 libtunes: Handle notification tunes as high priority 2018-01-29 09:45:59 -05:00
Simone Guscetti 3f123acd7e libtunes: handle tune override 2018-01-29 09:45:59 -05:00
Simone Guscetti 6c8b16391e libtunes: complete API doc, minor changes 2018-01-29 09:45:59 -05:00
Simone Guscetti 61b3827962 tune_control: Modify tune_control to use new lib functions 2018-01-29 09:45:59 -05:00
Simone Guscetti b84a97c6d5 libtunes: Changed to a set_control/string and a get_next_tune functions
Now it is possible to set a string and a control.
The get_next_tune function use the same return values as the erliaer
implemented parse_cmd and parse_string functions.
2018-01-29 09:45:59 -05:00
Simone Guscetti 5214642bc3 tunes lib: Minor changes 2018-01-29 09:45:59 -05:00
Simone Guscetti 546a92af1e tune_control: add usage and strength option 2018-01-29 09:45:59 -05:00
Simone Guscetti 9c2480e534 tune_control: clean up 2018-01-29 09:45:59 -05:00
Simone Guscetti e9ea7ab698 lib tunes: clean up 2018-01-29 09:45:59 -05:00
Simone Guscetti dcfd2f1579 tune_control: add max iteration count for the string and lib test calls 2018-01-29 09:45:59 -05:00
Simone Guscetti f7aad844a3 tune control: added the possibility to set tunes with a string
minor changes
2018-01-29 09:45:59 -05:00
Simone Guscetti 7f1f3fa367 msg tune_control: change the duration field to be an uint32
to allign with the libray output which is in us
2018-01-29 09:45:59 -05:00
Simone Guscetti 1714deeb94 system cmd: add first iteration of the new CLI interface for tune control 2018-01-29 09:45:59 -05:00
Simone Guscetti 79ae413982 lib tunes: Add string input method 2018-01-29 09:45:59 -05:00
Simone Guscetti 8ce57bedb7 libtunes: create a new library for tunes
cmake configs: Modify to include new library
2018-01-29 09:45:59 -05:00
Simone Guscetti e139446d09 msg: add new tune_control messege 2018-01-29 09:45:59 -05:00
bresch aca30fc612 VTOL standard - Remove pitch trim 2018-01-29 09:32:51 -05:00
bresch 920cb7a1a1 VTOL standard - Group multicopter weights in update_vtol_state() 2018-01-29 09:32:51 -05:00
bresch d34767b871 VTOL standatd - Simplify multicopter weight in update_transition_state() 2018-01-29 09:32:51 -05:00
Daniel Agar 2bea09a997 rate controller status include rates
- the actual corrected rates currently used by mc_att_control are not
   logged
2018-01-29 09:10:56 -05:00
Andreas Antener 98441ac100 Log rate controller integrators (FW + MC) 2018-01-29 09:10:56 -05:00
PX4 Jenkins 3504ce8efe Update mavlink v2.0 submodule Mon Jan 29 05:18:15 UTC 2018 2018-01-29 00:36:28 -05:00
ChristophTobler cf79be1559 sitl ekf2 config: add vision position estimate 2018-01-28 21:07:48 +01:00
ChristophTobler c272feb71d update sitl_gazebo submodule 2018-01-28 21:07:48 +01:00
Daniel Agar 8b0ba3c34c commander log full status flags 2018-01-28 19:28:32 +01:00
Daniel Agar dc2d6e8aab commander fix ignored parameters (COM_POS_FS_DELAY/COM_POS_FS_PROB) and refactor position velocity validity check (#8765) 2018-01-28 11:22:51 -05:00
SungTae Moon f8f95078e8 commander status reuse arming_state_names in state_machine_helper (#8667) 2018-01-27 10:22:29 -05:00
ChristophTobler 1f5d6c7117 update sitl_gazebo submodule to include opt_flow fixes 2018-01-27 10:04:16 -05:00
ChristophTobler 92dbb16d29 tfmini: use px4_open/read and default range finder device path
this is more consistant and should enable it on qurt/linux
2018-01-27 14:13:28 +01:00
ChristophTobler 7bf3425b7e tfmini: move part from constructor to init()
This makes sure the driver fails if the device path is invalid (::open fails)
2018-01-27 14:13:28 +01:00
ChristophTobler f294445cd0 rc.sensors: start tfmini with appropriate device path for FMUv3 2018-01-27 14:13:28 +01:00
ChristophTobler d6f137e10d tfmini: fixes for other boards than FMUv3
mainly the default device path doesn't work
2018-01-27 14:13:28 +01:00
Beat Küng 738f1ccdb6 module template: need to check if it's running for custom commands 2018-01-27 00:43:04 +01:00
Beat Küng 44d0cba6aa modules documentation: ignore comments in source files 2018-01-27 00:43:04 +01:00
Beat Küng 5bd8574e47 examples/px4_daemon_app: remove this app
superseded by src/templates/module
2018-01-27 00:43:04 +01:00
Beat Küng 761826cc5a posix_sitl_default.cmake: add template module
Just to make sure it's built with CI
2018-01-27 00:43:04 +01:00
Beat Küng 25483faf88 modules: add a new module that serves as template for background tasks 2018-01-27 00:43:04 +01:00
ChristophTobler a63fce86d4 rcs: mention wifi mapping on v4 2018-01-27 00:41:44 +01:00
ChristophTobler 5cfe0e9a0f rcS: update comment on mavlink for FMUv4
Comment was a contradiction
2018-01-27 00:41:44 +01:00
PX4 Jenkins ca6d8fefd8 Update sitl_gazebo submodule Fri Jan 26 14:19:36 CST 2018 2018-01-26 15:41:49 -05:00
Julian Oes 757f0e7334 mavlink_mission: straightaway send item again
Instead of using a timeout to resend a mission item, we should directly
send the mission request again. This is needed because we removed the
automatic resending which lead to troubles.
2018-01-25 15:31:40 +01:00
Julian Oes d5219c8bc0 mavlink_mission: answer with mission NACKs
if anything doesn't go according to protocol we should not just throw
warnings but actually tell the ground station with a mission nack.
2018-01-25 15:31:40 +01:00
Julian Oes e43cc9a9c1 mavlink_mission: send request again if unsupported
When we receive a MAV_MISSION_UNSUPPORTED, we should try to send a
mission request again with or without int mode.
2018-01-25 15:31:40 +01:00
Julian Oes ffc7f37f12 mavlink_mission: don't retransmit automatically
This is an attempt to fix mission upload and download with QGC on a
lossy link. The way it should work according to the protocol on
https://mavlink.io/en/protocol/mission.html is that in general
the ground station should be concerned about timeouts and
retransmission. This means the autopilot does not need to retransmit by
itself but just answer requests.

This seems like it would make the transfer less robust, however, it
actually resolves an edge case where QGC fails to make requests because
it gets spammed by the autopilot and keeps resetting the timeout.
2018-01-25 15:31:40 +01:00
Nicolas de Palezieux bc3577bd60 mission_block: do relative alt correction for correct nav_cmd 2018-01-25 15:27:55 +01:00
Nicolas de Palezieux 0266ca9845 commander: fix indentation 2018-01-25 15:27:55 +01:00
DonLakeFlyer 342509b3ab New ROI commands implementation 2018-01-25 15:27:55 +01:00
Nicolas de Palezieux ae52f74e78 landing target estimator: initialize landing target velocity with negative of vehicle velocity 2018-01-24 19:39:30 +01:00
Nicolas de Palezieux b7dff95782 landing target estimator: check validity of the correct data before computing acceleration 2018-01-24 19:39:30 +01:00
Daniel Agar c0615c9e70 logger add safety 2018-01-24 17:36:53 +01:00
Daniel Agar 2ae5e575a5 land detector initialize landed and publish periodically 2018-01-24 17:36:53 +01:00
Daniel Agar fd3f59d8c4 commander publish periodic status messages at 1 Hz 2018-01-24 17:36:53 +01:00
Daniel Agar edf178d4e8 commander safety update require successful orb_copy 2018-01-24 17:36:53 +01:00
PX4 Jenkins 9a32ca2307 Update sitl_gazebo submodule Wed Jan 24 00:19:13 UTC 2018 2018-01-24 08:27:49 +01:00
Nicolas de Palezieux 0fd043af01 vmount: compute gimbal yaw setpoint relative to vehicle yaw 2018-01-22 15:56:42 +01:00
Lorenz Meier d8164377a8 Navigator: Move mission param into mission params
This is important for the compile scope.
2018-01-22 15:56:42 +01:00
Nicolas de Palezieux 7ae3884944 heading towards ROI: do not require setting the MIS_YAWMODE param to enable multicopters yawing towards ROIs
ROI yaw control: configure yawing capability of mount in vmount parameters.
If configured that mount has no yaw control, vehicle will yaw towards ROI, irrespective of MIS_YAWMODE.
Vehicle will behave according to MIS_YAWMODE when there is no ROI.
2018-01-22 15:56:42 +01:00
Nicolas de Palezieux add3692357 ROI: accept ROIs of type None in missions to enable 'deactivating' another ROI 2018-01-22 15:56:42 +01:00
Nicolas de Palezieux bedaafcc20 NAV_CMD_DO_SET_ROI: handle relative altitude in mission ROI commands 2018-01-22 15:56:42 +01:00
PX4 Jenkins 9d18fc8787 Update mavlink v2.0 submodule Mon Jan 22 01:43:26 CST 2018 2018-01-22 09:53:33 -05:00
Beat Küng 99c9e09624 vmount mavlink input: continue to poll for vehicle_command until reaching the timeout
or receiving a command that we need to handle. This makes sure that we
don't drop commands, when the output mode is set to mavlink (in that case
the input topic is rate-limited, and each input change results in a
vehicle_command publication, which results in queueing up orb items if we
get vehicle_commands from other sources too).
2018-01-21 15:41:30 +01:00
Beat Küng 5a189f3c4a vmount mavlink input: rate-limit vehicle_command topic 2018-01-21 15:41:30 +01:00
Beat Küng 48edaa7ef6 vmount: remove output rate-limiting
It causes missed input changes.
This reverts 73d23742ea.
2018-01-21 15:41:30 +01:00
Beat Küng 5e826eaa27 Revert "vmount: fix new input getting lost in throttling"
This reverts commit b7404ad6c1.
2018-01-21 15:41:30 +01:00
Jonas Vautherin 38c949731f mavlink_main: fix broadcast computation
The way the broadcast IP is currently fetched is by sending an ioctl()
request. The limitation of this is that the broadcast address may not
be set on the network interface (more specifically, it is usually not
set in docker containers). In those cases, it results in the broadcast
address becoming 0.0.0.0, which is not valid [1].

This fix uses the network IP and the netmask to compute the directed
broadcast address. This should be more reliable, as both of those are
always set on the network interface.

[1]: https://tools.ietf.org/html/rfc1122, section 3.2.1.3 (a)
2018-01-21 14:58:04 +01:00
Matthias Grob 463217a5f9 Cygwin: repair NuttX build (#8737)
* Cygwin: repaired NuttX build after 1f63d85869
all the NuttX specific WINTOOL define handling was skiped in cmake Make.defs generation
The Nuttx build is makfile based and needs its cygwin treatment

Additionally the ${PX4_SOURCE_DIR}/src/include which was added through cmake needs path conversion

The two root causes for the special handling are:
- ARM GCC for Windows doesn't support cygwin paths passed as an argument
  so they need to be either relative or converted via cypath tool
- Symbolic links are totally different under Windows and because NuttX uses them extensively
  it has special handling scripts that need to be fed with the correct defines

* Cygwin: NuttX include paths all converted in Make.defs.in

differentiate between WINTOOL define (MSYS & cygwin) and cygwin using uname command:
- MSYS needs symbolic link handling for ARM GCC but no path conversion
- Cygwin needs both
2018-01-20 23:26:12 -05:00
Beat Küng 45458fe9eb uORBManager: add comment about not having to set the priority 2018-01-19 14:11:01 +01:00
Beat Küng 2cb698f01f uORBDevices: set the priority when advertising a node that's already subscribed
This fixes the case where a topic instance is already subscribed, and
advertised later. The subscriber will create the DeviceNode with default
priority, and the advertiser will just use the existing DeviceNode,
without updating to the requested priority.
2018-01-19 14:11:01 +01:00
Simone Guscetti c8a1050323 libled: allow infinite flashing mode 2018-01-19 11:55:39 +01:00
Daniel Agar bda929bebb commander fix hil_state regression again 2018-01-18 17:38:48 +01:00
Julian Oes b7404ad6c1 vmount: fix new input getting lost in throttling
This fixes the case where a new gimbal input gets lost in the output
throttling.

This is required because an input is potentially set only once and
then not computed again. In the failure case, control_data is set
to nullptr in subsequent calls and therefore not used for the output
calculation ever.
2018-01-18 11:09:17 +01:00
Julian Oes b468551b6c vmount: remove mavlink dependency
Let's just hardcode 0 because we don't want to include the mavlink
headers just for this.
2018-01-18 11:09:17 +01:00
Julian Oes 3adb389b7c vmount: don't ignore commands to all component ids
This resolves the case where a gimbal command assembled by
QGroundControl is rejected because the component id is set to 0 (for
all) and the component id of the vehicle is e.g. 1.
2018-01-18 11:09:17 +01:00
Anthony Lamping 85ba160757 CI: improve mavros SITL tests logging (#8714)
* add more logging to help with #8556
* log subscribed topics on mission start and test exit (pass or fail)
* use mavlink enums everywhere to avoid maintaining dictionary mappings and to have readable values
* log when the FCU advances to next mission item without satisfying the position reached offset/radius
* some renaming for readability
* log more state value changes (connected and MAV_STATUS)
2018-01-17 17:54:32 -05:00
TSC21 821eb5ac87 navigator: precland_params: PLD_MAX_SRCH: fix min value from float to int 2018-01-17 17:52:24 -05:00
TSC21 ae65289967 lpe: params: fix LPE_FUSION max value 2018-01-17 17:52:24 -05:00
PX4 Jenkins 850678b0a6 Update mavlink v2.0 submodule Wed Jan 17 07:43:11 UTC 2018 2018-01-17 05:45:00 -05:00
Beat Küng e11008f30e px_uploader: minor text message update 2018-01-17 10:14:04 +01:00
ritul jasuja fed06955bc Update debug message as per connection link 2018-01-17 10:10:33 +01:00
Beat Küng f672152d2d logger: change 'removing log directory' warning to info 2018-01-17 02:19:01 -05:00
Beat Küng a329fd4c76 SITL configs: set SDLOG_DIRS_MAX to 7
Avoids ending up with huge log directories.

plus some param alphabetic reordering
2018-01-17 02:19:01 -05:00
Julien Lecoeur b7d7d1209b px_generate_mixers.py: scale mixer so that sum(z_thrust_scale)==n_rotors 2018-01-17 00:01:00 -05:00
Julien Lecoeur 262d9c790b MultirotorMixer: Apply thrust gain independently from other axes
Align the way motor output is computed with the model used in the mixer generation script.
previous:
`out = (roll_gain*roll + pitch_gain*pitch + yaw_gain*yaw + thrust)*out_gain`
new:
`out = roll_gain*roll + pitch_gain*pitch + yaw_gain*yaw + thrust_gain*thrust`
which is the standard matrix*vector multiplication.

This commit has 0 effect on symmetric platforms (i.e. most) as thrust_gain==1 on these platforms.
On asymmetric platform --where some thrust_gain are lower than 1-- the previous formulation resulted in coupling between thrust and other axes.

fixes #8628
2018-01-17 00:01:00 -05:00
Daniel Agar 0e3574c44f hott automatically include hott_sensors and hott_telemetry 2018-01-16 23:46:45 -05:00
Daniel Agar c20594cd0e move all barometers to the same folder 2018-01-16 23:46:45 -05:00
Daniel Agar bad813e911 move all magnetometers to the same folder 2018-01-16 23:46:45 -05:00
Beat Küng 094fa92de0 posix main shell: do not update the prompt for unprintable chars (#8704) 2018-01-16 23:45:28 -05:00
Julien Lecoeur 0e65753568 Iris: set mixer to quad_wide
The geometry was previously quad_deadcat in which front motors are closer to CG and thus more loaded in hover.
quad_wide is the same geometry as quad_deadcat except the CG is centered so all motors are loaded equally.
Flight logs on IRIS with deadcat mixer showed that
- all motors are equally loaded during hover (actuator_outputs 0 to 3 have similar values)
- a negative pitch offset is building up soon after takeoff (visible in actuator_controls)
2018-01-16 16:09:15 +01:00
Simon Laube b184b61457 IO: fix px4io uploader to work reliably on F7 platform.
- Missing get_sync() in verify function
- Allow some time to reboot before closing the serial port
  (closing the serial port drives TX low)
2018-01-16 08:36:51 +01:00
Simon Laube 53249c53b5 IO: Move buffer allocation into the architecture dependent code files. 2018-01-16 08:36:51 +01:00
Daniel Agar cc5e00feca px4io_serial_f7 fix style 2018-01-16 08:36:51 +01:00
Lorenz Meier 15a69b881d Enable IO image buildig for FMUv5 2018-01-16 08:36:51 +01:00
Simon Laube c6c9f4dc64 IO: Implement serial driver for STM32F7 MCUs. 2018-01-16 08:36:51 +01:00
Simon Laube a26c3a0530 IO: Split STM32F4 specific code for serial interface. 2018-01-16 08:36:51 +01:00
David Sidrane e5317ed9b6 px4fmu-v5: Define UART7 for PX4IO 2018-01-16 08:36:51 +01:00
David Sidrane 2df5d23ab6 px4fmu-v5:Add px4io 2018-01-16 08:36:51 +01:00
PX4 Jenkins 49c838ffeb Update sitl_gazebo submodule Mon Jan 15 18:19:28 CST 2018 2018-01-15 19:53:36 -05:00
Daniel Agar 67f89f51ff move all distance sensor drivers to the same folder 2018-01-15 14:34:02 -05:00
Daniel Agar 576b42fea3 move all differential pressure drivers to the same folder 2018-01-15 14:34:02 -05:00
ChristophTobler 6d3dda2802 update DriverFramework to get ltc2946 fix (#8693) 2018-01-15 14:33:22 -05:00
Daniel Agar 5ab6834fed NuttX Make.defs.in ignore -Werror=logical-op
This is a temporary workaround for equal expressions in chip/sam_xdmac.c
and can be reverted once fixed properly in NuttX. Needed for the GCC 7
upgrade in #8551.
2018-01-15 12:57:29 -05:00
Daniel Agar 9b5ae1ef7a NuttX upgrade default compiler to GCC 7 2018-01-15 12:57:29 -05:00
Daniel Agar cd296c5f88 circleci skip astyle until versioning is resolved (#8691)
- revert after #8689 is resolved
2018-01-15 12:23:21 -05:00
ChristophTobler 18b83f2960 eagle posix-config: add sleep after muorb
without this param set doesn't work -> adsp side never receives changes
2018-01-15 14:21:27 +01:00
ChristophTobler 872cba12d4 update ecl submodule 2018-01-15 11:11:56 +01:00
ChristophTobler 3a52e7ee5d simulator mavlink: set vision pos/val valid 2018-01-15 11:11:56 +01:00
ChristophTobler 66c67f89e6 ekf2: check if vision_position pos/vel are valid before using them 2018-01-15 11:11:56 +01:00
ChristophTobler 6609e4843b mavlink receiver: set vision_position pos/vel invalid depending on covariance 2018-01-15 11:11:56 +01:00
ChristophTobler c7cf442e16 ekf2: use ev eph/v for noise parameter if bigger than noise param 2018-01-15 11:11:56 +01:00
Beat Küng 1d59d89282 posix-config iris_replay: log until SITL exits
If a log with multiple (dis)arming events was replayed, multiple logs were
created. This changes the replay to only create a single log.
2018-01-15 10:27:56 +01:00
Nicolas de Palezieux 45fd908784 mavlink : add support for precision landing 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux 4fecb6fe20 irlock : add support for precision landing 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux 155c55814b cmake configs : Add precision landing support 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux 90e3aeda6c logger : add support for logging precision landing messages 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux f2dbb0ad3b commander : add support for precision landing measurements 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux d9b9b4407a ekf2 : add support for precision landing measurement fusion 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux dd1d0adfef LPE : add support for precision landing measurement fusion 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux 8c0542bdb8 msgs : add support for precision landing 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux f600cfbb9f Add support for testing precision landing in SITL simulation 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux d9221bb8d2 mc_pos_control : add support for precision landing 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux aa4c6c038d navigator : add support for precision landing 2018-01-15 10:27:23 +01:00
Nicolas de Palezieux 652d295b2d Add landing_target_estimator for precision landing from @ndepal 2018-01-15 10:27:23 +01:00
Paul Riseborough b2046ffd6b Tools: fix errors in thermal calibration script 2018-01-15 08:38:54 +01:00
Anthony Lamping d375880c4b improve mavros SITL tests (#8652)
-created a test base class to centralize redundant methods among the different tests
-added mission waypoint list topic listener (this also helps make sure the simulation is ready)
-check number of mission waypoints in FCU against mission
-increase time for mavros topics to be ready from 30 to 60 seconds
-reduce position check loop rates
-clean up logging
-support QGC plan for mission file format, see #8619
-vehicle is an arg for mission test launch file, working toward other airframes
-Jenkins: fix vtol vehicle arg value
-get MAV_TYPE param and use FW radius for pure fixed-wing mission position check
-remove unused vehicle arg from test in multiple tests launch, clearing runtime warning
2018-01-14 21:13:45 -05:00
Lorenz Meier e970f3a2a0 MAVLink: Update library submodule
This brings in new ROI commands and general sync.
2018-01-14 22:53:05 +01:00
TSC21 ec1c37e1af modules: lpe: push sensor status update to object; prioritize lidar readings over sonar 2018-01-14 22:52:41 +01:00
TSC21 b512759336 modules: lpe: refactor fusion bitmask 2018-01-14 22:52:41 +01:00
Lorenz Meier 1c74887a68 Makefile: Fix CLANG-tidy calls
The calls have not been updated as the CI target has been.
2018-01-14 13:28:12 +01:00
ChristophTobler 9ac70ff639 update DriverFramework submodule to include LTC2946 driver 2018-01-14 12:56:49 +01:00
ChristophTobler 7c019b7da3 publish battery_status directly
This is temporary until there is a solution that works for adc and posix power modules
2018-01-14 12:56:49 +01:00
ChristophTobler 856a523d29 add snapdragon power module (ltc2946) to eagle flight 2018-01-14 12:56:49 +01:00
ChristophTobler 4b751bdc4f add wrapper for snapdragon power module (ltc2946) from DriverFramework 2018-01-14 12:56:49 +01:00
stmoon 8b3ea27bb3 correct coding style 2018-01-14 12:55:47 +01:00
stmoon eec1ead233 update description of LPE_FUSION 2018-01-14 12:55:47 +01:00
stmoon 28a5287a91 add FUSE_MOCAP, FUSE_LIDAR, and FUSE_SONAR to select more senors 2018-01-14 12:55:47 +01:00
Daniel Agar b524c8a20f navigator silence geofence update PX4_INFO 2018-01-14 12:53:53 +01:00
Daniel Agar 6e0f3ffa88 commander move mission init out of main loop 2018-01-14 12:53:53 +01:00
Daniel Agar fe6006e22f commander move mission_result to class 2018-01-14 12:53:53 +01:00
Daniel Agar f49c061a3c navigator fix mission_result increment and sign mismatch 2018-01-14 12:53:53 +01:00
Daniel Agar b1a3475ebf commander mission valid check require updated mission_result 2018-01-14 12:53:53 +01:00
Daniel Agar 916d6a15fd Mission merge offboard + onboard and simplify 2018-01-14 12:53:53 +01:00
Daniel Agar 956935141e Navigator simplify mission 2018-01-14 12:53:53 +01:00
Daniel Agar 25c7a03a8b Navigator remove unnecessary calls to updateParams
- the SuperBlock already does this
2018-01-14 12:53:53 +01:00
Lorenz Meier 6227139df1 MAVLink app: Make debug messages a compile time check
The debug messages are too verbose to be run in a production vehicle and inherently were something that should only be run in SITL / debug sessions on hardware. Switching the flag to the PX4_DEBUG() macro does not only make this more explicit, but also saves a lot of flash space that otherwise was consumed by the strings.
2018-01-13 22:02:57 -05:00
Lorenz Meier f1a3fd09a3 Iridium SBD: Make debug messages a compile-time flag
This ensures that users do not accidentally enable this in an airborne system and saves flash space.
2018-01-13 22:02:57 -05:00
Lorenz Meier bc487c7c36 Iridium: Remove lengthy test content
And also format file according to code style.
2018-01-13 22:02:57 -05:00
PX4 Jenkins be4be6db2c Update jmavsim submodule Sat Jan 13 10:15:05 CST 2018 2018-01-13 11:16:11 -05:00
Matthias Grob 931482941c mc_pos_control: use global _dt member from the control block architecture 2018-01-13 13:08:47 +01:00
Daniel Agar a25ca0c37d param include px4_config.h for FLASH_BASED_PARAMS
- fixes #8585
2018-01-12 23:46:15 +01:00
Daniel Agar 7b1b255158 EKF2 set zero unused estimator_status fields 2018-01-12 23:19:46 +01:00
Beat Küng f47d0c8f8c load_mon: reduce FDS_LOW_WARNING_THRESHOLD to 3
This bound can be quite tight, because:
- The system still behaves well, even if all FD's are used (as opposed to
  a stack overflow)
- The amount of used FD's is typically only increased one at a time
  (e.g. adding new logged topics, adding a mavlink stream, ...)
- reducing CONFIG_NFILE_DESCRIPTORS to the minimum frees up a considerable
  amount of RAM on systems that need it
2018-01-12 23:18:59 +01:00
Beat Küng 794c7a5a0f load_mon: fix tasks index & fds_free initialization
Makes sure that if CONFIG_NFILE_DESCRIPTORS == 0, no warning is printed.
2018-01-12 23:18:59 +01:00
Lorenz Meier eb43b86a4b Load mon: Also monitor file descriptors
It is important that tasks do not run out of them and this addition will provide a warning and log evidence if it goes wrong.
2018-01-12 23:18:59 +01:00
Daniel Agar 1037e983ab LidarLite port to raspberrypi (#8633) 2018-01-12 16:20:00 -05:00
Beat Küng 86e2f9c306 posix shell: handle Home & End (Editing keys)
See https://github.com/mintty/mintty/wiki/Keycodes#editing-keys
2018-01-12 16:18:44 +01:00
ChristophTobler dfe1b59949 posix main: add Home/End to jump to beginning/end 2018-01-12 16:18:44 +01:00
ChristophTobler d523cb54a5 posix main: add left/right arrow
with this commit, lines can be edited with the lef/right arrow key
2018-01-12 16:18:44 +01:00
Daniel Agar 137a2444a8 VTOL standard respect VT_ELEV_MC_LOCK 2018-01-11 16:18:47 -05:00
Daniel Agar 2756c76613 mixer lib delete old multi_tables.py and cleanup cmake (#8658) 2018-01-11 15:56:15 -05:00
Matthias Grob 385212f2c1 Simulator: virtual battery drain stops by default at 50% to avoid failing preflight checks to take off again
also added comments and removed throttle compensation because there is no real battery emulation with load drop
2018-01-11 08:36:03 +01:00
Matthias Grob 8c998c1309 Battery: enhanced voltage, capacity estimate fusion, set empty voltage to a useful value for reasonable lipo usage 2018-01-11 08:36:03 +01:00
Matthias Grob 919b6ae239 Battery added proper initialization for the capacity voltage fusion and doubled the time constant 2018-01-11 08:36:03 +01:00
Matthias Grob 663913a1dc Battery: added simple fusion of capacity based estimate and voltage based estimate 2018-01-11 08:36:03 +01:00
Matthias Grob 823d423456 Battery: refactor current integration to be easier understandable 2018-01-11 08:36:03 +01:00
Matthias Grob 9fbd6b912d Battery: adapt output constraints to possible values, only calculate remaining capacity if capacity is configured 2018-01-11 08:36:03 +01:00
Matthias Grob 60cc132c8a Battery: refactor _param out of the variable names and use 0.f for zero floats to make code more readable 2018-01-11 08:36:03 +01:00
Matthias Grob 90b326f3b5 Battery: get rid of the duplicate filtering, just use the already existing methods 2018-01-11 08:36:03 +01:00
Matthias Grob 101aeadf03 Battery: revised voltage drop calculation to fit the new simpler easier to verify estimation 2018-01-11 08:36:03 +01:00
Matthias Grob 52e2aecaf1 Battery: simplify linear voltage relation, currently neglecting the real world voltage drop under load 2018-01-11 08:36:03 +01:00
Matthias Grob bc15fdf267 Simulator: virtual battery drain simplified and stops when battery is exactly empty
it's a lot more readable and battery draining stops exactly at the empty battery voltage which makes debuging easier because it's directly predicatable
2018-01-11 08:36:03 +01:00
Beat Küng f561d16334 fix param_export: off-by-one buffer size
In rare circumstances, the buffer size was too small by 1 byte, leading
to a param export failure. And leading to a reset of all params!
This could only happen when the last saved param was a float.

Also the realloc_ok initialization is not needed.
2018-01-10 22:03:14 +01:00
Beat Küng f8ceee0cf2 fix param: need to use fsync() and not px4_fsync()
It's used with real OS FD's.
2018-01-10 22:03:14 +01:00
Beat Küng f962e9826b param_export: reduce bson buffer size from 512 to 256
Some modules call this (and maybe in rare circumstances), which could lead
to stack overflows. With our current headroom of >= 300bytes, 256 should
be ok.

This increases the export time from ~28ms to ~34ms in my case (on a
Pixracer)
2018-01-10 22:03:14 +01:00
PX4 Jenkins ee9853a3d6 Update sitl_gazebo submodule Tue Jan 9 18:19:31 CST 2018 2018-01-10 17:57:21 +01:00
Beat Küng 5fe203a510 rcS: cleanup defaults for SYS_FMU_TASK & FMUv5 params
- SYS_FMU_TASK is now enabled for PX4FMU_V4 PX4FMU_V4PRO PX4FMU_V5, but
  it's only set on autoconf
- v5 companion is now TELEM2 (same as all other boards)
2018-01-10 07:59:32 +01:00
Beat Küng 48a6a98071 rcS: merge 'ver hwcmp' for different boards, add V5 to px4flow 2018-01-10 07:59:32 +01:00
Beat Küng 92a667fca5 rc.sensors: document sensors for NXPhlite 2018-01-10 07:59:32 +01:00
Beat Küng a56d2ab981 rc.interface: merge 'ver hwcmp' for different boards 2018-01-10 07:59:32 +01:00
Beat Küng dac2a93ea2 logger: add sensor_combined at full rate to high rate profile
useful in case the ekf replay topics are not enabled
2018-01-10 07:59:32 +01:00
PX4 Jenkins 0ead55d38a Update mavlink v2.0 submodule Tue Jan 9 03:08:35 EST 2018 2018-01-09 13:05:39 -05:00
Daniel Agar bdfb291026 Jenkins make distclean instead of clean only 2018-01-09 13:05:08 -05:00
Daniel Agar 82f661b37f Makefile distclean deinit all submodules 2018-01-09 13:05:08 -05:00
Huang 60eb1c2262 mc_pos_control: delete the unused variable 2018-01-09 10:03:44 +01:00
Daniel Agar 2cccbee0d5 runway_takeoff use BlockParamBool for RWTO_TKOFF 2018-01-09 09:11:39 +01:00
Daniel Agar 3d7afaafbd launchdetection use BlockParamBool for LAUN_ALL_ON 2018-01-09 09:11:39 +01:00
Daniel Agar a9bbbdce82 controllib add BlockParamBool (int32 wrapper) 2018-01-09 09:11:39 +01:00
Daniel Agar a02cd869c3 mavlink receiver remove unnecessary rates setpoint class member 2018-01-09 01:01:53 -05:00
Daniel Agar fe22b856d6 mavlink receiver remove unnecessary attitude setpoint class member 2018-01-09 01:01:53 -05:00
Daniel Agar cf2d794da9 Subscription remove unused instance class member 2018-01-09 00:48:54 -05:00
Daniel Agar 8fdcdedc84 Publication remove unused instance class member 2018-01-09 00:48:54 -05:00
Lorenz Meier 3d9cd5c0bc Params: Ignore volatile 2018-01-08 17:01:02 +01:00
Lorenz Meier 48af6b6d61 System: Mark reset state param as volatile 2018-01-08 09:27:22 +01:00
Lorenz Meier 5a0e4c137e Tools: Simplify QGC meta sync script using the makefile tools 2018-01-08 09:27:22 +01:00
Lorenz Meier 1739deb517 Makefile: Fix missing params by searching one level deeper
This is required for generating documentation
2018-01-08 09:27:22 +01:00
Lorenz Meier 501dd82aaf Systemlib: Move circuit breaker into Developer category 2018-01-08 09:27:22 +01:00
Lorenz Meier 115288301e INAV: Move circuit breaker to Developer category 2018-01-08 09:27:22 +01:00
Lorenz Meier 487530f791 Use SITL as metadata build validation target
This allows to build all params and test them.
2018-01-08 09:27:22 +01:00
Lorenz Meier d6a2002505 Sensors: Update param metadata
This hides these parameters by default from the user.
2018-01-08 09:27:22 +01:00
Lorenz Meier b07deed6c6 Land detector: Update param metadata
This helps with param transfers and will hide these params by default from the user.
2018-01-08 09:27:22 +01:00
Lorenz Meier 73348b6c4e EKF2: Update param metadata 2018-01-08 09:27:22 +01:00
Lorenz Meier a0c312fcbd Commander: Update param metadata 2018-01-08 09:27:22 +01:00
Lorenz Meier 7f12f4ae9b Params: Switch level to category and move it to attribute along with volatile
This makes it easier for QGC to parse.
2018-01-08 09:27:22 +01:00
Lorenz Meier 55e0588661 Eagle: Update to latest param message 2018-01-08 09:27:22 +01:00
Lorenz Meier ac5f856d2d Param parser and XML output: Add support for volatile attribute
This allows to mark parameters as volatile.
2018-01-08 09:27:22 +01:00
Lorenz Meier 27e64149f0 MAVLink app: Avoid comparing to zero for value change
No functional change, but this avoids numerical issues in the check routine. Since the routine will tend to false positives, we will tend to send more param updates than required in case of numerical noise of the float representation. This is desired, as we prefer to send two updates rather than not sending one.
2018-01-08 09:27:22 +01:00
Lorenz Meier 7695f79239 Parameters: Add support for volatile parameters
Volatile parameters are ones that do not represent a fundamental configuration change but rather than incrementally changing settings. These include logged flight hours or sensor offsets. Marking them as volatile avoids these parameters forcing time-consuming telemetry updates.
2018-01-08 09:27:22 +01:00
Lorenz Meier f284385c3f MAVLink parameters: Send all updated parameters asynchronously
Parameters can change not just based on GCS request, but also due to internal code or requests by a different valid connected control authority such a cloud service. This change ensures that all connected systems get updated via MAVLink asynchronously.
2018-01-08 09:27:22 +01:00
Lorenz Meier 2170e7eba0 MAVLink main: Only update internal parameters
All param handling happens in the param manager.
2018-01-08 09:27:22 +01:00
Lorenz Meier 7888acf087 Reboot command: Documentation fix
Pure comment edit
2018-01-08 09:27:22 +01:00
Lorenz Meier fb3c58d85f Param interface: Publish instance count
This helps subscribers to understand if they should update their parameters or not. We will extend this with other flags such as the current save status and alike.
2018-01-08 09:27:22 +01:00
Lorenz Meier 413b161250 Logger: Style cleanup and comments 2018-01-08 09:27:22 +01:00
Lorenz Meier fba592b5fc MAVLink app: Send newest param hash for every param change to notify GCS about change
This should help keeping the GCS up to date about asynchronous changes on the autopilot.
2018-01-08 09:27:22 +01:00
Lorenz Meier ca0267b4e9 EKF: Add required flags to parameters
This marks the learned bias parameters as volatile (as they change in flight without external configuration) and marks them as system level, which should hide them by default from the UI
2018-01-08 09:27:22 +01:00
Lorenz Meier bf48a35882 Systemlib: Introduce volatile and level tags for parameters 2018-01-08 09:27:22 +01:00
Lorenz Meier 4eac493413 MAVLink app: Remove deprecation support for old param
This has been out of use for more than a year now and is no longer required.
2018-01-08 09:27:22 +01:00
Daniel Agar 3c669a4f30 commander ekf2Check respect reportFailures (#8622)
- fixes #8621
2018-01-08 03:07:48 -05:00
Daniel Agar 992db1f415 delete snapdragon_rc_pwm and passthrough config 2018-01-08 03:07:10 -05:00
Daniel Agar fd7d4156fd delete pwm_out_rc_in 2018-01-08 03:07:10 -05:00
Daniel Agar bb35f75bbf delete mavlink v1.0 submodule 2018-01-08 03:07:10 -05:00
Anthony Lamping 4b4b181e7c Jenkins: rename rostest xml logs to match mission (#8616)
two xml log files are generated for each rostest. they're named according to the launch file, which is reused for each mission test. currently subsequent tests overwrite the previous test's logs. this renames them after they're generated, appending the mission name to the end of the file name.
2018-01-07 16:05:52 -05:00
yinjiajie adfa795b79 polyfit.hpp : modify xn to xm 2018-01-07 20:44:52 +01:00
yinjiajie 42b4156bae polyfit.hpp : modify n to m+1 2018-01-07 20:44:52 +01:00
stmoon 3e0b8b7016 remove unnecessary codes and follow code style 2018-01-06 15:21:17 +01:00
stmoon 447aa134db change mavlink version (1.0->2.0) for simulation 2018-01-06 15:21:17 +01:00
Lorenz Meier 50bd148f53 Aero: Update maintainer 2018-01-06 12:19:31 +01:00
Lorenz Meier ea545f2813 ROMFS: Exclude FMUv2 in Stampede 2018-01-06 11:35:53 +01:00
Lorenz Meier 6213b2266b ROMFS: Exclude FMUv2 in Axial Racing 2018-01-06 11:35:53 +01:00
Lorenz Meier f79c3bb5ea ROMFS: Exclude FMUv2 in ground vehicle 2018-01-06 11:35:53 +01:00
Lorenz Meier 25141ce184 ROMFS: Exclude FMUv2 in obscure airframe 2018-01-06 11:35:53 +01:00
Lorenz Meier 1930cc2fbe ROMFS: Exclude FMUv2 in VTOL 2018-01-06 11:35:53 +01:00
Lorenz Meier 90e7ce1b96 ROMFS: Remove reference to non-existent board 2018-01-06 11:35:53 +01:00
Lorenz Meier 1cfb441527 ROMFS: Reduce verbosity level 2018-01-06 11:35:53 +01:00
Lorenz Meier 59f56f4a5b Add support for Pixhack detection
This allows to boot a Pixhack 3.0 which is the same as Pixhawk 2.0 / 2.1
2018-01-06 11:35:53 +01:00
Lorenz Meier 01e1bac365 FMUv2: Fix Pixhawk Mini boards while hopefully retaining HK Pixhawk units. 2018-01-06 11:35:53 +01:00
Lorenz Meier 0cd24874f3 MPU6K: Provide more clear output which buses are being probed 2018-01-06 11:35:53 +01:00
Lorenz Meier 8c647f11d0 Revert "Revert "Fix for HobbyKing boards.""
This reverts commit b7189012dc.
2018-01-06 11:35:53 +01:00
Daniel Agar 37e3234e49 Jenkins uorb graphs set docker arguments 2018-01-05 23:20:04 -05:00
Daniel Agar 1f63d85869 NuttX generate Make.defs per config from PX4 cmake (#8573) 2018-01-05 22:47:10 -05:00
Daniel Agar f86d4b18f8 Jenkins generate uorb graphs (#8571) 2018-01-05 17:20:39 -05:00
Lorenz Meier 31ab496f31 ROMFS: Free additional space 2018-01-05 23:03:02 +01:00
Lorenz Meier dd5524da3d Make boot slightly less verbose 2018-01-05 22:45:12 +01:00
Matthias Grob c0c0666d5c Cygwin: use absolute path with cygpath conversion to the linker script again
because the relative path is interpreted differently on linux, mac and windows
2018-01-05 14:47:33 -05:00
Daniel Agar 275f462136 cmake determine relative path for firmware linking 2018-01-05 14:47:33 -05:00
Daniel Agar bf84cf0dcf Cygwin: use relative paths where needed 2018-01-05 14:47:33 -05:00
Matthias Grob be8adbfdf3 Cygwin: refactored & simplified some of the OS define logic 2018-01-05 14:47:33 -05:00
Matthias Grob 2186f7b1b1 Cygwin: Enable ARM build of px4fmu-vX_default under Windows Cygwin Environment 2018-01-05 14:47:33 -05:00
Matthias Grob 70de169f15 Cygwin: Enable build of SITL jMAVsim under Windows using the Cygwin Unix-like environment
Most of the incompatitbilities are luckily similar to the darwin build.
- New target OS __PX4_CYGWIN added because in other build environments on Windows defines will very likely be completely different
- added all necessary exeptions to the defines
- disabled priorities completely because on Windows they are defined 1-32 and with all the arbitrary +40 -40 priority settings there were a lot of problems
  not only did some threads/"virtual tasks" not start because of out of bound priorities but also the resulting scheduling was totally random and inadequate
  with default priorities it ran toally fine during my first tests, should be rethought when windows is used onboard in the future
2018-01-05 14:47:33 -05:00
Daniel Agar 02c4ec9b2a move nuttx-configs to platforms/nuttx 2018-01-05 14:21:31 -05:00
Daniel Agar 62c2fbb443 move Images to platforms/nuttx 2018-01-05 14:21:31 -05:00
Daniel Agar 2dcd617a8f move Debug to platforms/nuttx 2018-01-05 14:21:31 -05:00
Daniel Agar 7178f8416d delete obsolete Vagrantfile 2018-01-05 14:21:31 -05:00
Daniel Agar f2cd5e3e9f move src/firmware/ to platforms 2018-01-05 14:21:31 -05:00
Daniel Agar e5b784736f delete unused cmake/test 2018-01-05 14:21:31 -05:00
Daniel Agar 678e2c415d move cmake/${OS} to platforms 2018-01-05 14:21:31 -05:00
Nuno Marques 3fcffe1f3b Tools: update sitl_gazebo (#8597) 2018-01-05 14:09:31 -05:00
Amir Melzer 51437a89e1 remove coning compensation for the accelerometers (#8594) 2018-01-05 14:08:33 -05:00
Julian Oes 14cc9e9919 mavlink_messages: fix length of NAV_CONTROLLER msg
This was caught in an unrelated review.
2018-01-05 19:53:41 +01:00
ChristophTobler 3ffc1fd25b Stream scaled IMU for Snapdragon Flight using VISLAM
This is temporary (and for Snapdragon Flight + VISLAM only) until there is a proper solution to get unfiltered IMU data for VIOs etc.
2018-01-05 18:45:50 +01:00
Daniel Agar 545f8c4452 RTL optionally use planned mission landing (#8487)
- adds new RTL_LAND_TYPE parameter
2018-01-04 23:42:01 -05:00
Julian Oes f3bd241dbe jMAVSim: update to latest master
This brings some support for mavlink 2, and various other bugfixes.
2018-01-04 21:27:16 +01:00
Daniel Agar 430cdada60 param_export use bson encoder buffer 2018-01-04 09:21:17 +01:00
Daniel Agar 08443c0bfc params add param_find perf counter 2018-01-04 09:21:17 +01:00
Daniel Agar ec65ff7c5e sensors remove unnecessary param set notification 2018-01-04 09:21:17 +01:00
Daniel Agar 627788c93c mavlink remove unnecessary param set notification 2018-01-04 09:21:17 +01:00
Daniel Agar 2bb4644180 camera_trigger remove unnecessary param set notification 2018-01-04 09:21:17 +01:00
Daniel Agar 45441d62b1 sensors thermal calibration only get params if enabled 2018-01-04 09:21:17 +01:00
Daniel Agar 7af3cb9df8 param group "Sensors Thermal Calibration" shorten 2018-01-04 09:21:17 +01:00
Daniel Agar f87402b16c navigator remove redundant param updates 2018-01-04 09:21:17 +01:00
Daniel Agar 49180de27c commander remove continuous param_get in arm_auth_update 2018-01-04 09:21:17 +01:00
Daniel Agar 641129ad4e param add perf counters 2018-01-04 09:21:17 +01:00
keenanjohnson c8590e0fb1 Main Readme: Spelling correction
Signed-off-by: keenanjohnson <keenan.johnson@gmail.com>
2018-01-03 12:06:35 -05:00
Daniel Agar c7b5a6f463 FW delete unused yaw coordination parameters 2018-01-03 16:28:50 +01:00
Daniel Agar 757d905089 FW improve FW_ARSP_MODE metadata options
- fixes #8563
2018-01-03 08:18:22 +01:00
CarlOlsson 1cd0ca9c6c updated ecl 2018-01-02 22:36:42 +01:00
Paul Riseborough 96d04af6e8 ecl: adds sideslip to innovation test status reporting 2018-01-02 22:36:42 +01:00
CarlOlsson 84d7eb2900 ekf2: added beta test ratio to estimator_status
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2018-01-02 22:36:42 +01:00
Daniel Agar 573fbeda04 Jenkins add flight review email for failures 2018-01-02 16:00:35 -05:00
Daniel Agar 14e8ee75e7 Jenkins ROS tests fetch all git tags for correct version reporting 2018-01-02 16:00:35 -05:00
Daniel Agar 5af4704aac Jenkins ROS tests set CI=true and set CCACHE_BASEDIR 2018-01-02 12:25:10 -05:00
Lorenz Meier 1f4bad0624 MAVLink: Harden home position usage
This should ensure that the home position / altitude is only being used when valid.
2018-01-02 16:52:10 +01:00
Daniel Agar d67cbfba3a Jenkins add descriptions to flight review post 2018-01-02 10:38:12 -05:00
Daniel Agar 5db534849a Jenkins ROS tests archive all failure logs 2018-01-02 10:38:12 -05:00
Daniel Agar 4d08f56fae cmake add missing generate_px4muorb_stubs dependency (#8559) 2018-01-02 10:18:00 -05:00
Lorenz Meier 92540fc6d8 IO: Remove hint that parameter change requires reboot
The change is effective immediately so no reboot is required. This makes the whole configuration a lot easier.
2018-01-02 10:48:09 +01:00
Lorenz Meier f4362c5ae5 FMU: Remove hint that parameter change requires reboot
The change is effective immediately so no reboot is required. This makes the whole configuration a lot easier.
2018-01-02 10:47:38 +01:00
Daniel Agar b8e6fc2730 Makefile tests_coverage run ROS tests 2018-01-02 01:35:57 +01:00
Daniel Agar 6bdc18df6d sitl launch default ekf2 everywhere 2018-01-02 01:35:57 +01:00
Daniel Agar 734a6c8a42 Jenkins update mission test naming 2018-01-02 01:35:57 +01:00
Daniel Agar cd60fb6102 ledsim remove debug print 2018-01-02 01:35:57 +01:00
Daniel Agar e9960b5532 Jenkins add title and url for flight review upload 2018-01-02 01:35:57 +01:00
Daniel Agar 202c29154a simulator optimize GPS and battery
- GPS and battery were publishing at > 800Hz
2018-01-02 01:35:57 +01:00
Daniel Agar 66f614435f vtol_att avoid unnecessary work and delete unused 2018-01-02 01:35:57 +01:00
Daniel Agar d3a220f807 vtol_att only set fw_permanent_stab on param change 2018-01-02 01:35:57 +01:00
Daniel Agar 75e4a856a5 Jenkins post mission test logs to flight review 2018-01-02 01:35:57 +01:00
Daniel Agar 3f67ddbdba ROS mission_test.py send mission before starting
- update to latest sitl_gazebo
2018-01-02 01:35:57 +01:00
Daniel Agar 63deb40a76 ROS tests move to test/ and new Jenkins 2018-01-02 01:35:57 +01:00
Anthony Lamping f46db40b10 make sure FCU is connected to mavros before state topic is marked ready 2018-01-02 01:35:57 +01:00
Anthony Lamping ab5a268ca5 simplify vtol transition check, more log msgs 2018-01-02 01:35:57 +01:00
Anthony Lamping f9e7c66718 thread for offboard publishers, add asserts for topics to come up (simulation ready) and set mode and arming, use home_position topic as better indicator of when the simulation is ready, add more feedback to rosinfo, make timeouts meaningful (in seconds), add land and extended state values 2018-01-02 01:35:57 +01:00
Anthony Lamping 5ce381dfc7 update sitl tests 2018-01-02 01:35:57 +01:00
TSC21 fefed35dfe Tools: update sitl_gazebo 2018-01-01 21:06:00 +01:00
Daniel Agar 9d61febd39 tfmini remove obsolete IOCTLs 2018-01-01 17:38:41 +01:00
Lorenz Meier 49bed47924 Add TFMini to autostart 2018-01-01 17:38:41 +01:00
Ayush 91cedcaba3 Added tfmini driver to build configs 2018-01-01 17:38:41 +01:00
Ayush 9f2bb6c7f9 Added support for TFmini-LiDAR 2018-01-01 17:38:41 +01:00
Daniel Agar ad532d0510 docker_run.sh update container versions to match Jenkins 2018-01-01 10:27:43 -05:00
Daniel Agar 386c34a563 Jenkins update all containers to latest (except NuttX) 2018-01-01 10:19:00 -05:00
Daniel Agar 33266ef2c8 cmake use ccache if found and not disabled 2018-01-01 10:19:00 -05:00
Daniel Agar 1468d4ed39 muorb add generation dependency 2018-01-01 10:19:00 -05:00
Lorenz Meier 3b71c70583 Commander: Do not switch land detection state when not armed
This is important to have the probation times set up correctly and to silence land detected messages for systems that are not actually flying and just on the bench.
2018-01-01 15:32:37 +01:00
Lorenz Meier e7fe8f7268 Uploader: Enforce matching maximum flash sizes
The goal is to force developers to use the correct target with the correct flash size. This prevents criticial functionality missing and is in particular important for FMUv2/FMUv3 boards. It is unmaintainable otherwise for the Pixhawk series.
2018-01-01 09:29:55 -05:00
Lorenz Meier 3041438132 Zubax GNSS: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier e2b2f97d0d TAPv1: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 9a7f99f3cd S2740VC: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 0bfd2925bf Nucleo: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier d1d367011e IOv2: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier d26e037df4 FMUv5: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 3bfa194933 FMUv4PRO: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 18715ebd80 FMUv4: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier c0efaa4ca9 FMUv3: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 6fbfde9ec3 FMUv2: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier d22398f733 PX4 FLOW: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier cd0fbb3cd2 PX4 ESC: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 03c5e9172d PX4 CAN Node: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier bb3746e710 STM32 Disco: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier c3f630ca14 SAMe70: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 18d13498de NXPPHlite: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier ca472ebfaf MindPX: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 7277d72db5 ESC35: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 5d186f374b Crazyflie: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier f7b4f13e81 AUAV x2.1: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 2ba7b41f5c Aero: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 5072c0b5ae Aerocore: Store maximum flash size 2018-01-01 09:29:55 -05:00
Lorenz Meier 32aa8d4f51 FMUv3: Use its own proper prototype for the image 2018-01-01 09:29:55 -05:00
Lorenz Meier 40702b36ee NuttX: Allow different board prototype names from main build config 2018-01-01 09:29:55 -05:00
acfloria 1aebc69fed commander: Allow manual override in stabilized mode for a fixed-wing. 2018-01-01 14:28:36 +01:00
Lorenz Meier 715b571dac Commander: Add hint about ongoing rewrite
It's important that any reader of the file knows about the ongoing refactoring.
2018-01-01 13:11:52 +01:00
Anass Al dc6e47f777 Update SITL Gazebo for magnetic declination fix 2018-01-01 11:52:35 +01:00
Dennis Mannhart a649bbebb7 commander: switch to hold or mission once takeoff is finished (#8020)
* add COM_TAKEOFF_ACT to optionally switch to mission after takeoff
2017-12-31 13:58:20 -05:00
Lorenz Meier cf55901ac9 Calibration timeout: Triple to 90 seconds as the user can now cancel the routine
We timed out earlier to allow users to abort, but now that we can cancel we do not need to enforce such a time limit.
2017-12-31 16:37:02 +01:00
Lorenz Meier 2167457e2e VTOL status: Do not force a commander status change
Before the VTOL status would automatically force a commander state update all the time. This saves effort and makes sure the system only updates when it should.
2017-12-31 16:37:02 +01:00
Lorenz Meier 90b4afebb5 Commander: properly separate preflight check and prearm checks
We were running pre-arm checks before when not arming, which led to annoying error messages on vehicles that were on the bench or serviced on the ground. Now we really only run them when trying to arm.
2017-12-31 16:37:02 +01:00
Lorenz Meier ddf0ecfc38 Airspeed calibration: Ensure that the calibration state is stored correctly
This is necessary due to sensors that are so accurate that they have no offset at all.
2017-12-31 16:37:02 +01:00
Lorenz Meier 074636a8ae Commander: Check for preflight errors in order 2017-12-31 16:37:02 +01:00
Lorenz Meier c06251f3be IO serial: Code style 2017-12-31 16:36:34 +01:00
Lorenz Meier 1f21256f6a IO safety switch: Code style 2017-12-31 16:36:34 +01:00
Lorenz Meier 0013f641aa IO comms: Code style 2017-12-31 16:36:34 +01:00
Lorenz Meier ac113d71af IO main loop: Code style 2017-12-31 16:36:34 +01:00
Lorenz Meier 7d44567fab IO Proto: Code style 2017-12-31 16:36:34 +01:00
Lorenz Meier 2c148236ae IO Mixer: Code style 2017-12-31 16:36:34 +01:00
Lorenz Meier 0ef245aee1 IO ADC: Code style 2017-12-31 16:36:34 +01:00
Lorenz Meier 168e070f94 IO CMake file: Formatting 2017-12-31 16:36:34 +01:00
Lorenz Meier 51111fc6e3 IO Firmware: Document override behavior for manual override. 2017-12-31 16:36:34 +01:00
Daniel Agar d7aaab07fc delete unused SENSORIOCGQUEUEDEPTH 2017-12-31 09:47:51 -05:00
Daniel Agar 6ad9e59a7a delete unused GPIO_SET_INPUT 2017-12-31 09:47:51 -05:00
Daniel Agar b8b9f15a34 delete unused GPIO_PERIPHERAL_RAIL_RESET 2017-12-31 09:47:51 -05:00
Daniel Agar d61e0651ab delete unused GPIO_SET_OUTPUT_HIGH 2017-12-31 09:47:51 -05:00
Daniel Agar 4c041f12ea delete unused GPIO_SET_OUTPUT_LOW 2017-12-31 09:47:51 -05:00
Daniel Agar f550c8735a delete unused GPIO_SENSOR_RAIL_RESET 2017-12-31 09:47:51 -05:00
Daniel Agar c65db00914 delete unused GPIO_SET_ALT_4 2017-12-31 09:47:51 -05:00
Daniel Agar db5e932f48 delete unused GPIO_SET_ALT_3 2017-12-31 09:47:51 -05:00
Daniel Agar 17e58dc08b delete unused GPIO_SET_ALT_2 2017-12-31 09:47:51 -05:00
Daniel Agar c6760cc6fb delete unused GPIO_SET_ALT_1 2017-12-31 09:47:51 -05:00
Daniel Agar d91b2347dd mpu6000 delete dummy 2017-12-31 09:47:51 -05:00
Daniel Agar badcddc29a delete unused GYROIOCGEXTERNAL 2017-12-31 09:47:51 -05:00
Daniel Agar 98ca693298 delete unused GYROIOCGLOWPASS 2017-12-31 09:47:51 -05:00
Daniel Agar 85e879a574 delete unused GYROIOCSLOWPASS 2017-12-31 09:47:51 -05:00
Daniel Agar 1b4a224223 delete unused GYROIOCGHWLOWPASS 2017-12-31 09:47:51 -05:00
Daniel Agar cc2cf40e6e delete unused GYROIOCSHWLOWPASS 2017-12-31 09:47:51 -05:00
Daniel Agar 8b591aa13a delete unused ACCELIOCGHWLOWPASS 2017-12-31 09:47:51 -05:00
Daniel Agar 0f8f319411 delete unused ACCELIOCSHWLOWPASS 2017-12-31 09:47:51 -05:00
Daniel Agar 63d24a9e1e delete unused ACCELIOCGLOWPASS 2017-12-31 09:47:51 -05:00
Daniel Agar 417351390f delete unused ACCELIOCSLOWPASS 2017-12-31 09:47:51 -05:00
Daniel Agar be930d4372 delete unused PWM_SERVO_CLEAR_OVERRIDE_OK 2017-12-31 09:47:51 -05:00
Daniel Agar dacc45c3d1 delete unused PWM_SERVO_SET_OVERRIDE_OK 2017-12-31 09:47:51 -05:00
Daniel Agar ca6f6b27a5 delete unused PWM_SERVO_SET_RC_CONFIG 2017-12-31 09:47:51 -05:00
Daniel Agar ff6928fb63 delete unused GPIO_GET 2017-12-31 09:47:51 -05:00
Daniel Agar 65f9005bc6 delete unused RC_INPUT_GET 2017-12-31 09:47:51 -05:00
Daniel Agar 32a450f5dd detect_orientation make constants constexpr 2017-12-31 09:47:51 -05:00
Daniel Agar 344cf83549 delete unused SENSORIOCCALTEST 2017-12-31 09:47:51 -05:00
Daniel Agar 4980b93830 delete unused SENSORIOCGROTATION 2017-12-31 09:47:51 -05:00
Daniel Agar 9c378a7ca1 delete unused SENSORIOCSROTATION 2017-12-31 09:47:51 -05:00
Daniel Agar 3ead5c2afd delete unused MAGIOCSLOWPASS/MAGIOCGLOWPASS 2017-12-31 09:47:51 -05:00
Daniel Agar 301be5ed8a delete unused range finder IOCTLs 2017-12-31 09:47:51 -05:00
Daniel Agar 859b19db9a uORB.h reduce orb_metadata field sizes 2017-12-31 09:47:51 -05:00
Lorenz Meier 34ea229a78 Update Gazebo with GUI fix 2017-12-30 20:14:33 +01:00
Lorenz Meier ab30532f52 Update SITL Gazebo with build system fixes 2017-12-30 20:10:00 +01:00
Lorenz Meier 3cc356a703 Gazebo: Update repository to enable video streaming support 2017-12-30 18:17:25 +01:00
Lorenz Meier ab2f85d4ff SITL: Search MAVLink locally 2017-12-30 14:47:37 +01:00
Lorenz Meier 5d4086309f Gazebo: Fix build for Gazebo 8 and tune down GPS noise 2017-12-30 13:05:51 +01:00
Lorenz Meier e3f5f8e475 Update Gazebo submodule to include gimbal fixes 2017-12-30 11:46:55 +01:00
Daniel Agar cbc8b50aa1 sensors don't store diff_pres in class 2017-12-30 11:30:34 +01:00
Daniel Agar 4445ffc70e sensors don't store airspeed in class 2017-12-30 11:30:34 +01:00
Daniel Agar 6623fd0212 sensors don't keep battery_status messages 2017-12-30 11:30:34 +01:00
Ramón Hernán Roche Quintana d57ed6d17f Changelog generator default params 2017-12-30 11:27:57 +01:00
Lorenz Meier 6a701adf3c HITL: Remove hard requirement for airframes 2017-12-30 11:24:22 +01:00
Lorenz Meier 2eb3392c39 PWM out sim: Increase stack as needed 2017-12-30 11:24:22 +01:00
Lorenz Meier bb516be61e Commander: Enforce correct system configuration for HITL
This is important to ensure that users are not trying to use HITL with airframes that will not work.
2017-12-30 11:24:22 +01:00
Lorenz Meier 0ae1737e85 Commander: Fix HITL state initialization that prevented pre-flight checks to pass in HITL mode on v1.7.2
This is a minor change that fixes the ordering of the initialization.
2017-12-30 11:24:22 +01:00
Lorenz Meier 644db1b03f State machine helper: Fix typo 2017-12-30 11:24:22 +01:00
Lorenz Meier c31e31bf5e Voted sensors: Better error messages 2017-12-30 11:24:22 +01:00
Lorenz Meier f69a6af989 Commander: increase stack to ensure enough margin remains 2017-12-30 11:24:03 +01:00
Lorenz Meier fa8222e188 Logger: Free some RAM to leave space for mag calibration 2017-12-30 11:24:03 +01:00
Daniel Agar 370da89573 fw_pos_control fix parameter sanity check (#8521)
- the sanity check result wasn't being sent to the user and prevents landing slope, runway takeoff, and launch detector parameter updates.
2017-12-26 16:02:31 -05:00
Lorenz Meier 1cab556ddb Topic listener: Depend on messages, not just on headers
This ensures that the listener is re-built when the message spec changes.
2017-12-26 16:01:11 -05:00
Lorenz Meier 23d15c1365 Platform: Depend on messages, not just on headers
This ensures that platform is re-built if messages change.
2017-12-26 16:01:11 -05:00
Lorenz Meier 72823e6eb4 MicroRTPS bridge: Depend on messages, not just on headers
This ensures that an update of the message spec re-generates the bridge.
;
2017-12-26 16:01:11 -05:00
Daniel Agar fc7c8b4b89 vehicle_status delete engine_failure_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar 17e17d79dd commander delete unused vtol_transition_failure_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar d0fba8bf8b commander delete unused data_link_lost_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar c0be801b5c commander delete unused rc_signal_lost_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar 5a6cde41d5 commander delete unused gps_failure_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar ca804a2308 commander delete unused sensors check 2017-12-27 02:41:10 +08:00
Daniel Agar 294fbc46a9 commander initial class structure 2017-12-27 02:41:10 +08:00
Amir Melzer 55be098e3b adis16448 bmlz fixes (#8519)
* small bit mask fix

* Restore factory calibration values in drivers start-up sequence

* Restore factory calibration values in drivers start-up sequence (reverted from commit 09ba45501f87f77e53d670fcf880b3cfc419fe38)

* Restore factory calibration values in drivers start-up sequence

* Initialization of the Adis16448 report struct

* Add stall time after write and read cycle

* Increasing the stall time for being compatible with the B sensor version

* small clean up

* Add settling time after initialization
2017-12-22 13:17:54 -05:00
Daniel Agar 5d6edcc15d commander consolidate periodic state publishing 2017-12-22 10:42:14 -05:00
Daniel Agar 1ea5de43cf logger add vehicle_status_flags 2017-12-22 10:42:14 -05:00
Daniel Agar 043ad3c33e commander vehicle_status_flags only publish if changed 2017-12-22 10:42:14 -05:00
Paul Riseborough 176738c688 commander: add missing px4_close (#8513) 2017-12-22 08:57:06 +11:00
Daniel Agar ec57832a8f FW land detector increase trigger time and cleanup (#8486) 2017-12-21 12:17:32 -05:00
Daniel Agar 7dab5d4380 mission feasibility full home position isn't always needed 2017-12-21 15:28:45 +08:00
Daniel Agar b7189012dc Revert "Fix for HobbyKing boards."
This reverts commit 75b93b0728.
2017-12-21 15:25:25 +08:00
Hamish Willee 2f50a07afb Delete redundant documentation files (#8505) 2017-12-21 02:06:41 -05:00
CarlOlsson 925c65b4d5 ekf2: add beta innovation gate to parameters
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-12-21 04:02:10 +08:00
Daniel Agar 58d1cdc733 Allow MAV_CMD_DO_SET_HOME as a mission command 2017-12-20 10:19:07 +01:00
sanderux a8c26265b5 Check manual home set when setting during arming 2017-12-20 10:19:07 +01:00
Daniel Agar 964cb486a9 home_position delete unused direction_{x, y, z} 2017-12-20 10:19:07 +01:00
Daniel Agar 375ae991bc commander DO_SET_HOME populate local coordinates
- unify commander home update
2017-12-20 10:19:07 +01:00
sanderux cf7ad67678 Check home reset in local frame 2017-12-20 10:19:07 +01:00
sanderux 4e175d13c4 Set manual_home when home set manually 2017-12-20 10:19:07 +01:00
sanderux 74868f8c2b Reset home position when landed and disarmed 2017-12-20 10:19:07 +01:00
Daniel Agar 6172315cf7 navigator mission_result fix increment sign 2017-12-20 17:05:25 +08:00
Daniel Agar a4be7ae7d0 commander mission_result check time and instance 2017-12-20 17:05:25 +08:00
Hamish Willee 7a9f7eb424 Updates to README
- Link supported airframes to the Airframe reference rather than portfolio pages (they may look pretty, but nowhere near as useful for developers. Add portfolio link up top.
- Change the somewhat empty "Project Milestones" to "Project Roadmap" and link to the high level roadmap. I removed the only milestone about Lorenz creating the software. If we end up adding a more detailed milestone section that could go in. 
- Added clear guidelines for users vs developers.
2017-12-20 05:22:43 +08:00
ChristophTobler 4bd7d62b5c ekf2: update AID_MASK bitmask comment for QGC 2017-12-20 05:22:11 +08:00
Pietro De Nicolao aea8985c8d Fix links to supported hardware in README.md (#8476) 2017-12-18 11:23:32 -05:00
Beat Küng 3da8031e8e uorb graph: improve error output 2017-12-18 10:19:15 +01:00
Beat Küng eeff52cda7 uorb_graph: add .gitignore, change graph file for sitl runtime config 2017-12-18 10:19:15 +01:00
Beat Küng ec50193d6c Makefile: add uorb_graphs target 2017-12-18 10:19:15 +01:00
Beat Küng 5195210893 CMakeLists.txt: add custom target uorb_graph to generate the graph JSON files
Use like this:
	  make px4fmu-v2_default uorb_graph
2017-12-18 10:19:15 +01:00
Beat Küng 57f92250b3 uorb graph create.py: sort modules & topics by name length for JSON output 2017-12-18 10:19:15 +01:00
Beat Küng 9bff0c8c04 uorb graphs: add script to create graph from a posix startup script 2017-12-18 10:19:15 +01:00
Beat Küng e2d6c0a8f9 uorb_graph: add script to generate uORB pub/sub graphs
2 possible output formats:
- JSON (can be used with D3.js)
- Graphviz

Not covered yet: Publication & Subscription classes
2017-12-18 10:19:15 +01:00
Daniel Agar d5bb948cbb README fix LICENSE link 2017-12-17 11:33:19 -05:00
Daniel Agar a4b127960b README switch travis-ci build status to Jenkins 2017-12-17 11:33:19 -05:00
1141 changed files with 22317 additions and 48708 deletions
+33
View File
@@ -0,0 +1,33 @@
# How to install:
# gem install github_changelog_generator
# How to run:
# github_changelog_generator -u PX4 -p Firmware
# Description:
# The following params are sensible defaults for the PX4 project,
# if you want to do a changelog before a release you need to update since-tag and future-releases,
# Params:
# github_changelog_generator --help for all options
# max-issues
# max threshold for github api queries
# make sure you set your CHANGELOG_GITHUB_TOKEN before
# running
max-issues=1500
# exclude-tags-regex
# excludes release candidates
exclude-tags-regex=rc[0-9]{1,}|beta[0-9]{1,}
# since-tag
# version of last stable release
# you need to change this depending on what you need
# if you want a changelog between versions this is the lowest version
since-tag=1.6.5
# future-release
# version you are about to release
# if you want a changelog between a version and all unreleased changes grouped as a release
# eg: v1.6.5 to v1.7.0
future-release=v1.7.0
-4
View File
@@ -1,7 +1,3 @@
[submodule "mavlink/include/mavlink/v1.0"]
path = mavlink/include/mavlink/v1.0
url = https://github.com/mavlink/c_library_v1.git
branch = master
[submodule "mavlink/include/mavlink/v2.0"]
path = mavlink/include/mavlink/v2.0
url = https://github.com/mavlink/c_library_v2.git
+32 -6
View File
@@ -110,7 +110,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR})
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake)
#=============================================================================
# git
@@ -155,6 +155,9 @@ if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
get_filename_component(EXTERNAL_MODULES_LOCATION "${EXTERNAL_MODULES_LOCATION}" ABSOLUTE)
endif()
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${OS}/cmake)
include(platforms/${OS}/cmake/px4_impl_os.cmake)
set(config_module "configs/${CONFIG}")
include(${config_module})
@@ -243,11 +246,11 @@ set(BUILD_SHARED_LIBS OFF)
#=============================================================================
# ccache
#
option(CCACHE "Use ccache if available" OFF)
option(CCACHE "Use ccache if available" ON)
find_program(CCACHE_PROGRAM ccache)
if (CCACHE AND CCACHE_PROGRAM)
message(STATUS "Enabled ccache: ${CCACHE_PROGRAM}")
if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE})
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
else()
endif()
#=============================================================================
@@ -332,7 +335,7 @@ px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${CMAKE_EXE_LINKER_FLAGS};${exe_linker
px4_join(OUT CMAKE_C_FLAGS LIST "${CMAKE_C_FLAGS};${c_flags};${optimization_flags}" GLUE " ")
px4_join(OUT CMAKE_CXX_FLAGS LIST "${CMAKE_CXX_FLAGS};${cxx_flags};${optimization_flags}" GLUE " ")
include_directories(${include_dirs})
include_directories(${include_dirs} ${CMAKE_CURRENT_BINARY_DIR}/src/modules/systemlib/param)
link_directories(${link_dirs})
add_definitions(${definitions})
@@ -394,11 +397,13 @@ endif()
#=============================================================================
# subdirectories
#
add_subdirectory(src/platforms/common)
foreach(module ${config_module_list})
add_subdirectory(src/${module})
endforeach()
add_subdirectory(src/firmware/${OS})
add_subdirectory(platforms/${OS})
#=============================================================================
# generate custom target to print for all executable and module cmake targets
@@ -413,6 +418,27 @@ if (all_posix_cmake_targets)
)
endif()
#=============================================================================
# uORB graph generation: add a custom target 'uorb_graph'
#
set(uorb_graph_config ${BOARD})
set(graph_module_list "")
foreach(module ${config_module_list})
set(graph_module_list "${graph_module_list}" "--src-path" "src/${module}")
endforeach()
add_custom_command(OUTPUT ${uorb_graph_config}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/uorb_graph/create.py
${module_list}
--exclude-path src/examples
--file ${PX4_SOURCE_DIR}/Tools/uorb_graph/graph_${uorb_graph_config}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
COMMENT "Generating uORB graph"
)
add_custom_target(uorb_graph DEPENDS ${uorb_graph_config})
#=============================================================================
# packaging
#
+1 -1
View File
@@ -41,4 +41,4 @@ Since we care about safety, we will regularly ask you for test results. Best is
Push changes to your repo and send a [pull request](https://github.com/PX4/Firmware/compare/).
Make sure to provide some testing feedback and if possible the link to a flight log file. Upload flight log files to [Log Muncher](http://dash.oznet.ch) and link the resulting report.
MuncherMake sure to provide some testing feedback and if possible the link to a flight log file. Upload flight log files to [Flight Review](http://logs.px4.io) and link the resulting report.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

-98
View File
@@ -1,98 +0,0 @@
[TOC]
# Introduction
The HIL architecture allows you to test the flight stack replacing the real physical vehicle and sensors with a simulator of vehicle dynamics and sensor outputs. The flight stack "is not aware" that it is not on a real vehicle. This is a powerful tool for develping and testing code rapidly in a benchtop environment.
The flight stack can be run anywhere that supports a network connection to the simulator (with sufficient bandwidth and latency to transport the sensor and actuator messages). This can be on a standard linux workstation, an on-target linux image, or the on-target DSP image. These modes can be selected based on the goals of the testing. Workstation is useful for rapid testing in a tool-rich environment. DSP image testing is the closest to the final implementation, so is useful for testing actual HW operation, other than the physical sensing and actuation.
## Px4 High-level HIL Architecture
A diagram of the setup described is shown here. Note that UDP port numbers are only displayed on the socket server and are left blank on the socket client.
(???NOTES: This diagram needs to be updated to use control inputs over UDP, either from QGC or from other)
![SITL Diagram](./SITL_Diagram_QGC.png "SITL Diagram")
## Requirements
The simulator that is currently supported is jMAVSim. The setup described here requires PX4 and jMAVSim installed and running. qGroundControl (QGC) is also required because it is the supported method of providing manual control commands.
## Assumptions
# Compiling Code
## JMAVSim
### Platform Requirements
Linux with java-1.7.x or greater
### Build Instructions
In a clean directory
```
> git clone https://github.com/PX4/jMAVSim.git
> cd jMAVSim
> git submodule init
> git submodule update
> ant
```
## qGroundControl
### Platform Requirements
Windows 7
Logitech Gamepad F310 joystick controller
### Download/Install Instructions
Download QGC from http://qgroundcontrol.org/downloads and install using the windows executable.
## PX4
### Platform Requirements
Linux or Eagle with a working IP interface (?? does this need further instructions?)
### Build Host Requirements
(???Notes: Windows?)
### Download & Build Instructions
### Installing binaries on the Qualcomm Target
# Running PX4 in HIL Mode
## Starting PX4 on Qualcomm Eagle
```
> adb shell
# bash
root@linaro-developer:/# cd ???
root@linaro-developer:/# ./px4
App name: px4
Enter a command and its args:
uorb start
muorb start
mavlink start -u 14556
simulator start -p
```
## Starting jMAVSim
In the directory where jMAVSim is installed
```
java -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp <IPADDR>:14560 -n 100
```
replacing <IPADDR> with the IP address of the machine running PX4 (Eagle). This can be found by running "ifconfig" on that machine.
## Starting qGroundControl
Launch the qGroundControl application
1. Set up the communication to the flight stack. In the menu File:Settings:CommLinks, select Add. Enter a Link Name of your choice. Select Link Type: UDP. Set the listening port to an unused port (example: 14561). Select Add. Enter the IP address and port of the PX4 Mavlink app, which is <IPADDR>:14556 with <IPADDR> being the IP address of the Eagle board. Select OK.
1. Set up the joystick. Plug in the joystick to your Windows machine. In the menu File:Settings:CommLinks, check Enable Controllers. Select "Gamepad F310". Select "Manual". Set the axes/channel mapping to 0:Yaw, 1:Throttle, 2:unset, 3:Pitch, 4:Roll. Seletct "Inverted" for the throttle axis. Click "Calibrate range". Move the right joystick through its full range of motion. Move the left joystick full left then full right. Move the left joystick full forward (but not full backward). Click "end calibration."
1. Connect to the flight stack. Click Analyze. Click the "Connect" button in the upper right, and select the connection that you created in the first step.
You should now be connected to the flight stack. You can see incoming Mavlink packets using the MAVLink Instpector (from Advanced:Tool Widgets)
## Controlling PX4 flight in HIL Mode
The joystick can now be used to fly the simulated vehicle. The jMAVSim world visualization gives a FPV view, and QGC can be used to display instruments such as artificial horizon and maps (if GPS simulation is enabled).
# Debugging/FAQ
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
-2
View File
@@ -1,2 +0,0 @@
#!/bin/sh
git log --pretty=format:"Last change: commit %h - %aN, %ar : %s" -1 $1 || echo no git
Vendored
+311 -79
View File
@@ -15,10 +15,11 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
docker.image('px4io/px4-dev-nuttx:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "export"
sh "make distclean"
sh "ccache -z"
sh "git fetch --tags"
sh "make nuttx_${node_name}_default"
@@ -26,6 +27,7 @@ pipeline {
sh "make sizes"
sh "ccache -s"
archiveArtifacts(artifacts: 'build/*/*.px4', fingerprint: true)
archiveArtifacts(artifacts: 'build/*/*.elf', fingerprint: true)
}
}
}
@@ -38,10 +40,11 @@ pipeline {
builds["px4fmu-v2"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
docker.image('px4io/px4-dev-nuttx:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "export"
sh "make distclean"
sh "ccache -z"
sh "git fetch --tags"
sh "make px4io-v2_default"
@@ -52,6 +55,7 @@ pipeline {
sh "make sizes"
sh "ccache -s"
archiveArtifacts(artifacts: 'build/*/*.px4', fingerprint: true)
archiveArtifacts(artifacts: 'build/*/*.elf', fingerprint: true)
}
}
}
@@ -66,16 +70,18 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
docker.image('px4io/px4-dev-nuttx:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "export"
sh "make distclean"
sh "ccache -z"
sh "git fetch --tags"
sh "make nuttx_${node_name}_default"
sh "make sizes"
sh "ccache -s"
archiveArtifacts(artifacts: 'build/*/*.px4', fingerprint: true)
archiveArtifacts(artifacts: 'build/*/*.elf', fingerprint: true)
}
}
}
@@ -91,10 +97,11 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
docker.image('px4io/px4-dev-nuttx:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "export"
sh "make distclean"
sh "ccache -z"
sh "make nuttx_${node_name}_default"
sh "make sizes"
@@ -114,10 +121,11 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-base:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
docker.image('px4io/px4-dev-base:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "export"
sh "make distclean"
sh "ccache -z"
sh "make posix_${node_name}"
sh "ccache -s"
@@ -136,10 +144,11 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-raspi:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
docker.image('px4io/px4-dev-raspi:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "export"
sh "make distclean"
sh "ccache -z"
sh "make posix_${node_name}"
sh "ccache -s"
@@ -158,10 +167,11 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-armhf:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
docker.image('px4io/px4-dev-armhf:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "export"
sh "make distclean"
sh "ccache -z"
sh "make posix_${node_name}"
sh "ccache -s"
@@ -181,10 +191,11 @@ pipeline {
node {
stage("Build Test ${node_name}") {
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
docker.image("lorenzmeier/px4-dev-snapdragon:2017-10-23").inside {
docker.image("lorenzmeier/px4-dev-snapdragon:2017-12-29").inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "export"
sh "make distclean"
sh "ccache -z"
sh "make ${node_name}"
sh "ccache -s"
@@ -204,10 +215,11 @@ pipeline {
builds["${node_name} (GCC7)"] = {
node {
stage("Build Test ${node_name} (GCC7)") {
docker.image('px4io/px4-dev-base-archlinux:2017-12-08').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
docker.image('px4io/px4-dev-base-archlinux:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "export"
sh "make distclean"
sh "ccache -z"
sh "make posix_${node_name}"
sh "ccache -s"
@@ -218,27 +230,6 @@ pipeline {
}
}
// GCC7 nuttx
for (def option in ["px4fmu-v5_default"]) {
def node_name = "${option}"
builds["${node_name} (GCC7)"] = {
node {
stage("Build Test ${node_name} (GCC7)") {
docker.image('px4io/px4-dev-base-archlinux:2017-12-08').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "ccache -z"
sh "make nuttx_${node_name}"
sh "ccache -s"
}
}
}
}
}
}
parallel builds
}
}
@@ -250,11 +241,12 @@ pipeline {
stage('check style') {
agent {
docker {
image 'px4io/px4-dev-base:2017-10-23'
args '-e CI=true'
image 'px4io/px4-dev-base:2017-12-30'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make check_format'
}
}
@@ -262,12 +254,13 @@ pipeline {
stage('clang analyzer') {
agent {
docker {
image 'px4io/px4-dev-clang:2017-10-23'
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
image 'px4io/px4-dev-clang:2017-12-30'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'make clean'
sh 'export'
sh 'make distclean'
sh 'make scan-build'
// publish html
publishHTML target: [
@@ -280,17 +273,25 @@ pipeline {
reportName: 'Clang Static Analyzer'
]
}
when {
anyOf {
branch 'master'
branch 'beta'
branch 'stable'
}
}
}
stage('clang tidy') {
agent {
docker {
image 'px4io/px4-dev-clang:2017-10-23'
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
image 'px4io/px4-dev-clang:2017-12-30'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'make clean'
sh 'export'
sh 'make distclean'
sh 'make clang-tidy-quiet'
}
}
@@ -299,11 +300,12 @@ pipeline {
agent {
docker {
image 'px4io/px4-dev-base:ubuntu17.10'
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'make clean'
sh 'export'
sh 'make distclean'
sh 'make cppcheck'
// publish html
publishHTML target: [
@@ -316,44 +318,253 @@ pipeline {
reportName: 'Cppcheck'
]
}
when {
anyOf {
branch 'master'
branch 'beta'
branch 'stable'
}
}
}
stage('tests') {
agent {
docker {
image 'px4io/px4-dev-base:2017-10-23'
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
image 'px4io/px4-dev-base:2017-12-30'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'make clean'
sh 'export'
sh 'make distclean'
sh 'make posix_sitl_default test_results_junit'
junit 'build/posix_sitl_default/JUnitTestResults.xml'
}
}
// temporarily disabled until stable
//stage('tests coverage') {
// agent {
// docker {
// image 'px4io/px4-dev-base:2017-10-23'
// args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
// }
// }
// steps {
// sh 'make clean'
// sh 'make tests_coverage'
// // publish html
// publishHTML target: [
// allowMissing: false,
// alwaysLinkToLastBuild: false,
// keepAll: true,
// reportDir: 'build/posix_sitl_default/coverage-html',
// reportFiles: '*',
// reportName: 'Coverage Report'
// ]
// }
//}
stage('ROS vtol mission new 1') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_new_1: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_new_1: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS vtol mission new 2') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_2 vehicle:=standard_vtol'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_new_2: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_new_2: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS vtol mission old 1') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_1 vehicle:=standard_vtol'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_1: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_1: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS vtol mission old 2') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_2 vehicle:=standard_vtol'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_2: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_2: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS vtol mission old 3') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
//sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
//sh 'git fetch --tags'
//sh 'make posix_sitl_default'
//sh 'make posix_sitl_default sitl_gazebo'
//sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_3 vehicle:=standard_vtol'
}
post {
//success {
// sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_3: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
//}
failure {
//sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_3: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS MC mission box') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=multirotor_box vehicle:=iris'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test multirotor_box: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test multirotor_box: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS offboard att') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS offboard attitude test: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS offboard attitude test: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS offboard pos') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS offboard position test: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS offboard position test: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
}
}
@@ -364,9 +575,10 @@ pipeline {
stage('airframe') {
agent {
docker { image 'px4io/px4-dev-base:2017-10-23' }
docker { image 'px4io/px4-dev-base:2017-12-30' }
}
steps {
sh 'make distclean'
sh 'make airframe_metadata'
archiveArtifacts(artifacts: 'airframes.md, airframes.xml', fingerprint: true)
}
@@ -374,9 +586,10 @@ pipeline {
stage('parameter') {
agent {
docker { image 'px4io/px4-dev-base:2017-10-23' }
docker { image 'px4io/px4-dev-base:2017-12-30' }
}
steps {
sh 'make distclean'
sh 'make parameters_metadata'
archiveArtifacts(artifacts: 'parameters.md, parameters.xml', fingerprint: true)
}
@@ -384,19 +597,35 @@ pipeline {
stage('module') {
agent {
docker { image 'px4io/px4-dev-base:2017-10-23' }
docker { image 'px4io/px4-dev-base:2017-12-30' }
}
steps {
sh 'make distclean'
sh 'make module_documentation'
archiveArtifacts(artifacts: 'modules/*.md', fingerprint: true)
}
}
stage('uorb graphs') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2017-12-30'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make uorb_graphs'
archiveArtifacts(artifacts: 'Tools/uorb_graph/graph_sitl.json')
}
}
}
}
stage('S3 Upload') {
agent {
docker { image 'px4io/px4-dev-base:2017-10-23' }
docker { image 'px4io/px4-dev-base:2017-12-30' }
}
when {
@@ -412,7 +641,10 @@ pipeline {
}
}
}
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
}
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
timeout(time: 60, unit: 'MINUTES')
+32 -7
View File
@@ -218,7 +218,7 @@ check_rtps: \
check_posix_sitl_rtps \
sizes
.PHONY: sizes check quick_check check_rtps
.PHONY: sizes check quick_check check_rtps uorb_graphs
sizes:
@-find build -name *.elf -type f | xargs size 2> /dev/null || :
@@ -235,6 +235,14 @@ check_%:
@$(MAKE) --no-print-directory $(subst check_,,$@)
@echo
uorb_graphs:
@./Tools/uorb_graph/create_from_startupscript.sh
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --file Tools/uorb_graph/graph_full
@$(MAKE) --no-print-directory px4fmu-v2_default uorb_graph
@$(MAKE) --no-print-directory px4fmu-v4_default uorb_graph
@$(MAKE) --no-print-directory posix_sitl_default uorb_graph
.PHONY: coverity_scan
coverity_scan: posix_sitl_default
@@ -244,8 +252,8 @@ coverity_scan: posix_sitl_default
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata
parameters_metadata:
@python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 3 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --markdown
@python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 3 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --xml
@python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --markdown
@python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --xml
airframe_metadata:
@python $(SRC_DIR)/Tools/px_process_airframes.py -v -a $(SRC_DIR)/ROMFS/px4fmu_common/init.d --markdown
@@ -271,7 +279,7 @@ format:
# Testing
# --------------------------------------------------------------------
.PHONY: tests tests_coverage
.PHONY: tests tests_coverage tests_mission tests_offboard rostest
tests:
@$(MAKE) --no-print-directory posix_sitl_default test_results \
@@ -279,9 +287,25 @@ tests:
UBSAN_OPTIONS="color=always"
tests_coverage:
@$(MAKE) clean
@$(MAKE) --no-print-directory posix_sitl_default PX4_CMAKE_BUILD_TYPE=Coverage
@$(MAKE) --no-print-directory posix_sitl_default sitl_gazebo PX4_CMAKE_BUILD_TYPE=Coverage
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_missions.test
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test
@$(MAKE) --no-print-directory posix_sitl_default test_coverage_genhtml PX4_CMAKE_BUILD_TYPE=Coverage
@echo "Open $(SRC_DIR)/build/posix_sitl_default/coverage-html/index.html to see coverage"
rostest: posix_sitl_default
@$(MAKE) --no-print-directory posix_sitl_default sitl_gazebo
tests_mission: rostest
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_missions.test
tests_offboard: rostest
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test
# static analyzers (scan-build, clang-tidy, cppcheck)
# --------------------------------------------------------------------
.PHONY: scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck check_stack
@@ -302,12 +326,12 @@ posix_sitl_default-clang:
@$(PX4_MAKE) -C $(SRC_DIR)/build/posix_sitl_default-clang
clang-tidy: posix_sitl_default-clang
@cd $(SRC_DIR)/build/posix_sitl_default-clang && run-clang-tidy-4.0.py -header-filter=".*\.hpp" -j$(j) -p .
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
# to automatically fix a single check at a time, eg modernize-redundant-void-arg
# % run-clang-tidy-4.0.py -fix -j4 -checks=-\*,modernize-redundant-void-arg -p .
clang-tidy-fix: posix_sitl_default-clang
@cd $(SRC_DIR)/build/posix_sitl_default-clang && run-clang-tidy-4.0.py -header-filter=".*\.hpp" -j$(j) -fix -p .
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -fix -p .
# modified version of run-clang-tidy.py to return error codes and only output relevant results
clang-tidy-quiet: posix_sitl_default-clang
@@ -350,7 +374,8 @@ submodulesupdate:
gazeboclean:
@rm -rf ~/.gazebo/*
distclean: submodulesclean gazeboclean
distclean: gazeboclean
@git submodule deinit -f .
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
# --------------------------------------------------------------------
+46 -36
View File
@@ -1,38 +1,46 @@
## PX4 Pro Drone Autopilot ##
# PX4 Pro Drone Autopilot
[![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)
[![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](http://ci.px4.io:8080/buildStatus/icon?job=Firmware/master)](http://ci.px4.io:8080/blue/organizations/jenkins/Firmware/activity) [![Coverity Scan](https://scan.coverity.com/projects/3966/badge.svg?flat=1)](https://scan.coverity.com/projects/3966?tab=overview)
[![Slack](https://px4-slack.herokuapp.com/badge.svg)](http://slack.px4.io)
This repository holds the [PX4 Pro](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/Firmware/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
* Supported airframes:
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
* [Fixed wing](http://px4.io/portfolio_category/plane/)
* [VTOL](http://px4.io/portfolio_category/vtol/)
* many more experimental types (Rovers, Blimps, Boats, Submarines, etc)
* Releases: [Downloads](https://github.com/PX4/Firmware/releases)
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/Firmware/blob/master/LICENSE))
* [Supported airframes](https://docs.px4.io/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
* [Multicopters](https://docs.px4.io/en/airframes/airframe_reference.html#copter)
* [Fixed wing](https://docs.px4.io/en/airframes/airframe_reference.html#plane)
* [VTOL](https://docs.px4.io/en/airframes/airframe_reference.html#vtol)
* many more experimental types (Rovers, Blimps, Boats, Submarines, etc)
* Releases: [Downloads](https://github.com/PX4/Firmware/releases)
## PX4 Users
The [PX4 User Guide](https://docs.px4.io/en/) explains how to assemble [supported vehicles](https://docs.px4.io/en/airframes/airframe_reference.html) and fly drones with PX4.
See the [forum and chat](https://docs.px4.io/en/#support) if you need help!
## PX4 Developers
This [Developer Guide](https://dev.px4.io/) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
Developers should read the [Guide for Contributions](https://dev.px4.io/en/contribute/).
See the [forum and chat](https://dev.px4.io/en/#support) if you need help!
Please refer to the [user documentation](https://docs.px4.io/en/) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
### Weekly Dev Call
The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribute/).
The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribute/#dev_call).
* [Wednesday 17:00 Central European Time, 11:00 Eastern Time, 08:00 Pacific Standard Time](https://www.google.com/calendar/embed?src=bGludXhmb3VuZGF0aW9uLm9yZ19nMjF0dmFtMjRtN3BtN2poZXYwMWJ2bHFoOEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t)
* [Uber conference (dial-in or web client)](https://www.uberconference.com/lf-dronecode)
* The agenda is announced in advance on the [PX4 Discuss](http://discuss.px4.io/c/weekly-dev-call)
* Issues and PRs may be labelled [devcall](https://github.com/PX4/Firmware/issues?q=is%3Aopen+is%3Aissue+label%3Adevcall) to flag them for discussion
> **Note** The dev call is open to all interested developers (not just the core dev team). This is a great opportunity to meet the team and contribute to the ongoing development of the platform. It includes a QA session for newcomers.
### Developers ###
* [Developer Guide](https://dev.px4.io/)
* [Build instructions](https://dev.px4.io/en/setup/building_px4.html)
* [Guide for Contributions](https://dev.px4.io/en/contribute/)
## Maintenance Team
* Project / Founder - [Lorenz Meier](https://github.com/LorenzMeier)
* Project: Founder - [Lorenz Meier](https://github.com/LorenzMeier), Architecture: [Daniel Agar](https://github.com/dagar)
* [Dev Call](https://github.com/PX4/Firmware/labels/devcall) - [Ramon Roche](https://github.com/mrpollo)
* Communication Architecture
* [Beat Kueng](https://github.com/bkueng)
@@ -59,40 +67,42 @@ The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribut
* Vision based navigation
* [Christoph Tobler](https://github.com/ChristophTobler)
* [Mohammed Kabir](https://github.com/mhkabir)
* Obstacle Avoidance - [Vilhjalmur Vilhjalmsson](https://github.com/vilhjalmur89)
* Obstacle Avoidance - [Martina Rivizzigno](https://github.com/mrivi)
* [Snapdragon](https://github.com/PX4/Firmware/labels/snapdragon)
* [Christoph Tobler](https://github.com/ChristophTobler)
* [Mark Charlebois](https://github.com/mcharleb)
* [Intel Aero](https://github.com/PX4/Firmware/labels/intel%20aero)
* [Sugnan Prabhu](https://github.com/sugnanprabhu)
* [José Roberto de Souza](https://github.com/zehortigoza)
* [Raspberry Pi / Navio](https://github.com/PX4/Firmware/labels/raspberry_pi) - [Beat Kueng](https://github.com/bkueng)
* [Parrot Bebop](https://github.com/PX4/Firmware/labels/bebop) - [Michael Schaeuble](https://github.com/eyeam3)
* [Airmind MindPX / MindRacer](https://github.com/PX4/Firmware/labels/mindpx) - [Henry Zhang](https://github.com/iZhangHui)
* RTPS/ROS2 Interface - [Vicente Monge](https://github.com/vicenteeprosima)
See also [About Us](http://px4.io/about-us/#development_team) (px4.io) and the [contributors list](https://github.com/PX4/Firmware/graphs/contributors) (Github).
## Supported Hardware
This repository contains code supporting these boards:
* [Snapdragon Flight](https://dev.px4.io/en/flight_controller/snapdragon_flight.html)
* [Intel Aero](https://dev.px4.io/en/flight_controller/intel_aero.html)
* [Raspberry PI with Navio 2](https://dev.px4.io/en/flight_controller/raspberry_pi.html)
* [Snapdragon Flight](https://docs.px4.io/en/flight_controller/snapdragon_flight.html)
* [Intel Aero](https://docs.px4.io/en/flight_controller/intel_aero.html)
* [Raspberry PI with Navio 2](https://docs.px4.io/en/flight_controller/raspberry_pi_navio2.html)
* [Parrot Bebop 2](https://dev.px4.io/en/advanced/parrot_bebop.html)
* FMUv2.x
* [Pixhawk](https://dev.px4.io/en/flight_controller/pixhawk.html)
* Pixhawk Mini
* [Pixfalcon](https://dev.px4.io/en/flight_controller/pixfalcon.html)
* [Pixhawk](https://docs.px4.io/en/flight_controller/pixhawk.html)
* [Pixhawk Mini](https://docs.px4.io/en/flight_controller/pixhawk_mini.html)
* [Pixfalcon](https://docs.px4.io/en/flight_controller/pixfalcon.html)
* FMUv3.x [Pixhawk 2](https://pixhawk.org/modules/pixhawk2)
* FMUv4.x
* [Pixracer](https://dev.px4.io/en/flight_controller/pixracer.html)
* Pixhawk 3 Pro
* [Pixracer](https://docs.px4.io/en/flight_controller/pixracer.html)
* [Pixhawk 3 Pro](https://docs.px4.io/en/flight_controller/pixhawk3_pro.html)
* FMUv5.x (ARM Cortex M7, future Pixhawk)
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
* Gumstix AeroCore (v1 and v2)
* [STM32F4Discovery](http://www.st.com/en/evaluation-tools/stm32f4discovery.html) (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
* [Gumstix AeroCore](https://www.gumstix.com/aerocore-2/) (only v2)
* [Airmind MindPX V2.8](http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
* [Airmind MindRacer V1.2](http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
* [Bitcraze Crazyflie 2.0](https://dev.px4.io/en/flight_controller/crazyflie2.html)
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/en/flight_controller/crazyflie2.html)
## Project Milestones
Additional information about supported hardware can be found in [PX4 user Guide > Autopilot Hardware](https://docs.px4.io/en/flight_controller/).
The PX4 software and Pixhawk hardware (which has been designed for it) has been created in 2011 by [Lorenz Meier](https://github.com/LorenzMeier).
## Project Roadmap
A high level project roadmap is available [here](https://www.dronecode.org/roadmap/).
+13 -3
View File
@@ -28,19 +28,29 @@ list(APPEND romfs_dependencies
${romfs_temp_dir}/init.d/rc.autostart
)
# create romfs.bin
# copy px4io binary if configured
if (config_io_board)
list(APPEND romfs_dependencies
copy_px4io_bin
${fw_io_bin}
)
endif()
# create romfs.img
add_custom_command(OUTPUT romfs.img
COMMAND ${CMAKE_COMMAND} -E remove -f romfs.img romfs.txt
COMMAND ${GENROMFS} -f romfs.img -d ${romfs_temp_dir} -V "NSHInitVol" -v > romfs.txt 2>&1
DEPENDS ${romfs_dependencies}
)
# create romfs.o
# create nsh_romfsimg.c
add_custom_command(OUTPUT nsh_romfsimg.c
COMMAND ${CMAKE_COMMAND} -E remove -f nsh_romfsimg.c
COMMAND xxd -i romfs.img nsh_romfsimg.c
COMMAND sed 's/unsigned/const unsigned/g' nsh_romfsimg.c > nsh_romfsimg.c.tmp && mv nsh_romfsimg.c.tmp nsh_romfsimg.c
DEPENDS romfs.img
)
add_library(romfs STATIC nsh_romfsimg.c)
add_dependencies(romfs platforms__common)
add_dependencies(romfs prebuild_targets)
set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
+1 -1
View File
@@ -40,6 +40,6 @@ then
param set BAT_A_PER_V 15.39103
fi
set MIXER quad_dc
set MIXER quad_w
set PWM_OUT 1234
@@ -8,7 +8,6 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.mc_defaults
sh /etc/init.d/4001_quad_x
set MIXER quad_x
param set SYS_HITL 1
@@ -17,7 +17,6 @@
# @output AUX4 Rudder
# @output AUX5 Throttle
#
# @board px4fmu-v1 exclude
sh /etc/init.d/rc.vtol_defaults
@@ -38,6 +38,7 @@ then
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set MAV_TYPE 19
param set VT_ELEV_MC_LOCK 0
fi
set MIXER caipirinha_vtol
@@ -16,6 +16,8 @@
#
# @maintainer Roman Bapst <roman@px4.io>
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.vtol_defaults
@@ -24,7 +24,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set VT_F_TRANS_THR 0.75
param set VT_ARSP_TRANS 12
param set VT_ARSP_BLEND 6
@@ -22,7 +22,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set VT_F_TRANS_THR 0.75
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.15
@@ -14,7 +14,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set VT_F_TRANS_THR 0.75
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
+1 -1
View File
@@ -14,7 +14,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set VT_F_TRANS_THR 0.75
param set PWM_AUX_REV1 1
param set PWM_AUX_REV2 1
@@ -19,7 +19,7 @@ then
param set VT_ARSP_TRANS 15.0
param set VT_B_TRANS_DUR 4.0
param set VT_TRANS_MIN_TM 5.0
param set VT_TRANS_THR 0.6
param set VT_F_TRANS_THR 0.6
param set VT_TRANS_TIMEOUT 30.0
param set FW_AIRSPD_MAX 22.0
+2
View File
@@ -7,6 +7,8 @@
#
# @maintainer Samay Siga <samay_s@icloud.com>
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.vtol_defaults
+1 -1
View File
@@ -23,7 +23,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_MOT_COUNT 3
param set VT_FW_MOT_OFFID 3
param set VT_IDLE_PWM_MC 1080
param set VT_IDLE_PWM_MC 1150
param set VT_TYPE 1
param set VT_B_TRANS_DUR 1.0
+1 -1
View File
@@ -23,7 +23,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 1
param set VT_F_TRANS_THR 1
param set VT_DWN_PITCH_MAX 8
param set VT_FW_QC_P 55
param set VT_FW_QC_R 55
@@ -1,19 +0,0 @@
#!nsh
#
# @name Passthrough mode for Snapdragon
#
# @type custom
# @class Tool
#
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Julian Oes <julian@oes.ch>
#
# This startup can be used on Pixhawk/Pixfalcon/Pixracer for the
# passthrough of RC input and PWM output.
set VEHICLE_TYPE passthrough
+1 -1
View File
@@ -11,7 +11,7 @@
# @type Quadrotor x
# @class Copter
#
# @maintainer Lucas de Marchi
# @maintainer Beat Kueng <beat@px4.io>
#
sh /etc/init.d/rc.mc_defaults
+6 -8
View File
@@ -17,17 +17,15 @@ set PWM_OUT 1234
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 2.0
param set MC_ROLLRATE_P 0.05
param set MC_ROLL_P 2.2
param set MC_ROLLRATE_P 0.06
param set MC_ROLLRATE_I 0.2
param set MC_ROLLRATE_D 0.0015
param set MC_ROLL_TC 0.18
param set MC_ROLLRATE_D 0.0017
param set MC_PITCH_P 2.0
param set MC_PITCHRATE_P 0.05
param set MC_PITCH_P 2.2
param set MC_PITCHRATE_P 0.06
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_D 0.0015
param set MC_PITCH_TC 0.18
param set MC_PITCHRATE_D 0.0017
param set MC_YAW_P 1.0
param set MC_YAWRATE_P 0.15
@@ -10,6 +10,8 @@
#
# @maintainer
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.ugv_defaults
@@ -14,6 +14,8 @@
# @output MAIN7 pass-through of control group 0, channel 6
# @output MAIN8 pass-through of control group 0, channel 7
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.axialracing_ax10_defaults
@@ -12,6 +12,8 @@
#
# @maintainer Marco Zorzi
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.ugv_defaults
+1 -21
View File
@@ -120,27 +120,7 @@ then
fi
fi
if ver hwcmp MINDPX_V2
then
set MIXER_AUX none
fi
if ver hwcmp CRAZYFLIE
then
set MIXER_AUX none
fi
if ver hwcmp AEROFC_V1
then
set MIXER_AUX none
fi
if ver hwcmp PX4FMU_V4
then
set MIXER_AUX none
fi
if ver hwcmp PX4FMU_V5
if ver hwcmp MINDPX_V2 CRAZYFLIE AEROFC_V1 PX4FMU_V4 NXPHLITE_V3
then
set MIXER_AUX none
fi
+33
View File
@@ -0,0 +1,33 @@
#!nsh
# Logging
#
# Standard startup script for logging
#
if param compare SYS_LOGGER 0
then
sdlog2 start -r 100 -a -b 9 -t
else
set LOGGER_ARGS ""
if param compare SDLOG_MODE 1
then
set LOGGER_ARGS "-e"
fi
if param compare SDLOG_MODE 2
then
set LOGGER_ARGS "-f"
fi
if ver hwcmp AEROFC_V1
then
set LOGGER_ARGS "-m mavlink"
fi
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
unset LOGGER_ARGS
fi
unset LOGGER_BUF
+77 -10
View File
@@ -31,8 +31,8 @@ else
# External SPI
ms5611 -S start
# Internal SPI
ms5611 -s start
# Internal SPI (auto detect ms5611 or ms5607)
ms5611 -T 0 -s start
# Blacksheep telemetry
bst start
@@ -42,13 +42,13 @@ fi
if ver hwcmp NXPHLITE_V3
then
# Internal I2C
# Internal I2C (baro)
mpl3115a2 -I start
# Internal SPI
fxos8700cq start -a 8 -R 0
# Internal SPI (accel + mag)
fxos8701cq start -a 8 -R 0
# Internal SPI
# Internal SPI (gyro)
fxas21002c start -R 0
fi
@@ -56,6 +56,7 @@ if ver hwcmp AUAV_X21
then
# External I2C bus
hmc5883 -C -T -X start
lis3mdl -X start
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
mpu6000 -R 2 -T 20608 start
@@ -69,6 +70,9 @@ fi
if ver hwcmp PX4FMU_V2
then
# V2 build hwtypecmp is always false
set BOARD_FMUV3 0
# External I2C bus
hmc5883 -C -T -X start
lis3mdl -X start
@@ -79,8 +83,6 @@ then
# Internal SPI bus ICM-20608-G
mpu6000 -T 20608 start
# V2 build hwtypecmp is always false
set BOARD_FMUV3 0
# V3 build hwtypecmp supports V2|V2M|V30
if ver hwtypecmp V30
then
@@ -99,6 +101,26 @@ then
fi
fi
# Check if a Pixhack (which reports as V2M) is present
if ver hwtypecmp V2M
then
# Pixhawk Mini doesn't have these sensors,
# so if they are found we know its a Pixhack
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -S -R 4 start
then
set BOARD_FMUV3 20
else
# Check for Pixhack 3.1
# external MPU9250 is rotated 180 degrees yaw
if mpu9250 -S -R 4 start
then
set BOARD_FMUV3 21
fi
fi
fi
if [ $BOARD_FMUV3 != 0 ]
then
# sensor heating is available, but we disable it for now
@@ -114,9 +136,9 @@ then
then
# v2.0 internal MPU6000 is rotated 180 deg roll, 270 deg yaw
mpu6000 -R 14 start
# v2.0 Has internal hmc5883 on SPI1
hmc5883 -C -T -S -R 8 start
fi
if [ $BOARD_FMUV3 == 21 ]
@@ -143,6 +165,8 @@ then
l3gd20 start
lsm303d start
fi
unset BOARD_FMUV3
fi
if ver hwcmp PX4_SAME70XPLAINED_V1
@@ -173,7 +197,7 @@ then
# lis3mdl internal SPI bus is rotated 90 deg yaw
else
# BMI055 gyro internal SPI bus
bmi055 -G start
bmi055 -G start
fi
fi
@@ -372,6 +396,49 @@ then
teraranger start
fi
# Benewake TFMini
if param greater SENS_EN_TFMINI 0
then
if ver hwcmp PX4FMU_V2 PX4FMU_V4PRO
then
# start the driver on serial 4/5
tfmini start -d /dev/ttyS6
else
if ver hwcmp AEROFC_V1
then
# start the driver on telemetry
tfmini start -d /dev/ttyS3
else
if param compare SYS_COMPANION 0
then
# start on default mavlink companion device
tfmini start -d /dev/ttyS2
fi
fi
fi
fi
# LeddarOne
if param greater SENS_EN_LEDDAR1 0
then
if ver hwcmp PX4FMU_V2 PX4FMU_V4PRO
then
# start the driver on serial 4/5
leddar_one -d /dev/ttyS6 start
fi
if ver hwcmp AEROFC_V1
then
# start the driver on telemetry
leddar_one -d /dev/ttyS3 start
else
if param compare SYS_COMPANION 0
then
# start on default mavlink companion device
leddar_one -d /dev/ttyS2 start
fi
fi
fi
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
usleep 20000
sensors start
+74 -141
View File
@@ -15,7 +15,7 @@ set +e
#
# UART mapping on FMUv2/3/4:
#
# UART1 /dev/ttyS0 IO debug
# UART1 /dev/ttyS0 IO debug (except v4, there ttyS0 is the wifi)
# USART2 /dev/ttyS1 TELEM1 (flow control)
# USART3 /dev/ttyS2 TELEM2 (flow control)
# UART4
@@ -28,7 +28,7 @@ set +e
# UART1 /dev/ttyS0 GPS
# USART2 /dev/ttyS1 TELEM1 (flow control)
# USART3 /dev/ttyS2 TELEM2 (flow control)
# UART4 /dev/ttyS3 ?
# UART4 /dev/ttyS3 TELEM4
# USART6 /dev/ttyS4 TELEM3 (flow control)
# UART7 /dev/ttyS5 ?
# UART8 /dev/ttyS6 CONSOLE
@@ -51,7 +51,7 @@ ver all
#
set MODE autostart
set TUNE_ERR ML<<CP4CP4CP4CP4CP4
set TUNE_ERR "ML<<CP4CP4CP4CP4CP4"
set LOG_FILE /fs/microsd/bootlog.txt
#
@@ -60,7 +60,6 @@ set LOG_FILE /fs/microsd/bootlog.txt
# REBOOTWORK this needs to start after the flight control loop
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
echo "[i] microSD mounted: /fs/microsd"
if hardfault_log check
then
tone_alarm error
@@ -69,9 +68,6 @@ then
hardfault_log reset
tone_alarm stop
fi
else
# Start playing the startup tune
tone_alarm start
fi
else
tone_alarm MBAGP
@@ -79,9 +75,9 @@ else
then
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
echo "INFO [init] MicroSD card formatted"
echo "INFO [init] card formatted"
else
echo "ERROR [init] Format failed"
echo "ERROR [init] format failed"
tone_alarm MNBG
set LOG_FILE /dev/null
fi
@@ -97,7 +93,6 @@ fi
set FRC /fs/microsd/etc/rc.txt
if [ -f $FRC ]
then
echo "INFO [init] Executing script: ${FRC}"
sh $FRC
set MODE custom
fi
@@ -111,6 +106,12 @@ then
#
uorb start
# Start tone driver
tone_alarm start
# play startup tone
tune_control play -t 1
#
# Load parameters
#
@@ -194,25 +195,11 @@ then
set MAV_TYPE none
set FAILSAFE none
set USE_IO no
set LOGGER_BUF 16
if ver hwcmp PX4FMU_V4
then
param set SYS_FMU_TASK 1
fi
if ver hwcmp PX4FMU_V4PRO
then
param set SYS_FMU_TASK 1
fi
set LOGGER_BUF 14
if ver hwcmp PX4FMU_V5
then
param set SYS_FMU_TASK 1
set MAVLINK_COMPANION_DEVICE /dev/ttyS3
set LOGGER_BUF 64
param set SDLOG_MODE 2
fi
if ver hwcmp CRAZYFLIE
@@ -299,6 +286,13 @@ then
then
param set CBRK_IO_SAFETY 22027
fi
# Run FMU as task on Pixracer and on boards with enough RAM
if ver hwcmp PX4FMU_V4 PX4FMU_V4PRO PX4FMU_V5
then
param set SYS_FMU_TASK 1
fi
param set SYS_AUTOCONFIG 0
fi
unset AUTOCNF
@@ -316,8 +310,6 @@ then
if px4io checkcrc ${IO_FILE}
then
echo "[init] PX4IO CRC OK" >> $LOG_FILE
set IO_PRESENT yes
else
tone_alarm MLL32CP8MB
@@ -349,7 +341,7 @@ then
fi
else
echo "PX4IO update failed" >> $LOG_FILE
tone_alarm ${TUNE_ERR}
tune_control play -m ${TUNE_ERR}
fi
fi
fi
@@ -358,7 +350,7 @@ then
if [ $IO_PRESENT == no ]
then
echo "PX4IO not found" >> $LOG_FILE
tone_alarm ${TUNE_ERR}
tune_control play -m ${TUNE_ERR}
fi
fi
@@ -464,7 +456,6 @@ then
then
if param compare UAVCAN_ENABLE 0
then
echo "OVERRIDING UAVCAN_ENABLE = 3" >> $LOG_FILE
param set UAVCAN_ENABLE 3
fi
fi
@@ -476,7 +467,7 @@ then
sh /etc/init.d/rc.io
else
echo "PX4IO start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
tune_control play -m ${TUNE_ERR}
fi
fi
@@ -486,7 +477,7 @@ then
then
else
echo "FMU start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
tune_control play -m ${TUNE_ERR}
fi
fi
@@ -505,8 +496,7 @@ then
if mkblctrl $MKBLCTRL_ARG
then
else
echo "MK start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
tune_control play -m ${TUNE_ERR}
fi
unset MKBLCTRL_ARG
fi
@@ -514,10 +504,10 @@ then
if [ $OUTPUT_MODE == hil ]
then
if pwm_out_sim mode_pwm16
if pwm_out_sim start
then
else
tone_alarm $TUNE_ERR
tune_control play -m ${TUNE_ERR}
fi
fi
@@ -533,7 +523,7 @@ then
sh /etc/init.d/rc.io
else
echo "PX4IO start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
tune_control play -m ${TUNE_ERR}
fi
fi
else
@@ -543,7 +533,7 @@ then
then
else
echo "FMU mode_${FMU_MODE} start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
tune_control play -m ${TUNE_ERR}
fi
fi
fi
@@ -554,7 +544,7 @@ then
# Normal mode, use baudrate 57600 (default) and data rate 1000 bytes/s
set MAVLINK_F "-r 1200 -f"
# Avoid using ttyS1 for MAVLink on FMUv4
# Use ttyS1 for MAVLink on FMUv4 in addition to ttyS0 (debug)
if ver hwcmp PX4FMU_V4
then
set MAVLINK_F "-r 1200 -d /dev/ttyS1"
@@ -565,6 +555,16 @@ then
if ver hwcmp AEROFC_V1
then
set MAVLINK_F "-r 1200 -d /dev/ttyS3"
# Only start mavlink if the Benewake TFMini or LeddarOne isn't being used
if param greater SENS_EN_TFMINI 0
then
set MAVLINK_F none
fi
if param greater SENS_EN_LEDDAR1 0
then
set MAVLINK_F none
fi
fi
if ver hwcmp CRAZYFLIE
@@ -589,7 +589,14 @@ then
if param compare SYS_COMPANION 10
then
frsky_telemetry start -d ${MAVLINK_COMPANION_DEVICE}
else
if ver hwcmp PX4FMU_V4 PX4FMU_V4PRO MINDPX_V2
then
# This is TELEM4 on Pixhawk 3 Pro
frsky_telemetry start -d /dev/ttyS6
fi
fi
if param compare SYS_COMPANION 20
then
syslink start
@@ -644,9 +651,25 @@ then
fi
if param compare SYS_COMPANION 419200
then
iridiumsbd start -d /dev/ttyS2
iridiumsbd start -d ${MAVLINK_COMPANION_DEVICE}
mavlink start -d /dev/iridium -b 19200 -m iridium -r 10
fi
if param compare SYS_COMPANION 519200
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 19200 -m minimal -r 1000
fi
if param compare SYS_COMPANION 538400
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 38400 -m minimal -r 1000
fi
if param compare SYS_COMPANION 557600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 57600 -m minimal -r 1000
fi
if param compare SYS_COMPANION 5115200
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 115200 -m minimal -r 1000
fi
if param compare SYS_COMPANION 1921600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 921600 -r 20000
@@ -663,48 +686,27 @@ then
#
if param greater UAVCAN_ENABLE 0
then
# Start core UAVCAN module
if uavcan start
then
set LOGGER_BUF 6
uavcan start fw
if param greater UAVCAN_ENABLE 1
then
# Reduce logger buffer to free up some RAM for UAVCAN servers
set LOGGER_BUF 6
# Start UAVCAN firmware update server and dynamic node ID allocation server
uavcan start fw
fi
else
tone_alarm ${TUNE_ERR}
fi
fi
if ver hwcmp PX4FMU_V4
then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp MINDPX_V2
then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp PX4FMU_V2
if ver hwcmp PX4FMU_V2 PX4FMU_V4 PX4FMU_V4PRO MINDPX_V2 PX4FMU_V5
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp PX4FMU_V4
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp PX4FMU_V4PRO
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp MINDPX_V2
then
px4flow start &
fi
if ver hwcmp AEROFC_V1
then
# don't start mavlink ttyACM0 on aerofc_v1
@@ -713,36 +715,6 @@ then
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
fi
#
# Logging
#
if param compare SYS_LOGGER 0
then
sdlog2 start -r 100 -a -b 9 -t
else
set LOGGER_ARGS ""
if param compare SDLOG_MODE 1
then
set LOGGER_ARGS "-e"
fi
if param compare SDLOG_MODE 2
then
set LOGGER_ARGS "-f"
fi
if ver hwcmp AEROFC_V1
then
set LOGGER_ARGS "-m mavlink"
fi
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
unset LOGGER_BUF
unset LOGGER_ARGS
fi
#
# Fixed wing setup
#
@@ -823,7 +795,6 @@ then
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
then
echo "Unknown MAV_TYPE"
param set MAV_TYPE 2
else
param set MAV_TYPE ${MAV_TYPE}
@@ -905,46 +876,6 @@ then
sh /etc/init.d/rc.ugv_apps
fi
#
# For snapdragon, we need a passthrough mode
# Do not run any mavlink instances since we need the serial port for
# communication with Snapdragon.
#
if [ $VEHICLE_TYPE == passthrough ]
then
mavlink stop-all
commander stop
# Stop multicopter attitude controller if it is running, the controls come
# from Snapdragon.
if mc_att_control stop
then
fi
# Start snapdragon interface on serial port.
if ver hwcmp PX4FMU_V2
then
# On Pixfalcon use the standard telemetry port (Telem 1).
snapdragon_rc_pwm start -d /dev/ttyS1
px4io start
fi
if ver hwcmp PX4FMU_V4
then
# On Pixracer use Telem 2 port (TL2).
snapdragon_rc_pwm start -d /dev/ttyS2
fmu mode_pwm4 $FMU_ARGS
fi
pwm failsafe -c 1234 -p 900
pwm disarmed -c 1234 -p 900
# Arm straightaway.
pwm arm
# Use 400 Hz PWM on all channels.
pwm rate -a -r 400
fi
unset MIXER
unset MAV_TYPE
unset OUTPUT_MODE
@@ -1028,6 +959,8 @@ then
fi
fi
sh /etc/init.d/rc.logging
# End of autostart
fi
+81
View File
@@ -0,0 +1,81 @@
Aileron/rudder/elevator/throttle mixer for PX4FMU
==================================================
This file defines mixers suitable for controlling a fixed wing aircraft with
aileron, rudder, elevator and throttle controls using PX4FMU. The configuration
assumes the aileron servo(s) are connected to PX4FMU servo output 0, the
elevator to output 1, the rudder to output 2 and the throttle to output 3.
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
(roll), 1 (pitch) and 3 (thrust).
CH1: Aileron mixer
-------------
Two scalers total (output, roll).
This mixer assumes that the aileron servos are set up correctly mechanically;
depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
As there is only one output, if using two servos adjustments to compensate for
differences between the servos must be made mechanically. To obtain the correct
motion using a Y cable, the servos can be positioned reversed from one another.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
CH2: Elevator mixer
------------
Two scalers total (output, roll).
This mixer assumes that the elevator servo is set up correctly mechanically;
depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
CH3: Rudder mixer
------------
Two scalers total (output, yaw).
This mixer assumes that the rudder servo is set up correctly mechanically;
depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
CH4: Motor speed mixer
-----------------
Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
CH5: Flaps mixer
------------
Flaps are controlled automatically in position control and auto
but can also be controlled manually
M: 1
O: 5000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
Ch6: Landing gear mixer
------------
By default pass-through of gear switch
M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
@@ -0,0 +1,21 @@
Mixer for the gazebo tailsitter model
=====================================
R: 4x 10000 10000 10000 0
Z:
# left elevon
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
# right elevon
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
# mixer for the virtual elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 -10000 -10000 0 -10000 10000
+41
View File
@@ -0,0 +1,41 @@
Mixer for quad tiltrotor (x motor configuration)
================================================
This file defines a single mixer for a tiltrotor (SITL gazebo) with motors in X configuration. The plane has two ailerons and one elevator.
R: 4x 10000 10000 10000 0
# tilt servo motor 1
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 0 20000 -10000 -10000 10000
# tilt servo motor 2
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 0 20000 -10000 -10000 10000
# tilt servo motor 3
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 0 20000 -10000 -10000 10000
# tilt servo motor 4
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 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
+3 -3
View File
@@ -8,9 +8,9 @@ then
PATTERN="$1"
fi
exec find src \
-path src/examples/attitude_estimator_ekf -prune -o \
-path src/examples/ekf_att_pos_estimator -prune -o \
exec find src platforms \
-path platforms/nuttx/NuttX -prune -o \
-path platforms/nuttx/nuttx-configs -prune -o \
-path src/lib/DriverFramework -prune -o \
-path src/lib/ecl -prune -o \
-path src/lib/matrix -prune -o \
+7 -7
View File
@@ -4,25 +4,25 @@ if [ -z ${PX4_DOCKER_REPO+x} ]; then
echo "guessing PX4_DOCKER_REPO based on input";
if [[ $@ =~ .*px4fmu.* ]]; then
# nuttx-px4fmu-v{1,2,3,4,5}
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-10-23"
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-12-30"
elif [[ $@ =~ .*rpi.* ]] || [[ $@ =~ .*bebop.* ]]; then
# posix_rpi_cross, posix_bebop_default
PX4_DOCKER_REPO="px4io/px4-dev-raspi:2017-10-23"
PX4_DOCKER_REPO="px4io/px4-dev-raspi:2017-12-30"
elif [[ $@ =~ .*eagle.* ]] || [[ $@ =~ .*excelsior.* ]]; then
# eagle, excelsior
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2017-10-23"
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2017-12-29"
elif [[ $@ =~ .*ocpoc.* ]]; then
# posix_ocpoc_ubuntu
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2017-10-23"
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2017-12-30"
elif [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
# clang tools
PX4_DOCKER_REPO="px4io/px4-dev-clang:2017-10-23"
PX4_DOCKER_REPO="px4io/px4-dev-clang:2017-12-30"
elif [[ $@ =~ .*cppcheck.* ]]; then
# TODO: remove this once px4io/px4-dev-base updates
PX4_DOCKER_REPO="px4io/px4-dev-base:ubuntu17.10"
elif [[ $@ =~ .*tests* ]]; then
# run all tests with simulation
PX4_DOCKER_REPO="px4io/px4-dev-simulation:2017-10-23"
PX4_DOCKER_REPO="px4io/px4-dev-simulation:2017-12-30"
fi
else
echo "PX4_DOCKER_REPO is set to '$PX4_DOCKER_REPO'";
@@ -30,7 +30,7 @@ fi
# otherwise default to nuttx
if [ -z ${PX4_DOCKER_REPO+x} ]; then
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-10-23"
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-12-30"
fi
# docker hygiene
+23 -9
View File
@@ -1,14 +1,19 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import os
import os, glob
"""
Runs process_logdata_ekf.py on all the files in the suplied directory with a .ulg extension
Runs process_logdata_ekf.py on the .ulg files in the supplied directory. ulog files are skipped from the analysis, if a
corresponding .pdf file already exists (unless the overwrite flag was set).
"""
parser = argparse.ArgumentParser(description='Analyse the estimator_status and ekf2_innovation message data for all .ulg files in the specified directory')
parser = argparse.ArgumentParser(description='Analyse the estimator_status and ekf2_innovation message data for the'
' .ulg files in the specified directory')
parser.add_argument("directory_path")
parser.add_argument('-o', '--overwrite', action='store_true',
help='Whether to overwrite an already analysed file. If a file with .pdf extension exists for a .ulg'
'file, the log file will be skipped from analysis unless this flag has been set.')
def is_valid_directory(parser, arg):
if os.path.isdir(arg):
@@ -19,9 +24,18 @@ def is_valid_directory(parser, arg):
args = parser.parse_args()
ulog_directory = args.directory_path
print("\n"+"analysing all .ulog files in "+ulog_directory)
# Run the analysis script on all the log files found in the specified directory
for file in os.listdir(ulog_directory):
if file.endswith(".ulg"):
print("\n"+"loading "+file+" for analysis")
os.system("python process_logdata_ekf.py '{}'".format(os.path.join(ulog_directory, file)))
print("\n"+"analysing the .ulg files in "+ulog_directory)
# get all the ulog files found in the specified directory
ulog_files = glob.glob(os.path.join(ulog_directory, '*.ulg'))
# remove the files already analysed unless the overwrite flag was specified. A ulog file is consired to be analysed if
# a corresponding .pdf file exists.'
if not args.overwrite:
print("skipping already analysed ulg files.")
ulog_files = [ulog_file for ulog_file in ulog_files if not os.path.exists('{}.pdf'.format(ulog_file))]
# analyse all ulog files
for ulog_file in ulog_files:
print("\n"+"loading "+ulog_file +" for analysis")
os.system("python process_logdata_ekf.py '{}'".format(ulog_file))
+1 -1
View File
@@ -1146,7 +1146,7 @@ test_results = {
'yaw_sensor_status':['Pass','Yaw sensor check summary. This sensor data can be sourced from the magnetometer or an external vision system. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'vel_sensor_status':['Pass','Velocity sensor check summary. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'pos_sensor_status':['Pass','Position sensor check summary. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'hgt_sensor_status':['Pass','Height sensor check summary. This sensor data can be sourced from either Baro, GPS, range fidner or external vision system. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'hgt_sensor_status':['Pass','Height sensor check summary. This sensor data can be sourced from either Baro or GPS or range finder or external vision system. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no anomalies were detected and no further investigation is required'],
'hagl_sensor_status':['Pass','Height above ground sensor check summary. This sensor data is normally sourced from a rangefinder sensor. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'tas_sensor_status':['Pass','Airspeed sensor check summary. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'imu_sensor_status':['Pass','IMU sensor check summary. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
+393 -393
View File
@@ -16,7 +16,7 @@ Data can be gathered using the following sequence:
1) Power up the board and set the TC_A_ENABLE, TC_B_ENABLE and TC_G_ENABLE parameters to 1
2) Set all CAL_GYR and CAL_ACC parameters to defaults
3) Set the SYS_LOGGER parameter to 1 to use the new system logger
4) Set the SDLOG_MODE parameter to 2, and SDLOG_PROFILE parameter to 2 to enable logging of sensor data for calibration and power off
4) Set the SDLOG_MODE parameter to 2, and SDLOG_PROFILE parameter to 4 to enable logging of sensor data for calibration and power off
5) Cold soak the board for 30 minutes
6) Move to a warm dry, still air, constant pressure environment.
7) Apply power for 45 minutes, keeping the board still.
@@ -24,7 +24,7 @@ Data can be gathered using the following sequence:
9) Open a terminal window in the Firmware/Tools directory and run the python calibration script script file: 'python process_sensor_caldata.py <full path name to .ulog file>
10) Power the board, connect QGC and load the parameter from the generated .params file onto the board using QGC. Due to the number of parameters, loading them may take some time.
11) TODO - we need a way for user to reliably tell when parameters have all been changed and saved.
12) After parameters have finished loading, set SDLOG_MODE to 1 to re-enable normal logging and remove power.
12) After parameters have finished loading, set SDLOG_MODE and SDLOG_PROFILE to their respective values prior to step 4) and remove power.
13) Power the board and perform a normal gyro and accelerometer sensor calibration using QGC. The board must be repowered after this step before flying due to large parameter changes and the thermal compensation parameters only being read on startup.
Outputs thermal compensation parameters in a file named <inputfilename>.params which can be loaded onto the board using QGroundControl
@@ -56,16 +56,16 @@ for d in data:
if sensor_instance == 0:
sensor_gyro_0 = d.data
print('found gyro 0 data')
num_gyros = 1
num_gyros = 1
if sensor_instance == 1:
sensor_gyro_1 = d.data
print('found gyro 1 data')
num_gyros = 2
if sensor_instance == 2:
num_gyros = 2
if sensor_instance == 2:
sensor_gyro_2 = d.data
print('found gyro 2 data')
num_gyros = 3
sensor_instance = sensor_instance +1
num_gyros = 3
sensor_instance = sensor_instance +1
# extract accel data
sensor_instance = 0
@@ -75,15 +75,15 @@ for d in data:
if sensor_instance == 0:
sensor_accel_0 = d.data
print('found accel 0 data')
num_accels = 1
num_accels = 1
if sensor_instance == 1:
sensor_accel_1 = d.data
print('found accel 1 data')
num_accels = 2
num_accels = 2
if sensor_instance == 2:
sensor_accel_2 = d.data
print('found accel 2 data')
num_accels = 3
num_accels = 3
sensor_instance = sensor_instance +1
# extract baro data
@@ -94,11 +94,11 @@ for d in data:
if sensor_instance == 0:
sensor_baro_0 = d.data
print('found baro 0 data')
num_baros = 1
num_baros = 1
if sensor_instance == 1:
sensor_baro_1 = d.data
print('found baro 1 data')
num_baros = 2
num_baros = 2
sensor_instance = sensor_instance +1
# open file to save plots to PDF
@@ -133,72 +133,72 @@ gyro_0_params = {
# curve fit the data for gyro 0 corrections
if num_gyros >= 1:
gyro_0_params['TC_G0_ID'] = int(np.median(sensor_gyro_0['device_id']))
gyro_0_params['TC_G0_ID'] = int(np.median(sensor_gyro_0['device_id']))
# find the min, max and reference temperature
gyro_0_params['TC_G0_TMIN'] = np.amin(sensor_gyro_0['temperature'])
gyro_0_params['TC_G0_TMAX'] = np.amax(sensor_gyro_0['temperature'])
gyro_0_params['TC_G0_TREF'] = 0.5 * (gyro_0_params['TC_G0_TMIN'] + gyro_0_params['TC_G0_TMAX'])
temp_rel = sensor_gyro_0['temperature'] - gyro_0_params['TC_G0_TREF']
temp_rel_resample = np.linspace(gyro_0_params['TC_G0_TMIN']-gyro_0_params['TC_G0_TREF'], gyro_0_params['TC_G0_TMAX']-gyro_0_params['TC_G0_TREF'], 100)
temp_resample = temp_rel_resample + gyro_0_params['TC_G0_TREF']
# find the min, max and reference temperature
gyro_0_params['TC_G0_TMIN'] = np.amin(sensor_gyro_0['temperature'])
gyro_0_params['TC_G0_TMAX'] = np.amax(sensor_gyro_0['temperature'])
gyro_0_params['TC_G0_TREF'] = 0.5 * (gyro_0_params['TC_G0_TMIN'] + gyro_0_params['TC_G0_TMAX'])
temp_rel = sensor_gyro_0['temperature'] - gyro_0_params['TC_G0_TREF']
temp_rel_resample = np.linspace(gyro_0_params['TC_G0_TMIN']-gyro_0_params['TC_G0_TREF'], gyro_0_params['TC_G0_TMAX']-gyro_0_params['TC_G0_TREF'], 100)
temp_resample = temp_rel_resample + gyro_0_params['TC_G0_TREF']
# fit X axis
coef_gyro_0_x = np.polyfit(temp_rel,sensor_gyro_0['x'],3)
gyro_0_params['TC_G0_X3_0'] = coef_gyro_0_x[0]
gyro_0_params['TC_G0_X2_0'] = coef_gyro_0_x[1]
gyro_0_params['TC_G0_X1_0'] = coef_gyro_0_x[2]
gyro_0_params['TC_G0_X0_0'] = coef_gyro_0_x[3]
fit_coef_gyro_0_x = np.poly1d(coef_gyro_0_x)
gyro_0_x_resample = fit_coef_gyro_0_x(temp_rel_resample)
# fit X axis
coef_gyro_0_x = np.polyfit(temp_rel,sensor_gyro_0['x'],3)
gyro_0_params['TC_G0_X3_0'] = coef_gyro_0_x[0]
gyro_0_params['TC_G0_X2_0'] = coef_gyro_0_x[1]
gyro_0_params['TC_G0_X1_0'] = coef_gyro_0_x[2]
gyro_0_params['TC_G0_X0_0'] = coef_gyro_0_x[3]
fit_coef_gyro_0_x = np.poly1d(coef_gyro_0_x)
gyro_0_x_resample = fit_coef_gyro_0_x(temp_rel_resample)
# fit Y axis
coef_gyro_0_y = np.polyfit(temp_rel,sensor_gyro_0['y'],3)
gyro_0_params['TC_G0_X3_1'] = coef_gyro_0_y[0]
gyro_0_params['TC_G0_X2_1'] = coef_gyro_0_y[1]
gyro_0_params['TC_G0_X1_1'] = coef_gyro_0_y[2]
gyro_0_params['TC_G0_X0_1'] = coef_gyro_0_y[3]
fit_coef_gyro_0_y = np.poly1d(coef_gyro_0_y)
gyro_0_y_resample = fit_coef_gyro_0_y(temp_rel_resample)
# fit Y axis
coef_gyro_0_y = np.polyfit(temp_rel,sensor_gyro_0['y'],3)
gyro_0_params['TC_G0_X3_1'] = coef_gyro_0_y[0]
gyro_0_params['TC_G0_X2_1'] = coef_gyro_0_y[1]
gyro_0_params['TC_G0_X1_1'] = coef_gyro_0_y[2]
gyro_0_params['TC_G0_X0_1'] = coef_gyro_0_y[3]
fit_coef_gyro_0_y = np.poly1d(coef_gyro_0_y)
gyro_0_y_resample = fit_coef_gyro_0_y(temp_rel_resample)
# fit Z axis
coef_gyro_0_z = np.polyfit(temp_rel,sensor_gyro_0['z'],3)
gyro_0_params['TC_G0_X3_2'] = coef_gyro_0_z[0]
gyro_0_params['TC_G0_X2_2'] = coef_gyro_0_z[1]
gyro_0_params['TC_G0_X1_2'] = coef_gyro_0_z[2]
gyro_0_params['TC_G0_X0_2'] = coef_gyro_0_z[3]
fit_coef_gyro_0_z = np.poly1d(coef_gyro_0_z)
gyro_0_z_resample = fit_coef_gyro_0_z(temp_rel_resample)
# fit Z axis
coef_gyro_0_z = np.polyfit(temp_rel,sensor_gyro_0['z'],3)
gyro_0_params['TC_G0_X3_2'] = coef_gyro_0_z[0]
gyro_0_params['TC_G0_X2_2'] = coef_gyro_0_z[1]
gyro_0_params['TC_G0_X1_2'] = coef_gyro_0_z[2]
gyro_0_params['TC_G0_X0_2'] = coef_gyro_0_z[3]
fit_coef_gyro_0_z = np.poly1d(coef_gyro_0_z)
gyro_0_z_resample = fit_coef_gyro_0_z(temp_rel_resample)
# gyro0 vs temperature
plt.figure(1,figsize=(20,13))
# gyro0 vs temperature
plt.figure(1,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['x'],'b')
plt.plot(temp_resample,gyro_0_x_resample,'r')
plt.title('Gyro 0 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['x'],'b')
plt.plot(temp_resample,gyro_0_x_resample,'r')
plt.title('Gyro 0 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['y'],'b')
plt.plot(temp_resample,gyro_0_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['y'],'b')
plt.plot(temp_resample,gyro_0_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['z'],'b')
plt.plot(temp_resample,gyro_0_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['z'],'b')
plt.plot(temp_resample,gyro_0_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@@ -229,72 +229,72 @@ gyro_1_params = {
# curve fit the data for gyro 1 corrections
if num_gyros >= 2:
gyro_1_params['TC_G1_ID'] = int(np.median(sensor_gyro_1['device_id']))
gyro_1_params['TC_G1_ID'] = int(np.median(sensor_gyro_1['device_id']))
# find the min, max and reference temperature
gyro_1_params['TC_G1_TMIN'] = np.amin(sensor_gyro_1['temperature'])
gyro_1_params['TC_G1_TMAX'] = np.amax(sensor_gyro_1['temperature'])
gyro_1_params['TC_G1_TREF'] = 0.5 * (gyro_1_params['TC_G1_TMIN'] + gyro_1_params['TC_G1_TMAX'])
temp_rel = sensor_gyro_1['temperature'] - gyro_1_params['TC_G1_TREF']
temp_rel_resample = np.linspace(gyro_1_params['TC_G1_TMIN']-gyro_1_params['TC_G1_TREF'], gyro_1_params['TC_G1_TMAX']-gyro_1_params['TC_G1_TREF'], 100)
temp_resample = temp_rel_resample + gyro_1_params['TC_G1_TREF']
# find the min, max and reference temperature
gyro_1_params['TC_G1_TMIN'] = np.amin(sensor_gyro_1['temperature'])
gyro_1_params['TC_G1_TMAX'] = np.amax(sensor_gyro_1['temperature'])
gyro_1_params['TC_G1_TREF'] = 0.5 * (gyro_1_params['TC_G1_TMIN'] + gyro_1_params['TC_G1_TMAX'])
temp_rel = sensor_gyro_1['temperature'] - gyro_1_params['TC_G1_TREF']
temp_rel_resample = np.linspace(gyro_1_params['TC_G1_TMIN']-gyro_1_params['TC_G1_TREF'], gyro_1_params['TC_G1_TMAX']-gyro_1_params['TC_G1_TREF'], 100)
temp_resample = temp_rel_resample + gyro_1_params['TC_G1_TREF']
# fit X axis
coef_gyro_1_x = np.polyfit(temp_rel,sensor_gyro_1['x'],3)
gyro_1_params['TC_G1_X3_0'] = coef_gyro_1_x[0]
gyro_1_params['TC_G1_X2_0'] = coef_gyro_1_x[1]
gyro_1_params['TC_G1_X1_0'] = coef_gyro_1_x[2]
gyro_1_params['TC_G1_X0_0'] = coef_gyro_1_x[3]
fit_coef_gyro_1_x = np.poly1d(coef_gyro_1_x)
gyro_1_x_resample = fit_coef_gyro_1_x(temp_rel_resample)
# fit X axis
coef_gyro_1_x = np.polyfit(temp_rel,sensor_gyro_1['x'],3)
gyro_1_params['TC_G1_X3_0'] = coef_gyro_1_x[0]
gyro_1_params['TC_G1_X2_0'] = coef_gyro_1_x[1]
gyro_1_params['TC_G1_X1_0'] = coef_gyro_1_x[2]
gyro_1_params['TC_G1_X0_0'] = coef_gyro_1_x[3]
fit_coef_gyro_1_x = np.poly1d(coef_gyro_1_x)
gyro_1_x_resample = fit_coef_gyro_1_x(temp_rel_resample)
# fit Y axis
coef_gyro_1_y = np.polyfit(temp_rel,sensor_gyro_1['y'],3)
gyro_1_params['TC_G1_X3_1'] = coef_gyro_1_y[0]
gyro_1_params['TC_G1_X2_1'] = coef_gyro_1_y[1]
gyro_1_params['TC_G1_X1_1'] = coef_gyro_1_y[2]
gyro_1_params['TC_G1_X0_1'] = coef_gyro_1_y[3]
fit_coef_gyro_1_y = np.poly1d(coef_gyro_1_y)
gyro_1_y_resample = fit_coef_gyro_1_y(temp_rel_resample)
# fit Y axis
coef_gyro_1_y = np.polyfit(temp_rel,sensor_gyro_1['y'],3)
gyro_1_params['TC_G1_X3_1'] = coef_gyro_1_y[0]
gyro_1_params['TC_G1_X2_1'] = coef_gyro_1_y[1]
gyro_1_params['TC_G1_X1_1'] = coef_gyro_1_y[2]
gyro_1_params['TC_G1_X0_1'] = coef_gyro_1_y[3]
fit_coef_gyro_1_y = np.poly1d(coef_gyro_1_y)
gyro_1_y_resample = fit_coef_gyro_1_y(temp_rel_resample)
# fit Z axis
coef_gyro_1_z = np.polyfit(temp_rel,sensor_gyro_1['z'],3)
gyro_1_params['TC_G1_X3_2'] = coef_gyro_1_z[0]
gyro_1_params['TC_G1_X2_2'] = coef_gyro_1_z[1]
gyro_1_params['TC_G1_X1_2'] = coef_gyro_1_z[2]
gyro_1_params['TC_G1_X0_2'] = coef_gyro_1_z[3]
fit_coef_gyro_1_z = np.poly1d(coef_gyro_1_z)
gyro_1_z_resample = fit_coef_gyro_1_z(temp_rel_resample)
# fit Z axis
coef_gyro_1_z = np.polyfit(temp_rel,sensor_gyro_1['z'],3)
gyro_1_params['TC_G1_X3_2'] = coef_gyro_1_z[0]
gyro_1_params['TC_G1_X2_2'] = coef_gyro_1_z[1]
gyro_1_params['TC_G1_X1_2'] = coef_gyro_1_z[2]
gyro_1_params['TC_G1_X0_2'] = coef_gyro_1_z[3]
fit_coef_gyro_1_z = np.poly1d(coef_gyro_1_z)
gyro_1_z_resample = fit_coef_gyro_1_z(temp_rel_resample)
# gyro1 vs temperature
plt.figure(2,figsize=(20,13))
# gyro1 vs temperature
plt.figure(2,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['x'],'b')
plt.plot(temp_resample,gyro_1_x_resample,'r')
plt.title('Gyro 1 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['x'],'b')
plt.plot(temp_resample,gyro_1_x_resample,'r')
plt.title('Gyro 1 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['y'],'b')
plt.plot(temp_resample,gyro_1_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['y'],'b')
plt.plot(temp_resample,gyro_1_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['z'],'b')
plt.plot(temp_resample,gyro_1_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['z'],'b')
plt.plot(temp_resample,gyro_1_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@@ -325,72 +325,72 @@ gyro_2_params = {
# curve fit the data for gyro 2 corrections
if num_gyros >= 3:
gyro_2_params['TC_G2_ID'] = int(np.median(sensor_gyro_2['device_id']))
gyro_2_params['TC_G2_ID'] = int(np.median(sensor_gyro_2['device_id']))
# find the min, max and reference temperature
gyro_2_params['TC_G2_TMIN'] = np.amin(sensor_gyro_2['temperature'])
gyro_2_params['TC_G2_TMAX'] = np.amax(sensor_gyro_2['temperature'])
gyro_2_params['TC_G2_TREF'] = 0.5 * (gyro_2_params['TC_G2_TMIN'] + gyro_2_params['TC_G2_TMAX'])
temp_rel = sensor_gyro_2['temperature'] - gyro_2_params['TC_G2_TREF']
temp_rel_resample = np.linspace(gyro_2_params['TC_G2_TMIN']-gyro_2_params['TC_G2_TREF'], gyro_2_params['TC_G2_TMAX']-gyro_2_params['TC_G2_TREF'], 100)
temp_resample = temp_rel_resample + gyro_2_params['TC_G2_TREF']
# find the min, max and reference temperature
gyro_2_params['TC_G2_TMIN'] = np.amin(sensor_gyro_2['temperature'])
gyro_2_params['TC_G2_TMAX'] = np.amax(sensor_gyro_2['temperature'])
gyro_2_params['TC_G2_TREF'] = 0.5 * (gyro_2_params['TC_G2_TMIN'] + gyro_2_params['TC_G2_TMAX'])
temp_rel = sensor_gyro_2['temperature'] - gyro_2_params['TC_G2_TREF']
temp_rel_resample = np.linspace(gyro_2_params['TC_G2_TMIN']-gyro_2_params['TC_G2_TREF'], gyro_2_params['TC_G2_TMAX']-gyro_2_params['TC_G2_TREF'], 100)
temp_resample = temp_rel_resample + gyro_2_params['TC_G2_TREF']
# fit X axis
coef_gyro_2_x = np.polyfit(temp_rel,sensor_gyro_2['x'],3)
gyro_2_params['TC_G2_X3_0'] = coef_gyro_2_x[0]
gyro_2_params['TC_G2_X2_0'] = coef_gyro_2_x[1]
gyro_2_params['TC_G2_X1_0'] = coef_gyro_2_x[2]
gyro_2_params['TC_G2_X0_0'] = coef_gyro_2_x[3]
fit_coef_gyro_2_x = np.poly1d(coef_gyro_2_x)
gyro_2_x_resample = fit_coef_gyro_2_x(temp_rel_resample)
# fit X axis
coef_gyro_2_x = np.polyfit(temp_rel,sensor_gyro_2['x'],3)
gyro_2_params['TC_G2_X3_0'] = coef_gyro_2_x[0]
gyro_2_params['TC_G2_X2_0'] = coef_gyro_2_x[1]
gyro_2_params['TC_G2_X1_0'] = coef_gyro_2_x[2]
gyro_2_params['TC_G2_X0_0'] = coef_gyro_2_x[3]
fit_coef_gyro_2_x = np.poly1d(coef_gyro_2_x)
gyro_2_x_resample = fit_coef_gyro_2_x(temp_rel_resample)
# fit Y axis
coef_gyro_2_y = np.polyfit(temp_rel,sensor_gyro_2['y'],3)
gyro_2_params['TC_G2_X3_1'] = coef_gyro_2_y[0]
gyro_2_params['TC_G2_X2_1'] = coef_gyro_2_y[1]
gyro_2_params['TC_G2_X1_1'] = coef_gyro_2_y[2]
gyro_2_params['TC_G2_X0_1'] = coef_gyro_2_y[3]
fit_coef_gyro_2_y = np.poly1d(coef_gyro_2_y)
gyro_2_y_resample = fit_coef_gyro_2_y(temp_rel_resample)
# fit Y axis
coef_gyro_2_y = np.polyfit(temp_rel,sensor_gyro_2['y'],3)
gyro_2_params['TC_G2_X3_1'] = coef_gyro_2_y[0]
gyro_2_params['TC_G2_X2_1'] = coef_gyro_2_y[1]
gyro_2_params['TC_G2_X1_1'] = coef_gyro_2_y[2]
gyro_2_params['TC_G2_X0_1'] = coef_gyro_2_y[3]
fit_coef_gyro_2_y = np.poly1d(coef_gyro_2_y)
gyro_2_y_resample = fit_coef_gyro_2_y(temp_rel_resample)
# fit Z axis
coef_gyro_2_z = np.polyfit(temp_rel,sensor_gyro_2['z'],3)
gyro_2_params['TC_G2_X3_2'] = coef_gyro_2_z[0]
gyro_2_params['TC_G2_X2_2'] = coef_gyro_2_z[1]
gyro_2_params['TC_G2_X1_2'] = coef_gyro_2_z[2]
gyro_2_params['TC_G2_X0_2'] = coef_gyro_2_z[3]
fit_coef_gyro_2_z = np.poly1d(coef_gyro_2_z)
gyro_2_z_resample = fit_coef_gyro_2_z(temp_rel_resample)
# fit Z axis
coef_gyro_2_z = np.polyfit(temp_rel,sensor_gyro_2['z'],3)
gyro_2_params['TC_G2_X3_2'] = coef_gyro_2_z[0]
gyro_2_params['TC_G2_X2_2'] = coef_gyro_2_z[1]
gyro_2_params['TC_G2_X1_2'] = coef_gyro_2_z[2]
gyro_2_params['TC_G2_X0_2'] = coef_gyro_2_z[3]
fit_coef_gyro_2_z = np.poly1d(coef_gyro_2_z)
gyro_2_z_resample = fit_coef_gyro_2_z(temp_rel_resample)
# gyro2 vs temperature
plt.figure(3,figsize=(20,13))
# gyro2 vs temperature
plt.figure(3,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['x'],'b')
plt.plot(temp_resample,gyro_2_x_resample,'r')
plt.title('Gyro 2 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['x'],'b')
plt.plot(temp_resample,gyro_2_x_resample,'r')
plt.title('Gyro 2 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['y'],'b')
plt.plot(temp_resample,gyro_2_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['y'],'b')
plt.plot(temp_resample,gyro_2_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['z'],'b')
plt.plot(temp_resample,gyro_2_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['z'],'b')
plt.plot(temp_resample,gyro_2_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@@ -421,75 +421,75 @@ accel_0_params = {
# curve fit the data for accel 0 corrections
if num_accels >= 1:
accel_0_params['TC_A0_ID'] = int(np.median(sensor_accel_0['device_id']))
accel_0_params['TC_A0_ID'] = int(np.median(sensor_accel_0['device_id']))
# find the min, max and reference temperature
accel_0_params['TC_A0_TMIN'] = np.amin(sensor_accel_0['temperature'])
accel_0_params['TC_A0_TMAX'] = np.amax(sensor_accel_0['temperature'])
accel_0_params['TC_A0_TREF'] = 0.5 * (accel_0_params['TC_A0_TMIN'] + accel_0_params['TC_A0_TMAX'])
temp_rel = sensor_accel_0['temperature'] - accel_0_params['TC_A0_TREF']
temp_rel_resample = np.linspace(accel_0_params['TC_A0_TMIN']-accel_0_params['TC_A0_TREF'], accel_0_params['TC_A0_TMAX']-accel_0_params['TC_A0_TREF'], 100)
temp_resample = temp_rel_resample + accel_0_params['TC_A0_TREF']
# find the min, max and reference temperature
accel_0_params['TC_A0_TMIN'] = np.amin(sensor_accel_0['temperature'])
accel_0_params['TC_A0_TMAX'] = np.amax(sensor_accel_0['temperature'])
accel_0_params['TC_A0_TREF'] = 0.5 * (accel_0_params['TC_A0_TMIN'] + accel_0_params['TC_A0_TMAX'])
temp_rel = sensor_accel_0['temperature'] - accel_0_params['TC_A0_TREF']
temp_rel_resample = np.linspace(accel_0_params['TC_A0_TMIN']-accel_0_params['TC_A0_TREF'], accel_0_params['TC_A0_TMAX']-accel_0_params['TC_A0_TREF'], 100)
temp_resample = temp_rel_resample + accel_0_params['TC_A0_TREF']
# fit X axis
correction_x = sensor_accel_0['x'] - np.median(sensor_accel_0['x'])
coef_accel_0_x = np.polyfit(temp_rel,correction_x,3)
accel_0_params['TC_A0_X3_0'] = coef_accel_0_x[0]
accel_0_params['TC_A0_X2_0'] = coef_accel_0_x[1]
accel_0_params['TC_A0_X1_0'] = coef_accel_0_x[2]
accel_0_params['TC_A0_X0_0'] = coef_accel_0_x[3]
fit_coef_accel_0_x = np.poly1d(coef_accel_0_x)
correction_x_resample = fit_coef_accel_0_x(temp_rel_resample)
# fit X axis
correction_x = sensor_accel_0['x'] - np.median(sensor_accel_0['x'])
coef_accel_0_x = np.polyfit(temp_rel,correction_x,3)
accel_0_params['TC_A0_X3_0'] = coef_accel_0_x[0]
accel_0_params['TC_A0_X2_0'] = coef_accel_0_x[1]
accel_0_params['TC_A0_X1_0'] = coef_accel_0_x[2]
accel_0_params['TC_A0_X0_0'] = coef_accel_0_x[3]
fit_coef_accel_0_x = np.poly1d(coef_accel_0_x)
correction_x_resample = fit_coef_accel_0_x(temp_rel_resample)
# fit Y axis
correction_y = sensor_accel_0['y']-np.median(sensor_accel_0['y'])
coef_accel_0_y = np.polyfit(temp_rel,correction_y,3)
accel_0_params['TC_A0_X3_1'] = coef_accel_0_y[0]
accel_0_params['TC_A0_X2_1'] = coef_accel_0_y[1]
accel_0_params['TC_A0_X1_1'] = coef_accel_0_y[2]
accel_0_params['TC_A0_X0_1'] = coef_accel_0_y[3]
fit_coef_accel_0_y = np.poly1d(coef_accel_0_y)
correction_y_resample = fit_coef_accel_0_y(temp_rel_resample)
# fit Y axis
correction_y = sensor_accel_0['y']-np.median(sensor_accel_0['y'])
coef_accel_0_y = np.polyfit(temp_rel,correction_y,3)
accel_0_params['TC_A0_X3_1'] = coef_accel_0_y[0]
accel_0_params['TC_A0_X2_1'] = coef_accel_0_y[1]
accel_0_params['TC_A0_X1_1'] = coef_accel_0_y[2]
accel_0_params['TC_A0_X0_1'] = coef_accel_0_y[3]
fit_coef_accel_0_y = np.poly1d(coef_accel_0_y)
correction_y_resample = fit_coef_accel_0_y(temp_rel_resample)
# fit Z axis
correction_z = sensor_accel_0['z']-np.median(sensor_accel_0['z'])
coef_accel_0_z = np.polyfit(temp_rel,correction_z,3)
accel_0_params['TC_A0_X3_2'] = coef_accel_0_z[0]
accel_0_params['TC_A0_X2_2'] = coef_accel_0_z[1]
accel_0_params['TC_A0_X1_2'] = coef_accel_0_z[2]
accel_0_params['TC_A0_X0_2'] = coef_accel_0_z[3]
fit_coef_accel_0_z = np.poly1d(coef_accel_0_z)
correction_z_resample = fit_coef_accel_0_z(temp_rel_resample)
# fit Z axis
correction_z = sensor_accel_0['z']-np.median(sensor_accel_0['z'])
coef_accel_0_z = np.polyfit(temp_rel,correction_z,3)
accel_0_params['TC_A0_X3_2'] = coef_accel_0_z[0]
accel_0_params['TC_A0_X2_2'] = coef_accel_0_z[1]
accel_0_params['TC_A0_X1_2'] = coef_accel_0_z[2]
accel_0_params['TC_A0_X0_2'] = coef_accel_0_z[3]
fit_coef_accel_0_z = np.poly1d(coef_accel_0_z)
correction_z_resample = fit_coef_accel_0_z(temp_rel_resample)
# accel 0 vs temperature
plt.figure(4,figsize=(20,13))
# accel 0 vs temperature
plt.figure(4,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_0['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 0 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_0['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 0 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_0['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_0['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_0['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_0['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@@ -520,75 +520,75 @@ accel_1_params = {
# curve fit the data for accel 1 corrections
if num_accels >= 2:
accel_1_params['TC_A1_ID'] = int(np.median(sensor_accel_1['device_id']))
accel_1_params['TC_A1_ID'] = int(np.median(sensor_accel_1['device_id']))
# find the min, max and reference temperature
accel_1_params['TC_A1_TMIN'] = np.amin(sensor_accel_1['temperature'])
accel_1_params['TC_A1_TMAX'] = np.amax(sensor_accel_1['temperature'])
accel_1_params['TC_A1_TREF'] = 0.5 * (accel_1_params['TC_A1_TMIN'] + accel_1_params['TC_A1_TMAX'])
temp_rel = sensor_accel_1['temperature'] - accel_1_params['TC_A1_TREF']
temp_rel_resample = np.linspace(accel_1_params['TC_A1_TMIN']-accel_1_params['TC_A1_TREF'], accel_1_params['TC_A1_TMAX']-accel_1_params['TC_A1_TREF'], 100)
temp_resample = temp_rel_resample + accel_1_params['TC_A1_TREF']
# find the min, max and reference temperature
accel_1_params['TC_A1_TMIN'] = np.amin(sensor_accel_1['temperature'])
accel_1_params['TC_A1_TMAX'] = np.amax(sensor_accel_1['temperature'])
accel_1_params['TC_A1_TREF'] = 0.5 * (accel_1_params['TC_A1_TMIN'] + accel_1_params['TC_A1_TMAX'])
temp_rel = sensor_accel_1['temperature'] - accel_1_params['TC_A1_TREF']
temp_rel_resample = np.linspace(accel_1_params['TC_A1_TMIN']-accel_1_params['TC_A1_TREF'], accel_1_params['TC_A1_TMAX']-accel_1_params['TC_A1_TREF'], 100)
temp_resample = temp_rel_resample + accel_1_params['TC_A1_TREF']
# fit X axis
correction_x = sensor_accel_1['x']-np.median(sensor_accel_1['x'])
coef_accel_1_x = np.polyfit(temp_rel,correction_x,3)
accel_1_params['TC_A1_X3_0'] = coef_accel_1_x[0]
accel_1_params['TC_A1_X2_0'] = coef_accel_1_x[1]
accel_1_params['TC_A1_X1_0'] = coef_accel_1_x[2]
accel_1_params['TC_A1_X0_0'] = coef_accel_1_x[3]
fit_coef_accel_1_x = np.poly1d(coef_accel_1_x)
correction_x_resample = fit_coef_accel_1_x(temp_rel_resample)
# fit X axis
correction_x = sensor_accel_1['x']-np.median(sensor_accel_1['x'])
coef_accel_1_x = np.polyfit(temp_rel,correction_x,3)
accel_1_params['TC_A1_X3_0'] = coef_accel_1_x[0]
accel_1_params['TC_A1_X2_0'] = coef_accel_1_x[1]
accel_1_params['TC_A1_X1_0'] = coef_accel_1_x[2]
accel_1_params['TC_A1_X0_0'] = coef_accel_1_x[3]
fit_coef_accel_1_x = np.poly1d(coef_accel_1_x)
correction_x_resample = fit_coef_accel_1_x(temp_rel_resample)
# fit Y axis
correction_y = sensor_accel_1['y']-np.median(sensor_accel_1['y'])
coef_accel_1_y = np.polyfit(temp_rel,correction_y,3)
accel_1_params['TC_A1_X3_1'] = coef_accel_1_y[0]
accel_1_params['TC_A1_X2_1'] = coef_accel_1_y[1]
accel_1_params['TC_A1_X1_1'] = coef_accel_1_y[2]
accel_1_params['TC_A1_X0_1'] = coef_accel_1_y[3]
fit_coef_accel_1_y = np.poly1d(coef_accel_1_y)
correction_y_resample = fit_coef_accel_1_y(temp_rel_resample)
# fit Y axis
correction_y = sensor_accel_1['y']-np.median(sensor_accel_1['y'])
coef_accel_1_y = np.polyfit(temp_rel,correction_y,3)
accel_1_params['TC_A1_X3_1'] = coef_accel_1_y[0]
accel_1_params['TC_A1_X2_1'] = coef_accel_1_y[1]
accel_1_params['TC_A1_X1_1'] = coef_accel_1_y[2]
accel_1_params['TC_A1_X0_1'] = coef_accel_1_y[3]
fit_coef_accel_1_y = np.poly1d(coef_accel_1_y)
correction_y_resample = fit_coef_accel_1_y(temp_rel_resample)
# fit Z axis
correction_z = (sensor_accel_1['z'])-np.median(sensor_accel_1['z'])
coef_accel_1_z = np.polyfit(temp_rel,correction_z,3)
accel_1_params['TC_A1_X3_2'] = coef_accel_1_z[0]
accel_1_params['TC_A1_X2_2'] = coef_accel_1_z[1]
accel_1_params['TC_A1_X1_2'] = coef_accel_1_z[2]
accel_1_params['TC_A1_X0_2'] = coef_accel_1_z[3]
fit_coef_accel_1_z = np.poly1d(coef_accel_1_z)
correction_z_resample = fit_coef_accel_1_z(temp_rel_resample)
# fit Z axis
correction_z = (sensor_accel_1['z'])-np.median(sensor_accel_1['z'])
coef_accel_1_z = np.polyfit(temp_rel,correction_z,3)
accel_1_params['TC_A1_X3_2'] = coef_accel_1_z[0]
accel_1_params['TC_A1_X2_2'] = coef_accel_1_z[1]
accel_1_params['TC_A1_X1_2'] = coef_accel_1_z[2]
accel_1_params['TC_A1_X0_2'] = coef_accel_1_z[3]
fit_coef_accel_1_z = np.poly1d(coef_accel_1_z)
correction_z_resample = fit_coef_accel_1_z(temp_rel_resample)
# accel 1 vs temperature
plt.figure(5,figsize=(20,13))
# accel 1 vs temperature
plt.figure(5,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_1['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 1 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_1['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 1 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_1['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_1['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_1['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_1['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@@ -619,75 +619,75 @@ accel_2_params = {
# curve fit the data for accel 2 corrections
if num_accels >= 3:
accel_2_params['TC_A2_ID'] = int(np.median(sensor_accel_2['device_id']))
accel_2_params['TC_A2_ID'] = int(np.median(sensor_accel_2['device_id']))
# find the min, max and reference temperature
accel_2_params['TC_A2_TMIN'] = np.amin(sensor_accel_2['temperature'])
accel_2_params['TC_A2_TMAX'] = np.amax(sensor_accel_2['temperature'])
accel_2_params['TC_A2_TREF'] = 0.5 * (accel_2_params['TC_A2_TMIN'] + accel_2_params['TC_A2_TMAX'])
temp_rel = sensor_accel_2['temperature'] - accel_2_params['TC_A2_TREF']
temp_rel_resample = np.linspace(accel_2_params['TC_A2_TMIN']-accel_2_params['TC_A2_TREF'], accel_2_params['TC_A2_TMAX']-accel_2_params['TC_A2_TREF'], 100)
temp_resample = temp_rel_resample + accel_2_params['TC_A2_TREF']
# find the min, max and reference temperature
accel_2_params['TC_A2_TMIN'] = np.amin(sensor_accel_2['temperature'])
accel_2_params['TC_A2_TMAX'] = np.amax(sensor_accel_2['temperature'])
accel_2_params['TC_A2_TREF'] = 0.5 * (accel_2_params['TC_A2_TMIN'] + accel_2_params['TC_A2_TMAX'])
temp_rel = sensor_accel_2['temperature'] - accel_2_params['TC_A2_TREF']
temp_rel_resample = np.linspace(accel_2_params['TC_A2_TMIN']-accel_2_params['TC_A2_TREF'], accel_2_params['TC_A2_TMAX']-accel_2_params['TC_A2_TREF'], 100)
temp_resample = temp_rel_resample + accel_2_params['TC_A2_TREF']
# fit X axis
correction_x = sensor_accel_2['x']-np.median(sensor_accel_2['x'])
coef_accel_2_x = np.polyfit(temp_rel,correction_x,3)
accel_2_params['TC_A2_X3_0'] = coef_accel_2_x[0]
accel_2_params['TC_A2_X2_0'] = coef_accel_2_x[1]
accel_2_params['TC_A2_X1_0'] = coef_accel_2_x[2]
accel_2_params['TC_A2_X0_0'] = coef_accel_2_x[3]
fit_coef_accel_2_x = np.poly1d(coef_accel_2_x)
correction_x_resample = fit_coef_accel_2_x(temp_rel_resample)
# fit X axis
correction_x = sensor_accel_2['x']-np.median(sensor_accel_2['x'])
coef_accel_2_x = np.polyfit(temp_rel,correction_x,3)
accel_2_params['TC_A2_X3_0'] = coef_accel_2_x[0]
accel_2_params['TC_A2_X2_0'] = coef_accel_2_x[1]
accel_2_params['TC_A2_X1_0'] = coef_accel_2_x[2]
accel_2_params['TC_A2_X0_0'] = coef_accel_2_x[3]
fit_coef_accel_2_x = np.poly1d(coef_accel_2_x)
correction_x_resample = fit_coef_accel_2_x(temp_rel_resample)
# fit Y axis
correction_y = sensor_accel_2['y']-np.median(sensor_accel_2['y'])
coef_accel_2_y = np.polyfit(temp_rel,correction_y,3)
accel_2_params['TC_A2_X3_1'] = coef_accel_2_y[0]
accel_2_params['TC_A2_X2_1'] = coef_accel_2_y[1]
accel_2_params['TC_A2_X1_1'] = coef_accel_2_y[2]
accel_2_params['TC_A2_X0_1'] = coef_accel_2_y[3]
fit_coef_accel_2_y = np.poly1d(coef_accel_2_y)
correction_y_resample = fit_coef_accel_2_y(temp_rel_resample)
# fit Y axis
correction_y = sensor_accel_2['y']-np.median(sensor_accel_2['y'])
coef_accel_2_y = np.polyfit(temp_rel,correction_y,3)
accel_2_params['TC_A2_X3_1'] = coef_accel_2_y[0]
accel_2_params['TC_A2_X2_1'] = coef_accel_2_y[1]
accel_2_params['TC_A2_X1_1'] = coef_accel_2_y[2]
accel_2_params['TC_A2_X0_1'] = coef_accel_2_y[3]
fit_coef_accel_2_y = np.poly1d(coef_accel_2_y)
correction_y_resample = fit_coef_accel_2_y(temp_rel_resample)
# fit Z axis
correction_z = sensor_accel_2['z']-np.median(sensor_accel_2['z'])
coef_accel_2_z = np.polyfit(temp_rel,correction_z,3)
accel_2_params['TC_A2_X3_2'] = coef_accel_2_z[0]
accel_2_params['TC_A2_X2_2'] = coef_accel_2_z[1]
accel_2_params['TC_A2_X1_2'] = coef_accel_2_z[2]
accel_2_params['TC_A2_X0_2'] = coef_accel_2_z[3]
fit_coef_accel_2_z = np.poly1d(coef_accel_2_z)
correction_z_resample = fit_coef_accel_2_z(temp_rel_resample)
# fit Z axis
correction_z = sensor_accel_2['z']-np.median(sensor_accel_2['z'])
coef_accel_2_z = np.polyfit(temp_rel,correction_z,3)
accel_2_params['TC_A2_X3_2'] = coef_accel_2_z[0]
accel_2_params['TC_A2_X2_2'] = coef_accel_2_z[1]
accel_2_params['TC_A2_X1_2'] = coef_accel_2_z[2]
accel_2_params['TC_A2_X0_2'] = coef_accel_2_z[3]
fit_coef_accel_2_z = np.poly1d(coef_accel_2_z)
correction_z_resample = fit_coef_accel_2_z(temp_rel_resample)
# accel 2 vs temperature
plt.figure(6,figsize=(20,13))
# accel 2 vs temperature
plt.figure(6,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_2['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 2 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_2['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 2 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_2['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_2['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_2['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_2['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@@ -761,41 +761,41 @@ baro_1_params = {
if num_baros >= 2:
# curve fit the data for baro 0 corrections
baro_1_params['TC_B1_ID'] = int(np.median(sensor_baro_1['device_id']))
# curve fit the data for baro 0 corrections
baro_1_params['TC_B1_ID'] = int(np.median(sensor_baro_1['device_id']))
# find the min, max and reference temperature
baro_1_params['TC_B1_TMIN'] = np.amin(sensor_baro_1['temperature'])
baro_1_params['TC_B1_TMAX'] = np.amax(sensor_baro_1['temperature'])
baro_1_params['TC_B1_TREF'] = 0.5 * (baro_1_params['TC_B1_TMIN'] + baro_1_params['TC_B1_TMAX'])
temp_rel = sensor_baro_1['temperature'] - baro_1_params['TC_B1_TREF']
temp_rel_resample = np.linspace(baro_1_params['TC_B1_TMIN']-baro_1_params['TC_B1_TREF'], baro_1_params['TC_B1_TMAX']-baro_1_params['TC_B1_TREF'], 100)
temp_resample = temp_rel_resample + baro_1_params['TC_B1_TREF']
# find the min, max and reference temperature
baro_1_params['TC_B1_TMIN'] = np.amin(sensor_baro_1['temperature'])
baro_1_params['TC_B1_TMAX'] = np.amax(sensor_baro_1['temperature'])
baro_1_params['TC_B1_TREF'] = 0.5 * (baro_1_params['TC_B1_TMIN'] + baro_1_params['TC_B1_TMAX'])
temp_rel = sensor_baro_1['temperature'] - baro_1_params['TC_B1_TREF']
temp_rel_resample = np.linspace(baro_1_params['TC_B1_TMIN']-baro_1_params['TC_B1_TREF'], baro_1_params['TC_B1_TMAX']-baro_1_params['TC_B1_TREF'], 100)
temp_resample = temp_rel_resample + baro_1_params['TC_B1_TREF']
# fit data
median_pressure = np.median(sensor_baro_1['pressure']);
coef_baro_1_x = np.polyfit(temp_rel,100*(sensor_baro_1['pressure']-median_pressure),5) # convert from hPa to Pa
baro_1_params['TC_B1_X5'] = coef_baro_1_x[0]
baro_1_params['TC_B1_X4'] = coef_baro_1_x[1]
baro_1_params['TC_B1_X3'] = coef_baro_1_x[2]
baro_1_params['TC_B1_X2'] = coef_baro_1_x[3]
baro_1_params['TC_B1_X1'] = coef_baro_1_x[4]
baro_1_params['TC_B1_X0'] = coef_baro_1_x[5]
fit_coef_baro_1_x = np.poly1d(coef_baro_1_x)
baro_1_x_resample = fit_coef_baro_1_x(temp_rel_resample)
# fit data
median_pressure = np.median(sensor_baro_1['pressure']);
coef_baro_1_x = np.polyfit(temp_rel,100*(sensor_baro_1['pressure']-median_pressure),5) # convert from hPa to Pa
baro_1_params['TC_B1_X5'] = coef_baro_1_x[0]
baro_1_params['TC_B1_X4'] = coef_baro_1_x[1]
baro_1_params['TC_B1_X3'] = coef_baro_1_x[2]
baro_1_params['TC_B1_X2'] = coef_baro_1_x[3]
baro_1_params['TC_B1_X1'] = coef_baro_1_x[4]
baro_1_params['TC_B1_X0'] = coef_baro_1_x[5]
fit_coef_baro_1_x = np.poly1d(coef_baro_1_x)
baro_1_x_resample = fit_coef_baro_1_x(temp_rel_resample)
# baro 1 vs temperature
plt.figure(8,figsize=(20,13))
# baro 1 vs temperature
plt.figure(8,figsize=(20,13))
# draw plots
plt.plot(sensor_baro_1['temperature'],100*sensor_baro_1['pressure']-100*median_pressure,'b')
plt.plot(temp_resample,baro_1_x_resample,'r')
plt.title('Baro 1 Bias vs Temperature')
plt.ylabel('Z bias (Pa)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.plot(sensor_baro_1['temperature'],100*sensor_baro_1['pressure']-100*median_pressure,'b')
plt.plot(temp_resample,baro_1_x_resample,'r')
plt.title('Baro 1 Bias vs Temperature')
plt.ylabel('Z bias (Pa)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
+1 -1
View File
@@ -52,7 +52,7 @@ The generated files will be written to the `modules` directory.
result += "%s\n" % doc
usage_string = module.usage_string()
if len(usage_string) > 0:
result += "### Usage\n```\n%s\n```\n" % usage_string
result += "### Usage {#%s_usage}\n```\n%s\n```\n" % (module.name(), usage_string)
self._outputs[category] = result
+17
View File
@@ -247,12 +247,19 @@ class SourceParser(object):
self._modules = {} # all found modules: key is the module name
self._consistency_checks_failure = False # one or more checks failed
self._comment_remove_pattern = re.compile(
r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
re.DOTALL | re.MULTILINE)
def Parse(self, scope, contents):
"""
Incrementally parse program contents and append all found documentations
to the list.
"""
# remove comments from source
contents = self._comment_remover(contents)
extracted_function_calls = [] # list of tuples: (FUNC_NAME, list(ARGS))
start_index = 0
@@ -302,6 +309,16 @@ class SourceParser(object):
return True
def _comment_remover(self, text):
""" remove C++ & C style comments.
Source: https://stackoverflow.com/a/241506 """
def replacer(match):
s = match.group(0)
if s.startswith('/'):
return " " # note: a space and not an empty string
else:
return s
return re.sub(self._comment_remove_pattern, replacer, text)
def _do_consistency_check(self, contents, scope, module_doc):
"""
+42 -11
View File
@@ -125,7 +125,7 @@ class firmware(object):
# pad image to 4-byte length
while ((len(self.image) % 4) != 0):
self.image.append('\xff')
self.image.extend(b'\xff')
def property(self, propname):
return self.desc[propname]
@@ -488,11 +488,13 @@ class uploader(object):
print("FORCED WRITE, FLASHING ANYWAY!")
else:
raise IOError(msg)
# Prevent uploads where the image would overflow the flash
if self.fw_maxsize < fw.property('image_size'):
raise RuntimeError("Firmware image is too large for this board")
# OTP added in v4:
if self.bl_rev > 3:
if self.bl_rev >= 4:
for byte in range(0, 32*6, 4):
x = self.__getOTP(byte)
self.otp = self.otp + x
@@ -518,16 +520,43 @@ class uploader(object):
print(binascii.hexlify(x).decode('Latin-1'), end='') # show user
print('')
print("chip: %08x" % self.__getCHIP())
if (self.bl_rev >= 5):
des = self.__getCHIPDes()
if (len(des) == 2):
print("family: %s" % des[0])
print("revision: %s" % des[1])
print("flash %d" % self.fw_maxsize)
except Exception:
# ignore bad character encodings
pass
# Silicon errata check was added in v5
if (self.bl_rev >= 5):
des = self.__getCHIPDes()
if (len(des) == 2):
print("family: %s" % des[0])
print("revision: %s" % des[1])
print("flash %d" % self.fw_maxsize)
# Prevent uploads where the maximum image size of the board config is smaller than the flash
# of the board. This is a hint the user chose the wrong config and will lack features
# for this particular board.
# This check should also check if the revision is an unaffected revision
# and thus can support the full flash, see
# https://github.com/PX4/Firmware/blob/master/src/drivers/boards/common/stm32/board_mcu_version.c#L125-L144
if self.fw_maxsize > fw.property('image_maxsize') and not force:
raise RuntimeError("Board can accept larger flash images (%u bytes) than board config (%u bytes). Please use the correct board configuration to avoid lacking critical functionality."
% (self.fw_maxsize, fw.property('image_maxsize')))
else:
# If we're still on bootloader v4 on a Pixhawk, we don't know if we
# have the silicon errata and therefore need to flash px4fmu-v2
# with 1MB flash or if it supports px4fmu-v3 with 2MB flash.
if fw.property('board_id') == 9 \
and fw.property('image_size') > 1032192 \
and not force:
raise RuntimeError("\nThe Board uses bootloader revision 4 and can therefore not determine\n"
"if flashing more than 1 MB (px4fmu-v3_default) is safe, chances are\n"
"high that it is not safe! If unsure, use px4fmu-v2_default.\n"
"\n"
"If you know you that the board does not have the silicon errata, use\n"
"this script with --force, or update the bootloader.\n")
self.__erase("Erase ")
self.__program("Program", fw)
@@ -560,7 +589,10 @@ class uploader(object):
return False
print("Attempting reboot on %s with baudrate=%d..." % (self.port.port, self.port.baudrate), file=sys.stderr)
print("If the board does not respond, unplug and re-plug the USB connector.", file=sys.stderr)
if "ttyS" in self.port.port:
print("If the board does not respond, check the connection to the Flight Controller")
else:
print("If the board does not respond, unplug and re-plug the USB connector.", file=sys.stderr)
try:
# try MAVLINK command first
@@ -591,7 +623,7 @@ def main():
parser.add_argument('--port', action="store", required=True, help="Comma-separated list of serial port(s) to which the FMU may be attached")
parser.add_argument('--baud-bootloader', action="store", type=int, default=115200, help="Baud rate of the serial port (default is 115200) when communicating with bootloader, only required for true serial ports.")
parser.add_argument('--baud-flightstack', action="store", default="57600", help="Comma-separated list of baud rate of the serial port (default is 57600) when communicating with flight stack (Mavlink or NSH), only required for true serial ports.")
parser.add_argument('--force', action='store_true', default=False, help='Override board type check and continue loading')
parser.add_argument('--force', action='store_true', default=False, help='Override board type check, or silicon errata checks and continue loading')
parser.add_argument('--boot-delay', type=int, default=None, help='minimum boot delay to store in flash')
parser.add_argument('firmware', action="store", help="Firmware file to be uploaded")
args = parser.parse_args()
@@ -605,7 +637,6 @@ def main():
# Load the firmware file
fw = firmware(args.firmware)
print("Loaded firmware for %x,%x, size: %d bytes, waiting for the bootloader..." % (fw.property('board_id'), fw.property('board_revision'), fw.property('image_size')))
print("If the board does not respond within 1-2 seconds, unplug and re-plug the USB connector.")
# tell any GCS that might be connected to the autopilot to give up
# control of the serial port
+4 -3
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
make px4fmu-v4_default
cp build/px4fmu-v4_default/parameters.xml ../qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
cp build/px4fmu-v4_default/airframes.xml ../qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
make parameters_metadata
cp parameters.xml ../qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
make airframe_metadata
cp airframes.xml ../qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
-32
View File
@@ -1,32 +0,0 @@
#!/bin/bash
# upload script for network-connected devices via scp (eg Raspberry Pi)
if [[ "$#" < 2 ]]; then
echo "usage: scp_upload.sh SRC1 [SRC2 ...] DEST"
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
user=pi
if [ -n "${AUTOPILOT_USER}" ]; then
user=${AUTOPILOT_USER}
fi
# Get last argument
for last; do true; done
# All except last argument
length=$(($#-1))
src_files=${@:1:$length}
echo "Uploading $src_files..."
# Upload files
scp -r $src_files ${user}@${host}:$last
+2
View File
@@ -0,0 +1,2 @@
*.json
+641
View File
@@ -0,0 +1,641 @@
#! /usr/bin/env python
from __future__ import print_function
import argparse
import os
import codecs
import re
import colorsys
import json
parser = argparse.ArgumentParser(
description='Generate uORB pub/sub dependency graph from source code')
parser.add_argument('-s', '--src-path', action='append',
help='Source path(s) (default=src, can be specified multiple times)',
default=[])
parser.add_argument('-e', '--exclude-path', action='append',
help='Excluded path(s), can be specified multiple times',
default=[])
parser.add_argument('-f', '--file', metavar='file', action='store',
help='output file name prefix',
default='graph')
parser.add_argument('-o', '--output', metavar='output', action='store',
help='output format (json or graphviz)',
default='json')
parser.add_argument('--use-topic-union', action='store_true',
help='''
Use the union of all publication and subscription topics (useful for complete
graphs or only few/single module(s)). The default is to use the intersection
(remove topics that have no subscriber or no publisher)''')
parser.add_argument('-m', '--modules', action='store',
help='Comma-separated whitelist of modules (the module\'s '+
'MAIN, e.g. from a startup script)',
default='')
args = parser.parse_args()
g_debug = False
def dbg_print(string):
if g_debug:
print(string)
def get_N_colors(N, s=0.8, v=0.9):
""" get N distinct colors as a list of hex strings """
HSV_tuples = [(x*1.0/N, s, v) for x in range(N)]
hex_out = []
for rgb in HSV_tuples:
rgb = map(lambda x: int(x*255), colorsys.hsv_to_rgb(*rgb))
hex_out.append("#"+"".join(map(lambda x: format(x, '02x'), rgb)))
return hex_out
class PubSub:
""" Collects either publication or subscription information for nodes
(modules and topics) & edges """
def __init__(self, is_publication, topic_blacklist, orb_pub_sub_regexes, special_cases):
"""
:param is_publication: if True, publications, False for
subscriptions
:param topic_blacklist: list of topics to blacklist
:param orb_pub_sub_regexes: list of regexes to extract orb calls
(e.g. orb_subscribe). They need to have 2 captures, the second
one is the one capturing ORB_ID(<topic>
"""
self._module_pubsubs = {} # key = module name, value = set of topic names
self._special_cases = special_cases
self._special_cases_matched = None
self._topic_blacklist = topic_blacklist
self._orb_pub_sub_regexes = orb_pub_sub_regexes
if is_publication:
self._method = 'Publication'
else:
self._method = 'Subscription'
def reset(self):
self._special_cases_matched = [False]*len(self._special_cases)
def filter_modules(self, module_whitelist):
remove = [k for k in self._module_pubsubs if k not in module_whitelist]
for k in remove: del self._module_pubsubs[k]
def check_if_match_found(self, modules):
""" check if all special cases got a match (if not, it means the source
code got changed)
"""
for i, (module_match, file_match_re, src_match_re, _) in enumerate(self._special_cases):
if module_match in modules and src_match_re is not None:
if not self._special_cases_matched[i]:
raise Exception('Module '+module_match+
': no match for '+self._method+' special case'+
src_match_re.pattern+'. The case needs to be updated')
def extract(self, file_name, src_str, module, orb_id_vehicle_attitude_controls_topic):
""" Extract subscribed/published topics from a source string
:param src_str: string of C/C++ code with comments and whitespace removed
"""
orb_pubsub_matches = []
for regex in self._orb_pub_sub_regexes:
orb_pubsub_matches += re.findall(regex, src_str)
orb_id = 'ORB_ID('
for _, match in orb_pubsub_matches:
if match == 'ORB_ID_VEHICLE_ATTITUDE_CONTROLS': # special case
match = orb_id+orb_id_vehicle_attitude_controls_topic
# match has the form: '[ORB_ID(]<topic_name>'
if match.startswith(orb_id):
topic_name = match[len(orb_id):]
self._add_topic(topic_name, file_name, module)
else:
ignore_found = False
for module_match, file_match_re, _, ignore_re in self._special_cases:
if module == module_match:
if file_match_re.search(file_name):
if ignore_re.search(match):
ignore_found = True
if not ignore_found:
# If we land here, we need to add another special case
raise Exception(self._method+' w/o ORB_ID(): '+match+' in '
+file_name+' ('+module+'). You need to add another special case.')
# handle special cases
for i, (module_match, file_match_re, src_match_re, _) in enumerate(self._special_cases):
if src_match_re is None:
continue
if module == module_match:
if file_match_re.search(file_name):
matches = src_match_re.findall(src_str)
for match in matches:
# match has the form: '[ORB_ID(]<topic_name>'
if match.startswith(orb_id):
topic_name = match[len(orb_id):]
dbg_print('Found '+self._method+' for special case in '
+module+': '+topic_name)
self._add_topic(topic_name, file_name, module)
self._special_cases_matched[i] = True
else:
# this is not fatal, as it could be a method delaration/definition
dbg_print('Special case '+self._method+' w/o ORB_ID(): '
+match+' in '+file_name+' ('+module+')')
def _add_topic(self, topic_name, file_name, module):
""" add a subscription/publication for a module
"""
if topic_name in self._topic_blacklist:
dbg_print('ignoring blacklisted topic '+topic_name)
return
if module is None:
if not file_name.endswith('hott/messages.cpp'): # hott has a special module structure. just ignore it
print('Warning: found '+self._method+' without associated module: '
+topic_name+' in '+file_name)
return
if not module in self._module_pubsubs:
self._module_pubsubs[module] = set()
self._module_pubsubs[module].add(topic_name)
def get_topics(self, modules):
""" get the set of topics
:param modules: list of modules to take into account
"""
topics = set()
for module in modules:
if module in self._module_pubsubs:
topics |= self._module_pubsubs[module]
return topics
@property
def pubsubs(self):
""" get dict of all publication/subscriptions (key=modules, value=set of
topic names"""
return self._module_pubsubs
class Graph:
""" Collects Node and Edge information by parsing the source tree """
def __init__(self, module_whitelist=[], topic_blacklist=[]):
self._current_module = [] # stack with current module (they can be nested)
self._all_modules = set() # set of all found modules
self._comment_remove_pattern = re.compile(
r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
re.DOTALL | re.MULTILINE)
self._whitespace_pattern = re.compile(r'\s+')
self._module_whitelist = module_whitelist
self._excluded_paths = []
self._orb_id_vehicle_attitude_controls_topic = 'actuator_controls_0'
self._orb_id_vehicle_attitude_controls_re = \
re.compile(r'\#define\s+ORB_ID_VEHICLE_ATTITUDE_CONTROLS\s+([^,)]+)')
self._module_subscriptions = {} # key = module name, value = set of topic names
self._module_publications = {} # key = module name, value = set of topic names
self._modules = set() # all modules
self._topics = set() # all topics
self._topic_colors = {} # key = topic, value = color (html string)
# handle special cases
# format: list of tuples with 4 entries:
# - module name to match (module MAIN)
# - regex for file name(s) to match within the module (matched against the full path)
# - regex to extract the topic name: the match must be ORB_ID(<topic_name>
# Note: whitespace is removed from source code, so it does not need to be
# accounted for in the regex.
# If this is None, it will just be ignored
# - regex to ignore matches in the form orb_[subscribe|advertise](<match>
# (the expectation is that the previous matching ORB_ID() will be passed
# to this, so that we can ignore it)
special_cases_sub = [
('sensors', r'voted_sensors_update\.cpp$', r'\binit_sensor_class\b\(([^,)]+)', r'^meta$'),
('mavlink', r'.*', r'\badd_orb_subscription\b\(([^,)]+)', r'^_topic$'),
('sdlog2', r'.*', None, r'^topic$'),
('logger', r'.*', None, r'^(topic|sub\.metadata|_polling_topic_meta)$'),
('uavcan', r'uavcan_main\.cpp$', r'\b_control_topics\[[0-9]\]=([^,)]+)', r'^_control_topics\[i\]$'),
('tap_esc', r'.*', r'\b_control_topics\[[0-9]\]=([^,)]+)', r'^_control_topics\[i\]$'),
('pwm_out_sim', r'.*', r'\b_control_topics\[[0-9]\]=([^,)]+)', r'^_control_topics\[i\]$'),
('snapdragon_pwm_out', r'.*', r'\b_controls_topics\[[0-9]\]=([^,)]+)', r'^_controls_topics\[i\]$'),
('fmu', r'.*', r'\b_control_topics\[[0-9]\]=([^,)]+)', r'^_control_topics\[i\]$'),
('linux_pwm_out', r'.*', r'\b_controls_topics\[[0-9]\]=([^,)]+)', r'^_controls_topics\[i\]$'),
]
special_cases_sub = [(a, re.compile(b), re.compile(c) if c is not None else None, re.compile(d))
for a,b,c,d in special_cases_sub]
self._subscriptions = PubSub(False, topic_blacklist,
[r"\borb_subscribe(_multi|)\b\(([^,)]+)"],
special_cases_sub)
special_cases_pub = [
('replay', r'replay_main\.cpp$', None, r'^sub\.orb_meta$'),
('fw_pos_control_l1', r'FixedwingPositionControl\.cpp$', r'\b_attitude_setpoint_id=([^,)]+)', r'^_attitude_setpoint_id$'),
('mc_pos_control', r'mc_pos_control_main\.cpp$', r'\b_attitude_setpoint_id=([^,)]+)', r'^_attitude_setpoint_id$'),
('mc_att_control', r'mc_att_control_main\.cpp$', r'\b_rates_sp_id=([^,)]+)', r'^_rates_sp_id$'),
('mc_att_control', r'mc_att_control_main\.cpp$', r'\b_actuators_id=([^,)]+)', r'^_actuators_id$'),
('fw_att_control', r'FixedwingAttitudeControl\.cpp$', r'\b_rates_sp_id=([^,)]+)', r'^_rates_sp_id$'),
('fw_att_control', r'FixedwingAttitudeControl\.cpp$', r'\b_actuators_id=([^,)]+)', r'^_actuators_id$'),
('fw_att_control', r'FixedwingAttitudeControl\.cpp$', r'\b_attitude_setpoint_id=([^,)]+)', r'^_attitude_setpoint_id$'),
('uavcan', r'sensors/.*\.cpp$', r'\bUavcanCDevSensorBridgeBase\([^{]*DEVICE_PATH,([^,)]+)', r'^_orb_topic$'),
('batt_smbus', r'batt_smbus\.cpp$', r'\b_batt_orb_id=([^,)]+)', r'^_batt_orb_id$'),
]
special_cases_pub = [(a, re.compile(b), re.compile(c) if c is not None else None, re.compile(d))
for a,b,c,d in special_cases_pub]
self._publications = PubSub(True, topic_blacklist,
[r"\borb_advertise(_multi|_queue|_multi_queue|)\b\(([^,)]+)",
r"\borb_publish_auto()\b\(([^,)]+)"],
special_cases_pub)
def _get_current_module(self):
if len(self._current_module) == 0:
return None
return self._current_module[-1]
def build(self, src_path_list, excluded_paths=[], use_topic_pubsub_union=True):
""" parse the source tree & extract pub/sub information.
:param use_topic_pubsub_union: if true, use all topics that have a
publisher or subscriber. If false, use only topics with at least one
publisher and subscriber.
fill in self._module_subsciptions & self._module_publications
"""
self._subscriptions.reset()
self._publications.reset()
self._excluded_paths = [os.path.normpath(p) for p in excluded_paths]
for path in src_path_list:
self._build_recursive(path)
# filter by whitelist
if len(self._module_whitelist) > 0:
self._subscriptions.filter_modules(self._module_whitelist)
self._publications.filter_modules(self._module_whitelist)
# modules & topics sets
self._modules = set(self._publications.pubsubs.keys() +
self._subscriptions.pubsubs.keys())
print('number of modules: '+str(len(self._modules)))
self._topics = self._get_topics(use_topic_pubsub_union=use_topic_pubsub_union)
print('number of topics: '+str(len(self._topics)))
# initialize colors
color_list = get_N_colors(len(self._topics), 0.7, 0.85)
self._topic_colors = {}
for i, topic in enumerate(self._topics):
self._topic_colors[topic] = color_list[i]
# validate that all special rules got used
self._subscriptions.check_if_match_found(self._all_modules)
self._publications.check_if_match_found(self._all_modules)
def _get_topics(self, use_topic_pubsub_union=True):
""" get the set of topics
"""
subscribed_topics = self._subscriptions.get_topics(self._modules)
published_topics = self._publications.get_topics(self._modules)
if use_topic_pubsub_union:
return subscribed_topics | published_topics
return subscribed_topics & published_topics
def _build_recursive(self, path):
if os.path.normpath(path) in self._excluded_paths:
dbg_print('ignoring excluded path '+path)
return
entries = os.listdir(path)
# check if entering a new module
cmake_file = 'CMakeLists.txt'
new_module = False
if cmake_file in entries:
new_module = self._extract_module_name(os.path.join(path, cmake_file))
# iterate directories recursively
for entry in entries:
file_name = os.path.join(path, entry)
if os.path.isdir(file_name):
self._build_recursive(file_name)
# iterate source files
# Note: we could skip the entries if we're not in a module, but we don't
# so that we get appropriate error messages to know where we miss subs
# or pubs
for entry in entries:
file_name = os.path.join(path, entry)
if os.path.isfile(file_name):
_, ext = os.path.splitext(file_name)
if ext in ['.cpp', '.c', '.h', '.hpp']:
self._process_source_file(file_name)
if new_module:
self._current_module.pop()
def _extract_module_name(self, file_name):
""" extract the module name from a CMakeLists.txt file and store
in self._current_module if there is any """
datafile = file(file_name)
found_module_def = False
for line in datafile:
if 'px4_add_module' in line: # must contain 'px4_add_module'
found_module_def = True
words = line.split()
# get the definition of MAIN
if found_module_def and 'MAIN' in words and len(words) >= 2:
self._current_module.append(words[1])
self._all_modules.add(words[1])
dbg_print('Found module name: '+words[1])
return True
return False
def _process_source_file(self, file_name):
""" extract information from a single source file """
with codecs.open(file_name, 'r', 'utf-8') as f:
try:
content = f.read()
except:
print('Failed reading file: %s, skipping content.' % path)
return
current_module = self._get_current_module()
if current_module == 'uorb_tests': # skip this
return
if current_module == 'uorb':
# search and validate the ORB_ID_VEHICLE_ATTITUDE_CONTROLS define
matches = self._orb_id_vehicle_attitude_controls_re.findall(content)
for match in matches:
if match != 'ORB_ID('+self._orb_id_vehicle_attitude_controls_topic:
# if we land here, you need to change _orb_id_vehicle_attitude_controls_topic
raise Exception(
'The extracted define for ORB_ID_VEHICLE_ATTITUDE_CONTROLS '
'is '+match+' but expected ORB_ID('+
self._orb_id_vehicle_attitude_controls_topic)
return # skip uorb module for the rest
if content.lower().find('orb_') != -1: # approximative filter to quickly
# discard files we're not interested in
# (speedup the parsing)
src = self._comment_remover(content)
src = re.sub(self._whitespace_pattern, '', src) # remove all whitespace
# subscriptions
self._subscriptions.extract(file_name, src, current_module,
self._orb_id_vehicle_attitude_controls_topic)
# publications
self._publications.extract(file_name, src, current_module,
self._orb_id_vehicle_attitude_controls_topic)
# TODO: handle Publication & Subscription template classes
def _comment_remover(self, text):
""" remove C++ & C style comments.
Source: https://stackoverflow.com/a/241506 """
def replacer(match):
s = match.group(0)
if s.startswith('/'):
return " " # note: a space and not an empty string
else:
return s
return re.sub(self._comment_remove_pattern, replacer, text)
@property
def modules(self):
""" get the set of all modules """
return self._modules
@property
def topics(self):
""" get set set of all topics """
return self._topics
@property
def topic_colors(self):
""" get a dict of all topic colors with key=topic, value=color """
return self._topic_colors
@property
def module_subscriptions(self):
""" get a dict of all subscriptions with key=module name, value=set(topic names) """
return self._subscriptions.pubsubs
@property
def module_publications(self):
""" get a dict of all publications with key=module name, value=set(topic names) """
return self._publications.pubsubs
class OutputGraphviz:
""" write graph using Graphviz """
def __init__(self, graph):
self._graph = graph
def write(self, file_name, engine='fdp',
show_publications=True, show_subscriptions=True):
""" write the graph to a file
:param engine: graphviz engine
- fdp works for large graphs
- neato works better for smaller graphs
- circo works for single modules
CLI: fdp graph.fv -Tpdf -o test.pdf
"""
print('Writing to '+file_name)
ratio = 1 # aspect ratio
modules = self._graph.modules
topics = self._graph.topics
topic_colors = self._graph.topic_colors
module_publications = self._graph.module_publications
module_subscriptions = self._graph.module_subscriptions
graph_attr={'splines': 'true', 'ratio': str(ratio), 'overlap': 'false'}
graph_attr['sep'] = '"+15,15"' # increase spacing between nodes
graph = Digraph(comment='autogenerated graph with graphviz using uorb_graph.py',
engine=engine, graph_attr=graph_attr)
# nodes
for module in modules:
graph.node('m_'+module, module, shape='box', fontcolor='#ffffff',
style='filled', color='#666666', fontsize='16')
for topic in topics:
graph.node('t_'+topic, topic, shape='ellipse', fontcolor='#ffffff',
style='filled', color=topic_colors[topic])
# edges
if show_publications:
for module in modules:
if module in module_publications:
for topic in module_publications[module]:
if topic in topics:
graph.edge('m_'+module, 't_'+topic,
color=topic_colors[topic], style='dashed')
if show_subscriptions:
for module in modules:
if module in module_subscriptions:
for topic in module_subscriptions[module]:
if topic in topics:
graph.edge('t_'+topic, 'm_'+module,
color=topic_colors[topic])
graph.render(file_name, view=False)
class OutputJSON:
""" write graph to a JSON file (that can be used with D3.js) """
def __init__(self, graph):
self._graph = graph
def write(self, file_name):
print('Writing to '+file_name)
modules = self._graph.modules
topics = self._graph.topics
topic_colors = self._graph.topic_colors
module_publications = self._graph.module_publications
module_subscriptions = self._graph.module_subscriptions
data = {}
nodes = []
# nodes
# (sort by length, such that short names are last. The rendering order
# will be the same, so that in case of an overlap, the shorter label
# will be on top)
for module in sorted(modules, key=len, reverse=True):
node = {}
node['id'] = 'm_'+module
node['name'] = module
node['type'] = 'module'
node['color'] = '#666666'
# TODO: add url to open module documentation?
nodes.append(node)
for topic in sorted(topics, key=len, reverse=True):
node = {}
node['id'] = 't_'+topic
node['name'] = topic
node['type'] = 'topic'
node['color'] = topic_colors[topic]
# url is opened when double-clicking on the node
# TODO: does not work for multi-topics
node['url'] = 'https://github.com/PX4/Firmware/blob/master/msg/'+topic+'.msg'
nodes.append(node)
data['nodes'] = nodes
edges = []
# edges
for module in modules:
if module in module_publications:
for topic in module_publications[module]:
if topic in topics:
edge = {}
edge['source'] = 'm_'+module
edge['target'] = 't_'+topic
edge['color'] = topic_colors[topic]
edge['style'] = 'dashed'
edges.append(edge)
for module in modules:
if module in module_subscriptions:
for topic in module_subscriptions[module]:
if topic in topics:
edge = {}
edge['source'] = 't_'+topic
edge['target'] = 'm_'+module
edge['color'] = topic_colors[topic]
edge['style'] = 'normal'
edges.append(edge)
data['links'] = edges
with open(file_name, 'w') as outfile:
json.dump(data, outfile) # add indent=2 for readable formatting
# ignore topics that are subscribed/published by many topics, but are not really
# useful to show in the graph
topic_blacklist = [ 'parameter_update', 'mavlink_log', 'log_message' ]
print('Excluded topics: '+str(topic_blacklist))
if len(args.modules) == 0:
module_whitelist = []
else:
module_whitelist = [ m.strip() for m in args.modules.split(',')]
graph = Graph(module_whitelist=module_whitelist, topic_blacklist=topic_blacklist)
if len(args.src_path) == 0:
args.src_path = ['src']
graph.build(args.src_path, args.exclude_path, use_topic_pubsub_union=args.use_topic_union)
if args.output == 'json':
output_json = OutputJSON(graph)
output_json.write(args.file+'.json')
elif args.output == 'graphviz':
try:
from graphviz import Digraph
except:
print("Failed to import graphviz.")
print("You may need to install it with 'pip install graphviz'")
print("")
raise
output_graphviz = OutputGraphviz(graph)
engine='fdp' # use neato or fdp
output_graphviz.write(args.file+'.fv', engine=engine)
output_graphviz.write(args.file+'_subs.fv', show_publications=False, engine=engine)
output_graphviz.write(args.file+'_pubs.fv', show_subscriptions=False, engine=engine)
else:
print('Error: unknown output format '+args.output)
+13
View File
@@ -0,0 +1,13 @@
#! /bin/bash
# create the graph from a posix (e.g. SITL) startup script
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
startup_file="$SCRIPT_DIR"/../../posix-configs/SITL/init/ekf2/typhoon_h480
[ -n "$1" ] && startup_file=$1
# get the modules as comma-separated list
modules=$(cat "$startup_file"|cut -f1 -d' '|sort|uniq|tr '\n' ,)
cd "$SCRIPT_DIR/../.."
"$SCRIPT_DIR"/create.py --src-path src -m "$modules" -f "$SCRIPT_DIR/graph_runtime_sitl"
Vendored
-131
View File
@@ -1,131 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# MAVLink telemetry via UDP in SITL mode
config.vm.network "forwarded_port", guest: 14556, host: 14556, protocol: "udp"
# SITL simulation data
config.vm.network "forwarded_port", guest: 14560, host: 14560, protocol: "udp"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# NFS should be faster: https://stefanwrobel.com/how-to-make-vagrant-performance-not-suck
config.vm.synced_folder ".", "/Firmware", type: "nfs"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# This is to configure the machine to be as fast as possible
# Alternative: https://github.com/rdsubhas/vagrant-faster
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
vb.customize ["modifyvm", :id, "--ioapic", "on"]
#vb.customize ["modifyvm", :id, "--cpus", "2"]
config.vm.provider "virtualbox" do |v|
host = RbConfig::CONFIG['host_os']
# Give VM 1/4 system memory & access to all cpu cores on the host
if host =~ /darwin/
cpus = `sysctl -n hw.ncpu`.to_i
# sysctl returns Bytes and we need to convert to MB
mem = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / 4
elsif host =~ /linux/
cpus = `nproc`.to_i
# meminfo shows KB and we need to convert to MB
mem = `grep 'MemTotal' /proc/meminfo | sed -e 's/MemTotal://' -e 's/ kB//'`.to_i / 1024 / 4
else # sorry Windows folks, I can't help you
cpus = 2
mem = 1024
end
v.customize ["modifyvm", :id, "--memory", mem]
v.customize ["modifyvm", :id, "--cpus", cpus]
end
# Since make and other tools freak out if they see timestamps
# from the future and we share directories, tightly lock the host and guest clocks together (clock sync if more than 2 seconds off)
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 2000]
# Do this on start and restore
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-start"]
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", "1"]
# Customize the amount of memory on the VM:
#vb.memory = "2048"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", privileged: false, inline: <<-SHELL
# Ensure we start in the Firmware folder
echo "cd /Firmware" >> ~/.bashrc
# Install software
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded -y
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
sudo apt-get update
sudo apt-get install -y build-essential ccache cmake clang-3.5 lldb-3.5 g++-4.8 gcc-4.8 genromfs libc6-i386 libncurses5-dev python-argparse python-empy python-serial s3cmd texinfo zlib1g-dev git-core zip gdb gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
pushd .
cd ~
wget -q https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
tar -jxf gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
exportline="export PATH=$HOME/gcc-arm-none-eabi-4_8-2014q3/bin:\$PATH"
if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
exportline2="export HEXAGON_TOOLS_ROOT=$HOME/Qualcomm/HEXAGON_Tools/7.2.10/Tools"
if grep -Fxq "$exportline2" ~/.profile; then echo nothing to do ; else echo $exportline2 >> ~/.profile; fi
. ~/.profile
popd
# setup ccache
mkdir -p ~/bin
ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
ln -s /usr/bin/ccache ~/bin/g++-4.8
ln -s /usr/bin/ccache ~/bin/gcc-4.8
export PATH=~/bin:$PATH
# Configure hardware related bits
sudo apt-get -y remove modemmanager
sudo usermod -a -G dialout $USER
SHELL
end
+4 -1
View File
@@ -27,4 +27,7 @@ dependencies:
test:
override:
- NO_NINJA_BUILD=1 make -j2 quick_check
#- NO_NINJA_BUILD=1 make -j2 quick_check
- make posix_sitl_default
- make px4fmu-v4pro_default
- make tests
+2
View File
@@ -332,6 +332,8 @@ function(px4_add_common_flags)
-Wunknown-pragmas
-Wunused-variable
-Wno-implicit-fallthrough # set appropriate level and update
-Wno-unused-parameter
)
-182
View File
@@ -1,182 +0,0 @@
############################################################################
#
# Copyright (c) 2017 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
#=============================================================================
#
# Defined functions in this file
#
# utility functions
#
# * px4_add_upload
# * px4_add_adb_push
# * px4_add_adb_push_to_bebop
# * px4_add_scp_push
# * px4_add_upload_aero
#
#=============================================================================
#
# px4_add_upload
#
# This function generates source code from ROS msg definitions.
#
# Usage:
# px4_add_upload(OUT <target> BUNDLE <file.px4>)
#
# Input:
# BUNDLE : the firmware.px4 file
# OS : the operating system
# BOARD : the board
#
# Output:
# OUT : the firmware target
#
# Example:
# px4_add_upload(OUT upload
# BUNDLE main.px4
# )
#
function(px4_add_upload)
px4_parse_function_args(
NAME px4_add_upload
ONE_VALUE OS BOARD OUT BUNDLE
REQUIRED OS BOARD OUT BUNDLE
ARGN ${ARGN})
set(serial_ports)
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
list(APPEND serial_ports
/dev/serial/by-id/*_PX4_*
/dev/serial/by-id/usb-3D_Robotics*
/dev/serial/by-id/usb-The_Autopilot*
/dev/serial/by-id/usb-Bitcraze*
/dev/serial/by-id/pci-3D_Robotics*
/dev/serial/by-id/pci-Bitcraze*
/dev/serial/by-id/usb-Gumstix*
)
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
list(APPEND serial_ports
/dev/tty.usbmodemPX*,/dev/tty.usbmodem*
)
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
foreach(port RANGE 32 0)
list(APPEND serial_ports
"COM${port}")
endforeach()
endif()
px4_join(OUT serial_ports LIST "${serial_ports}" GLUE ",")
add_custom_target(${OUT}
COMMAND ${PYTHON_EXECUTABLE}
${PX4_SOURCE_DIR}/Tools/px_uploader.py --port ${serial_ports} ${BUNDLE}
DEPENDS ${BUNDLE}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
function(px4_add_adb_push)
px4_parse_function_args(
NAME px4_add_upload
ONE_VALUE OS BOARD OUT DEST
MULTI_VALUE FILES DEPENDS
REQUIRED OS BOARD OUT FILES DEPENDS DEST
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${PX4_SOURCE_DIR}/Tools/adb_upload.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
function(px4_add_adb_push_to_bebop)
px4_parse_function_args(
NAME px4_add_upload_to_bebop
ONE_VALUE OS BOARD OUT DEST
MULTI_VALUE FILES DEPENDS
REQUIRED OS BOARD OUT FILES DEPENDS DEST
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${PX4_SOURCE_DIR}/Tools/adb_upload_to_bebop.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
function(px4_add_scp_push)
px4_parse_function_args(
NAME px4_add_upload
ONE_VALUE OS BOARD OUT DEST
MULTI_VALUE FILES DEPENDS
REQUIRED OS BOARD OUT FILES DEPENDS DEST
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${PX4_SOURCE_DIR}/Tools/scp_upload.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
function(px4_add_upload_aero)
px4_parse_function_args(
NAME px4_add_upload_aero
ONE_VALUE OS BOARD OUT BUNDLE
REQUIRED OS BOARD OUT BUNDLE
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${PX4_SOURCE_DIR}/Tools/aero_upload.sh ${BUNDLE}
DEPENDS ${BUNDLE}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
+10 -25
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@@ -8,6 +7,12 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
#drivers/magnetometer
drivers/telemetry
drivers/device
drivers/stm32
drivers/stm32/adc
@@ -15,22 +20,14 @@ set(config_module_list
drivers/led
drivers/px4fmu
drivers/boards
drivers/lsm303d
drivers/l3gd20
drivers/ms5611
drivers/teraranger
drivers/imu/lsm303d
drivers/imu/l3gd20
drivers/gps
drivers/pwm_out_sim
drivers/airspeed
drivers/ets_airspeed
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/sdp3x_airspeed
#drivers/frsky_telemetry
modules/sensors
#drivers/pwm_input
#drivers/camera_trigger
drivers/bst
#
# System commands
@@ -55,7 +52,7 @@ set(config_module_list
#
# Testing
#
#drivers/sf0x/sf0x_tests
#drivers/distance_sensor/sf0x/sf0x_tests
#drivers/test_ppm
#lib/rc/rc_tests
#modules/commander/commander_tests
@@ -117,21 +114,13 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@@ -151,10 +140,6 @@ set(config_module_list
# 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
+14 -18
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@@ -8,19 +7,19 @@ set(config_module_list
#
# Board support modules
#
drivers/device
drivers/stm32
drivers/led
drivers/px4fmu
drivers/boards
drivers/tap_esc
drivers/mpu9250
drivers/ms5611
drivers/hmc5883
drivers/gps
drivers/ist8310
drivers/ll40ls
drivers/aerofc_adc
drivers/boards
drivers/device
drivers/distance_sensor
drivers/gps
drivers/led
drivers/barometer/ms5611
drivers/magnetometer/hmc5883
drivers/magnetometer/ist8310
drivers/imu/mpu9250
drivers/px4fmu
drivers/stm32
drivers/tap_esc
modules/sensors
#
@@ -52,6 +51,7 @@ set(config_module_list
#
modules/attitude_estimator_q
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@@ -59,6 +59,7 @@ set(config_module_list
#
modules/mc_att_control
modules/mc_pos_control
modules/vtol_att_control # FIXME: only required for params needed by Navigator
#
# Logging
@@ -83,12 +84,7 @@ set(config_module_list
lib/geo
lib/geo_lookup
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/tailsitter_recovery
lib/version
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
)
+28 -51
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
@@ -8,47 +7,35 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/airspeed
drivers/batt_smbus
drivers/blinkm
drivers/boards
drivers/camera_trigger
drivers/device
drivers/gps
drivers/led
drivers/mkblctrl
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/oreoled
drivers/pwm_input
drivers/pwm_out_sim
drivers/px4flow
drivers/px4fmu
drivers/px4io
drivers/rgbled
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/led
drivers/px4fmu
drivers/px4io
drivers/boards
drivers/rgbled
drivers/mpu6000
drivers/mpu9250
drivers/hmc5883
drivers/ms5611
drivers/mb12xx
drivers/srf02
drivers/sf0x
drivers/sf1xx
drivers/ll40ls
drivers/teraranger
drivers/gps
drivers/pwm_out_sim
drivers/hott
drivers/hott/hott_telemetry
drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/sdp3x_airspeed
drivers/frsky_telemetry
modules/sensors
drivers/mkblctrl
drivers/px4flow
drivers/oreoled
drivers/vmount
drivers/pwm_input
drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm
drivers/lis3mdl
modules/sensors
#
# System commands
@@ -70,12 +57,13 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
# Testing
#
drivers/sf0x/sf0x_tests
drivers/distance_sensor/sf0x/sf0x_tests
drivers/test_ppm
#lib/rc/rc_tests
modules/commander/commander_tests
@@ -102,6 +90,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@@ -138,20 +127,12 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@@ -171,10 +152,6 @@ set(config_module_list
# 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
+4 -17
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@@ -11,8 +10,8 @@ set(config_module_list
drivers/led
drivers/px4fmu
drivers/boards
drivers/mpu9250
drivers/lps25h
drivers/imu/mpu9250
drivers/barometer/lps25h
drivers/gps
modules/sensors
@@ -51,6 +50,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@@ -61,7 +61,7 @@ set(config_module_list
# modules/fw_att_control
modules/mc_att_control
modules/mc_pos_control
# modules/vtol_att_control
modules/vtol_att_control # FIXME: only required for params needed by Navigator
#
# Logging
@@ -85,20 +85,11 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@@ -118,10 +109,6 @@ set(config_module_list
# 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
+1 -5
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
add_definitions(
-DFLASH_BASED_PARAMS
@@ -28,7 +27,7 @@ add_definitions(
)
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/esc35-v1.bin
BIN ${PX4_BINARY_DIR}/platforms/nuttx/esc35-v1.bin
HWNAME ${uavcanblid_name}
HW_MAJOR ${uavcanblid_hw_version_major}
HW_MINOR ${uavcanblid_hw_version_minor}
@@ -72,7 +71,4 @@ set(config_module_list
modules/systemlib
modules/systemlib/param
modules/uORB
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
)
+32 -55
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@@ -8,50 +7,38 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/airspeed
drivers/batt_smbus
drivers/blinkm
drivers/boards
drivers/camera_trigger
drivers/device
drivers/gps
#drivers/hott
drivers/imu/l3gd20
drivers/led
drivers/imu/lsm303d
#drivers/mkblctrl
drivers/imu/mpu6000
drivers/imu/mpu9250
#drivers/oreoled
drivers/pwm_input
drivers/pwm_out_sim
drivers/px4flow
drivers/px4fmu
drivers/rgbled
#drivers/rgbled_pwm
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/led
drivers/px4fmu
drivers/boards
drivers/rgbled
#drivers/rgbled_pwm
drivers/mpu6000
drivers/mpu9250
drivers/lsm303d
drivers/l3gd20
drivers/hmc5883
drivers/ms5611
drivers/mb12xx
drivers/srf02
drivers/srf02_i2c
#drivers/hc_sr04
drivers/sf0x
drivers/sf1xx
drivers/ll40ls
drivers/teraranger
drivers/gps
drivers/pwm_out_sim
#drivers/hott
#drivers/hott/hott_telemetry
#drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/sdp3x_airspeed
drivers/frsky_telemetry
modules/sensors
#drivers/mkblctrl
drivers/px4flow
#drivers/oreoled
drivers/vmount
drivers/pwm_input
drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm
modules/sensors
#
# System commands
@@ -66,6 +53,7 @@ set(config_module_list
systemcmds/hardfault_log
systemcmds/reboot
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/top
systemcmds/config
systemcmds/nshterm
@@ -78,7 +66,7 @@ set(config_module_list
#
# Tests
#
drivers/sf0x/sf0x_tests
drivers/distance_sensor/sf0x/sf0x_tests
drivers/test_ppm
modules/commander/commander_tests
modules/mc_pos_control/mc_pos_control_tests
@@ -106,6 +94,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@@ -142,21 +131,13 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@@ -176,10 +157,6 @@ set(config_module_list
# 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
@@ -190,4 +167,4 @@ set(config_module_list
# Hardware test
#examples/hwtest
)
)
+18 -48
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@@ -8,41 +7,30 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/airspeed
drivers/barometer/mpl3115a2
drivers/batt_smbus
drivers/blinkm
#NOT Supported drivers/bma180
#NOT Supported drivers/bmi160
drivers/bmp280
drivers/boards
drivers/bst
drivers/camera_trigger
drivers/device
drivers/ets_airspeed
drivers/frsky_telemetry
drivers/fxos8701cq
drivers/fxas21002c
drivers/imu/fxas21002c
drivers/imu/fxos8701cq
drivers/gps
drivers/hmc5883
drivers/hott
drivers/hott/hott_sensors
drivers/hott/hott_telemetry
drivers/iridiumsbd
drivers/kinetis
drivers/kinetis/adc
drivers/kinetis/tone_alarm
drivers/l3gd20
drivers/imu/l3gd20
drivers/led
drivers/lis3mdl
drivers/ll40ls
drivers/lsm303d
drivers/mb12xx
drivers/mkblctrl
drivers/mpl3115a2
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/oreoled
# NOT Portable YET drivers/pwm_input
drivers/pwm_out_sim
@@ -50,13 +38,7 @@ set(config_module_list
drivers/px4fmu
drivers/rgbled
drivers/rgbled_pwm
drivers/sdp3x_airspeed
drivers/sf0x
drivers/sf1xx
drivers/snapdragon_rc_pwm
drivers/srf02
drivers/tap_esc
drivers/teraranger
drivers/vmount
modules/sensors
@@ -80,13 +62,14 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/usb_connected
systemcmds/ver
#
# Testing
#
drivers/sf0x/sf0x_tests
drivers/distance_sensor/sf0x/sf0x_tests
### NOT Portable YET drivers/test_ppm
#lib/rc/rc_tests
modules/commander/commander_tests
@@ -115,6 +98,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/ekf2
modules/local_position_estimator
modules/landing_target_estimator
modules/position_estimator_inav
#
@@ -150,25 +134,15 @@ set(config_module_list
lib/geo
lib/geo_lookup
lib/conversion
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
lib/DriverFramework/framework
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
#
# OBC challenge
#
@@ -192,10 +166,6 @@ set(config_module_list
# 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
@@ -206,4 +176,4 @@ set(config_module_list
# Hardware test
examples/hwtest
)
)
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@@ -8,6 +7,12 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/device
drivers/samv7
#WIP drivers/samv7/adc
@@ -16,28 +21,14 @@ set(config_module_list
drivers/px4fmu
drivers/boards
drivers/rgbled
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/lsm303d
drivers/l3gd20
drivers/hmc5883
drivers/ms5611
drivers/mb12xx
drivers/srf02
drivers/sf0x
drivers/ll40ls
drivers/teraranger
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/imu/lsm303d
drivers/imu/l3gd20
drivers/gps
#WIP drivers/pwm_out_sim
drivers/hott
drivers/hott/hott_telemetry
drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/frsky_telemetry
modules/sensors
#drivers/mkblctrl
drivers/px4flow
@@ -45,9 +36,6 @@ set(config_module_list
## drivers/gimbal
#WIP drivers/pwm_input
#WIP drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm
drivers/lis3mdl
#
# System commands
@@ -84,6 +72,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@@ -119,21 +108,12 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@@ -153,10 +133,6 @@ set(config_module_list
# 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
@@ -167,4 +143,4 @@ set(config_module_list
# Hardware test
#examples/hwtest
)
)
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@@ -41,14 +40,8 @@ set(config_module_list
lib/ecl
lib/geo
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# Demo apps
@@ -58,10 +51,6 @@ set(config_module_list
# 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
@@ -72,4 +61,4 @@ set(config_module_list
# Hardware test
#examples/hwtest
)
)
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
add_definitions(
-DPARAM_NO_ORB
@@ -26,7 +25,7 @@ add_definitions(
)
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
BIN ${PX4_BINARY_DIR}/src/firmware/nuttx/px4cannode-v1.bin
BIN ${PX4_BINARY_DIR}/platforms/nuttx/px4cannode-v1.bin
HWNAME ${uavcanblid_name}
HW_MAJOR ${uavcanblid_hw_version_major}
HW_MINOR ${uavcanblid_hw_version_minor}
@@ -64,7 +63,5 @@ set(config_module_list
modules/systemlib
modules/systemlib/param
modules/uORB
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
)
+2 -5
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
add_definitions(
-DFLASH_BASED_PARAMS
@@ -28,7 +27,7 @@ add_definitions(
)
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
BIN ${PX4_BINARY_DIR}/src/firmware/nuttx/px4esc-v1.bin
BIN ${PX4_BINARY_DIR}/platforms/nuttx/px4esc-v1.bin
HWNAME ${uavcanblid_name}
HW_MAJOR ${uavcanblid_hw_version_major}
HW_MINOR ${uavcanblid_hw_version_minor}
@@ -73,7 +72,5 @@ set(config_module_list
modules/systemlib
modules/systemlib/param
modules/uORB
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
)
+35 -46
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
#set(config_uavcan_num_ifaces 2)
@@ -7,63 +6,65 @@ set(config_module_list
#
# Board support modules
#
#drivers/adis16448
#drivers/barometer
drivers/differential_pressure
#drivers/magnetometer
#drivers/telemetry
#drivers/imu/adis16448
drivers/airspeed
drivers/barometer/ms5611
#drivers/blinkm
#drivers/bmi160
#drivers/bmp280
#drivers/imu/bmi160
#drivers/barometer/bmp280
drivers/boards
#drivers/bst
drivers/camera_trigger
drivers/device
#drivers/ets_airspeed
drivers/frsky_telemetry
#drivers/frsky_telemetry
drivers/gps
drivers/hmc5883
#drivers/hott
#drivers/hott/hott_sensors
#drivers/hott/hott_telemetry
#drivers/iridiumsbd
#drivers/irlock
#drivers/ist8310
drivers/l3gd20
drivers/imu/l3gd20
drivers/led
drivers/lis3mdl
drivers/ll40ls
drivers/lsm303d
drivers/imu/lsm303d
drivers/magnetometer/hmc5883
drivers/magnetometer/lis3mdl
#drivers/mb12xx
#drivers/mkblctrl
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
drivers/imu/mpu6000
drivers/imu/mpu9250
#drivers/oreoled
#drivers/protocol_splitter
drivers/pwm_input
drivers/pwm_out_sim
#drivers/pwm_out_sim
drivers/px4flow
drivers/px4fmu
drivers/px4io
drivers/rgbled
drivers/sdp3x_airspeed
drivers/sf0x
drivers/sf1xx
#drivers/snapdragon_rc_pwm
#drivers/srf02
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
#drivers/tap_esc
drivers/teraranger
#drivers/ulanding
drivers/vmount
# distance sensors
drivers/distance_sensor/ll40ls
drivers/distance_sensor/mb12xx
drivers/distance_sensor/sf0x
drivers/distance_sensor/sf1xx
drivers/distance_sensor/srf02
drivers/distance_sensor/srf02_i2c
drivers/distance_sensor/teraranger
drivers/distance_sensor/tfmini
#drivers/distance_sensor/ulanding
modules/sensors
#
# System commands
#
systemcmds/bl_update
#systemcmds/bl_update
#systemcmds/config
#systemcmds/dumpfile
#systemcmds/esc_calib
@@ -81,12 +82,13 @@ set(config_module_list
#systemcmds/sd_bench
systemcmds/top
#systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
# Testing
#
#drivers/sf0x/sf0x_tests
#drivers/distance_sensor/sf0x/sf0x_tests
#drivers/test_ppm
#lib/controllib/controllib_test
#lib/rc/rc_tests
@@ -116,14 +118,15 @@ set(config_module_list
modules/ekf2
#modules/local_position_estimator
#modules/position_estimator_inav
#modules/landing_target_estimator
#
# Vehicle Control
#
modules/fw_att_control
modules/fw_pos_control_l1
modules/gnd_att_control
modules/gnd_pos_control
#modules/gnd_att_control
#modules/gnd_pos_control
modules/mc_att_control
modules/mc_pos_control
modules/vtol_att_control
@@ -151,23 +154,13 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
#lib/terrain_estimation
lib/tunes
lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
#
# OBC challenge
#
@@ -191,10 +184,6 @@ set(config_module_list
# 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
+4
View File
@@ -7,6 +7,10 @@ list(REMOVE_ITEM config_module_list
)
list(APPEND config_module_list
drivers/irlock
modules/attitude_estimator_q
modules/local_position_estimator
modules/landing_target_estimator
)
+9 -28
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_test)
@@ -15,12 +14,11 @@ set(config_module_list
drivers/px4io
drivers/boards
drivers/rgbled
drivers/mpu6000
#TO FIT drivers/mpu9250
drivers/lsm303d
drivers/l3gd20
drivers/imu/mpu6000
#TO FIT drivers/imu/mpu9250
drivers/imu/lsm303d
drivers/imu/l3gd20
drivers/hmc5883
drivers/ms5611
#drivers/mb12xx
#drivers/srf02
#drivers/sf0x
@@ -29,15 +27,10 @@ set(config_module_list
drivers/gps
#drivers/pwm_out_sim
#drivers/hott
#drivers/hott/hott_telemetry
#drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/sdp3x_airspeed
drivers/frsky_telemetry
drivers/barometer
drivers/differential_pressure
modules/sensors
#drivers/mkblctrl
drivers/px4flow
@@ -46,8 +39,8 @@ set(config_module_list
drivers/pwm_input
drivers/camera_trigger
#drivers/bst
#drivers/snapdragon_rc_pwm
#drivers/lis3mdl
drivers/tfmini
#
# System commands
@@ -73,7 +66,7 @@ set(config_module_list
#
# Testing
#
drivers/sf0x/sf0x_tests
drivers/distance_sensor/sf0x/sf0x_tests
drivers/test_ppm
#lib/rc/rc_tests
modules/commander/commander_tests
@@ -134,20 +127,12 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@@ -167,10 +152,6 @@ set(config_module_list
# 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
+18 -45
View File
@@ -2,9 +2,9 @@
# FMUv3 is FMUv2 with access to the full 2MB flash
set(BOARD px4fmu-v2 CACHE string "" FORCE)
set(FW_NAME nuttx_px4fmu-v3_default.elf CACHE string "" FORCE)
set(FW_PROTOTYPE px4fmu-v3 CACHE string "" FORCE)
set(LD_SCRIPT ld_full.script CACHE string "" FORCE)
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
set(config_uavcan_num_ifaces 2)
@@ -13,36 +13,28 @@ set(config_module_list
#
# Board support modules
#
drivers/adis16448
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/airspeed
drivers/batt_smbus
drivers/blinkm
drivers/bmi160
drivers/bmp280
drivers/boards
drivers/bst
drivers/camera_trigger
drivers/device
drivers/ets_airspeed
drivers/frsky_telemetry
drivers/gps
drivers/hmc5883
drivers/hott
drivers/hott/hott_sensors
drivers/hott/hott_telemetry
drivers/iridiumsbd
drivers/imu/adis16448
drivers/imu/bmi160
drivers/imu/l3gd20
drivers/imu/lsm303d
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/irlock
drivers/l3gd20
drivers/led
drivers/lis3mdl
drivers/ll40ls
drivers/lsm303d
drivers/mb12xx
drivers/mkblctrl
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
drivers/oreoled
drivers/protocol_splitter
drivers/pwm_input
@@ -51,17 +43,10 @@ set(config_module_list
drivers/px4fmu
drivers/px4io
drivers/rgbled
drivers/sdp3x_airspeed
drivers/sf0x
drivers/sf1xx
drivers/snapdragon_rc_pwm
drivers/srf02
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/tap_esc
drivers/teraranger
drivers/ulanding
drivers/vmount
modules/sensors
@@ -86,12 +71,13 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
# Testing
#
drivers/sf0x/sf0x_tests
drivers/distance_sensor/sf0x/sf0x_tests
drivers/test_ppm
lib/controllib/controllib_test
#lib/rc/rc_tests
@@ -119,6 +105,7 @@ set(config_module_list
#
modules/attitude_estimator_q
modules/ekf2
modules/landing_target_estimator
modules/local_position_estimator
modules/position_estimator_inav
@@ -156,23 +143,13 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
#
# OBC challenge
#
@@ -196,10 +173,6 @@ set(config_module_list
# 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
+14 -45
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@@ -8,35 +7,23 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/imu
drivers/airspeed
drivers/batt_smbus
drivers/blinkm
drivers/bma180
drivers/bmi055
drivers/bmi160
drivers/bmm150
drivers/bmp280
drivers/boards
drivers/bst
drivers/camera_trigger
drivers/device
drivers/ets_airspeed
drivers/frsky_telemetry
drivers/gps
drivers/hmc5883
drivers/hott
drivers/hott/hott_sensors
drivers/hott/hott_telemetry
drivers/iridiumsbd
drivers/irlock
drivers/led
drivers/lis3mdl
drivers/ll40ls
drivers/mb12xx
drivers/mkblctrl
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
drivers/oreoled
drivers/pca9685
drivers/pwm_input
@@ -44,16 +31,10 @@ set(config_module_list
drivers/px4flow
drivers/px4fmu
drivers/rgbled
drivers/sdp3x_airspeed
drivers/sf0x
drivers/sf1xx
drivers/snapdragon_rc_pwm
drivers/srf02
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/tap_esc
drivers/teraranger
drivers/vmount
modules/sensors
@@ -77,12 +58,13 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
# Testing
#
drivers/sf0x/sf0x_tests
drivers/distance_sensor/sf0x/sf0x_tests
drivers/test_ppm
#lib/rc/rc_tests
modules/commander/commander_tests
@@ -110,6 +92,7 @@ set(config_module_list
#
modules/attitude_estimator_q
modules/ekf2
modules/landing_target_estimator
modules/local_position_estimator
modules/position_estimator_inav
@@ -147,24 +130,14 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
#
# OBC challenge
#
@@ -188,10 +161,6 @@ set(config_module_list
# 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
@@ -202,4 +171,4 @@ set(config_module_list
# Hardware test
examples/hwtest
)
)
+18 -45
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
@@ -8,35 +7,27 @@ set(config_module_list
#
# Board support modules
#
drivers/distance_sensor
drivers/barometer
drivers/differential_pressure
drivers/magnetometer
drivers/telemetry
drivers/airspeed
drivers/batt_smbus
drivers/blinkm
drivers/bma180
drivers/bmi160
drivers/bmp280
drivers/imu/bma180
drivers/imu/bmi160
drivers/boards
drivers/bst
drivers/camera_trigger
drivers/device
drivers/ets_airspeed
drivers/frsky_telemetry
drivers/gps
drivers/hmc5883
drivers/hott
drivers/hott/hott_sensors
drivers/hott/hott_telemetry
drivers/iridiumsbd
drivers/l3gd20
drivers/irlock
drivers/imu/l3gd20
drivers/led
drivers/lis3mdl
drivers/ll40ls
drivers/lsm303d
drivers/mb12xx
drivers/mkblctrl
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/oreoled
drivers/pwm_input
drivers/pwm_out_sim
@@ -44,16 +35,10 @@ set(config_module_list
drivers/px4fmu
drivers/px4io
drivers/rgbled
drivers/sdp3x_airspeed
drivers/sf0x
drivers/sf1xx
drivers/snapdragon_rc_pwm
drivers/srf02
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/tap_esc
drivers/teraranger
drivers/vmount
modules/sensors
@@ -77,12 +62,13 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
# Testing
#
drivers/sf0x/sf0x_tests
drivers/distance_sensor/sf0x/sf0x_tests
drivers/test_ppm
#lib/rc/rc_tests
modules/commander/commander_tests
@@ -110,6 +96,7 @@ set(config_module_list
#
modules/attitude_estimator_q
modules/ekf2
modules/landing_target_estimator
modules/local_position_estimator
modules/position_estimator_inav
@@ -147,23 +134,13 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
#
# OBC challenge
#
@@ -187,10 +164,6 @@ set(config_module_list
# 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
@@ -201,4 +174,4 @@ set(config_module_list
# Hardware test
#examples/hwtest
)
)
+20 -46
View File
@@ -1,6 +1,5 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
set(config_uavcan_num_ifaces 2)
@@ -8,52 +7,39 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/airspeed
drivers/batt_smbus
drivers/blinkm
drivers/bma180
drivers/bmi055
drivers/bmi160
drivers/bmp280
drivers/imu/bma180
drivers/imu/bmi055
drivers/imu/bmi160
drivers/boards
drivers/bst
drivers/camera_trigger
drivers/device
drivers/ets_airspeed
drivers/frsky_telemetry
drivers/gps
drivers/hmc5883
drivers/hott
drivers/hott/hott_sensors
drivers/hott/hott_telemetry
drivers/iridiumsbd
drivers/ist8310
drivers/irlock
drivers/led
drivers/lis3mdl
drivers/ll40ls
drivers/mb12xx
drivers/mkblctrl
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/oreoled
drivers/pwm_input
drivers/pwm_out_sim
drivers/px4flow
drivers/px4fmu
drivers/px4io
drivers/rgbled
drivers/rgbled_pwm
drivers/sdp3x_airspeed
drivers/sf0x
drivers/sf1xx
drivers/snapdragon_rc_pwm
drivers/srf02
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/tap_esc
drivers/teraranger
drivers/vmount
modules/sensors
@@ -77,12 +63,13 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
# Testing
#
drivers/sf0x/sf0x_tests
drivers/distance_sensor/sf0x/sf0x_tests
drivers/test_ppm
#lib/rc/rc_tests
modules/commander/commander_tests
@@ -110,6 +97,7 @@ set(config_module_list
#
modules/attitude_estimator_q
modules/ekf2
modules/landing_target_estimator
modules/local_position_estimator
modules/position_estimator_inav
@@ -147,24 +135,14 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
#
# OBC challenge
#
@@ -188,10 +166,6 @@ set(config_module_list
# 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
@@ -202,4 +176,4 @@ set(config_module_list
# Hardware test
#examples/hwtest
)
)
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m3 CONFIG nsh)
@@ -8,5 +7,4 @@ set(config_module_list
lib/mixer
lib/rc
modules/px4iofirmware
platforms/common
)
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@@ -8,47 +7,35 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/imu/adis16448
drivers/airspeed
drivers/blinkm
drivers/bma180
drivers/bmi160
drivers/bmp280
drivers/imu/bma180
drivers/imu/bmi160
drivers/boards
drivers/bst
drivers/camera_trigger
drivers/device
drivers/ets_airspeed
drivers/frsky_telemetry
drivers/gps
drivers/hmc5883
drivers/hott
drivers/hott/hott_sensors
drivers/hott/hott_telemetry
drivers/led
drivers/lis3mdl
drivers/ll40ls
drivers/mb12xx
drivers/mkblctrl
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/oreoled
drivers/pwm_input
drivers/pwm_out_sim
drivers/px4flow
drivers/px4fmu
drivers/rgbled
drivers/sdp3x_airspeed
drivers/sf0x
drivers/snapdragon_rc_pwm
drivers/srf02
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/tap_esc
drivers/teraranger
modules/sensors
#
@@ -71,6 +58,7 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
@@ -90,6 +78,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@@ -125,21 +114,13 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@@ -159,10 +140,6 @@ set(config_module_list
# 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
+1 -10
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
add_definitions(
-DPARAM_NO_ORB
@@ -26,7 +25,7 @@ include(configs/uavcan_board_ident/s2740vc-v1)
# N.B. this would be uncommented when there is an APP
#px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
# BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/s2740vc-v1.bin
# BIN ${PX4_BINARY_DIR}/platforms/nuttx/s2740vc-v1.bin
# HWNAME ${uavcanblid_name}
# HW_MAJOR ${uavcanblid_hw_version_major}
# HW_MINOR ${uavcanblid_hw_version_minor}
@@ -61,12 +60,4 @@ set(config_module_list
modules/systemlib/param
modules/systemlib
lib/version
#
# Libraries
#
# had to add for cmake, not sure why wasn't in original config
platforms/nuttx
platforms/common
platforms/nuttx/px4_layer
)
+14 -23
View File
@@ -1,4 +1,3 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT tap_common)
@@ -8,24 +7,23 @@ set(config_module_list
#
# Board support modules
#
drivers/airspeed
drivers/boards
drivers/device
drivers/barometer
drivers/differential_pressure
drivers/gps
drivers/led
drivers/magnetometer/hmc5883
drivers/imu/mpu6000
drivers/px4fmu
drivers/rgbled_pwm
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/led
drivers/px4fmu
drivers/boards
drivers/rgbled_pwm
drivers/tap_esc
drivers/mpu6000
drivers/ms5611
drivers/hmc5883
drivers/gps
drivers/airspeed
drivers/ms4525_airspeed
drivers/ms5525_airspeed
modules/sensors
drivers/vmount
modules/sensors
#
# System commands
@@ -46,6 +44,7 @@ set(config_module_list
systemcmds/dumpfile
systemcmds/ver
systemcmds/topic_listener
systemcmds/tune_control
#
# General system control
@@ -92,19 +91,11 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
)
)
+1 -12
View File
@@ -1,4 +1,3 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
@@ -39,6 +38,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@@ -78,21 +78,10 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/version
#
# POSIX
#
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
)
set(config_df_driver_list
-5
View File
@@ -1,4 +1,3 @@
include(posix/px4_impl_posix)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
@@ -41,7 +40,6 @@ set(config_module_list
lib/controllib
lib/mathlib
lib/mathlib/math/filter
lib/ecl
lib/geo
lib/geo_lookup
@@ -49,9 +47,6 @@ set(config_module_list
lib/version
lib/DriverFramework/framework
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
modules/muorb/krait
)
-4
View File
@@ -1,4 +1,3 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
@@ -20,9 +19,6 @@ set(config_module_list
lib/DriverFramework/framework
platforms/posix/px4_layer
platforms/posix/work_queue
modules/muorb/krait
)

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