Commit Graph

21282 Commits

Author SHA1 Message Date
Ricardo Marques
d0c74712b5 Fix comment typo in mavlink_receiver.cpp 2020-07-15 10:47:52 -04:00
Daniel Agar
d791c8baad mavlink: mission manager fix signed sequence debug print type 2020-07-14 12:47:57 -04:00
Matthias Grob
1e56eed2aa Remove FlightTaskManual from the inheritance structure 2020-07-14 18:07:09 +02:00
Matthias Grob
9daff24e79 FlightTasks: move stick handling into library 2020-07-14 18:07:09 +02:00
Pandacoolcool
49a543e1b2 systemcmds/tests: Ignore unused but set parameter warnings 2020-07-14 10:05:55 -04:00
Daniel Agar
fa44cd5cd5 px4_work_queue: rename navigation_and_controllers -> nav_and_controllers
- keep the thread within the current NuttX max length
2020-07-14 09:48:47 -04:00
Matthias Grob
624d8a58e9 FlightTaskOrbit: correct acceleration feed-forward
The acceleration setpoint gets implicitly inherited from the altitude
flight task since #14212. This feed-forward adds an unwanted
acceleration when the right stick is deflected. Instead I'm using it
to command the expected centripetal acceleration when flying
in a circle for better orbit tracking.
2020-07-14 09:02:38 +02:00
David Jablonski
589aff7e0d Orbit: Add RC controlled yaw mode
For the RC controlled yaw behaviour, we do a yaw setpoint according to
the stick expo. The uncontrolled yaw behaviour behaves undefined.
Switching between yaw behaviours makes the drone stand still for a
moment, which probably can be improved.
2020-07-13 20:26:13 +02:00
David Jablonski
21f2e9b654 Orbit: Adjust yaw setpoint on circle approach 2020-07-13 20:26:13 +02:00
David Jablonski
037c6f592f Orbit: add more yaw behaviours 2020-07-13 20:26:13 +02:00
Matthias Grob
40883a06cf Commader: save 53 unnecessary characters of output string 2020-07-13 10:34:17 -04:00
daniele
f01195c13f make kill switch engaged a warning only if the vehicle is flying 2020-07-13 10:34:17 -04:00
daniele
be043d24a0 commander: rephrase or change message importance for some errors/warnings that happen often 2020-07-13 10:34:17 -04:00
Daniel Agar
aec1b9243a systemcmds/tests: microbench hrt run both regular and atomic hrt_elapsed_time 2020-07-10 10:59:50 -04:00
Daniel Agar
6bdcca6a85 systemcmds/tests: add simple atomic microbenchmark 2020-07-10 10:59:50 -04:00
George Anderson
94326a29bb FW attitude control scaling fixes and cleanup (#15256)
* FW attitude control scaling fixes and cleanup

This commit aligns the scaling better with the derivations in
https://dev.px4.io/master/en/flight_stack/controller_diagrams.html#airspeed-scaling

Integrator terms now scale with IAS^2 (all three axes)

To match the roll and pitch controllers:
- Yaw integrator scale is now applied during accumulation, not to
  integral value (so now FW_YR_IMAX is respected more intuitively)
- Yaw FF term now scale with IAS instead of IAS^2

Also made a number of small changes to make the three files
  (roll, pitch, yaw) 3-way diffable to be clearer about what the
  differences among them are.

* Remove unused yaw coordination method

- "Coordination method" open vs. closed code removed, since closed
  is never used and not actually implemented.
- No change to behavior

* Remove PX4_WARN messages

Co-authored-by: george <george@campsix.com>
2020-07-10 15:54:39 +02:00
RomanBapst
f792cc7b6b publish battery_dangerous message if battery level is dangerous
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-07-10 09:37:23 -04:00
Daniel Agar
e2ad1bbc91 bmi055: accel periodically read temperature 2020-07-09 18:03:29 -04:00
JaeyoungLim
fa0ca7e65c Update mavlink with cellular status message fixes
This Commit includes a update of the mavlink submodule

since the CELLULAR_STATUS message was updated, the necessary changes were done together
Add enums
2020-07-09 15:12:02 -04:00
Silvan Fuhrer
57cbf212be PreFlightchecks: remove duplicated VTOL mode prearm check
This removes the check for the current position of the VTOL swtich, as arming is already prevented if in transition mode,
plus also if VTOL and in fixed-wing mode (unless CBRK_VTOL_ARMING is set).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-07-09 10:41:43 -04:00
Roman Dvořák
f70b3046e9 mavlink: publish RAW_RPM 2020-07-09 10:35:16 -04:00
Thomas Stauber
6d1ce57362 Add Land as Geofence Action 2020-07-09 10:32:10 -04:00
Daniel Agar
f3d923f226 sensors: VehicleIMU improve scheduling
- schedule on interval multiple of sensor_gyro publications without increasing the configured integration rate
 - IMU_INTEG_RATE add enums to guide appropriate selection
 - add average calculation bounds to prevent incorrect calculation and force monitoring again if there are consecutive gaps in data
2020-07-09 10:29:04 -04:00
Daniel Agar
fa8ba09f50 drivers/imu/bosch/bmi055: remove interrupt latch
- the latch would actually cause more problems if the backup schedule hit
 - this reduces the number of cycles where the FIFO is actually empty at max rate (when there's only 1 sample in the FIFO expected)
2020-07-09 10:15:33 -04:00
Daniel Agar
194029d010 drivers/imu: Invensense & Bosch remove transfer perf counters
- we already have nearly equivalent data in every sensor publication with the (publication) timestamp and timestamp_sample
2020-07-09 10:12:37 -04:00
Daniel Agar
6bc1af7680 sensors/vehicle_air_data: only publish primary if error free
- cleanup failover related messaging
 - store previous failover count to prevent unecessary checks
 - check for parameter update initially to minimize work after fetching
fresh sensor data
2020-07-09 10:11:23 -04:00
Daniel Agar
6d52772d30 sensors/vehicle_air_data: move to sensors namespace
- move params to end of class
2020-07-09 10:11:23 -04:00
Beat Küng
405cb5038d sdp3x: introduce State enum
to avoid blocking the work queue during configuring.
2020-07-08 11:43:21 -04:00
Beat Küng
fc1be6e0b1 sdp3x: add '-k' option to keep retrying even if probing fails
we have a setup where the sensor is connected via magnets, so the system
could boot without sensor initially attached.
2020-07-08 11:43:21 -04:00
Beat Küng
3cc394e6c7 sdp3x: improve robustness, try to reconfigure on transfer error 2020-07-08 11:43:21 -04:00
Daniel Agar
96a6b5c914 load_mon: decrease warning threshold for stack check builds
- enabling stack check increases stack usage and will assert if there's
any overflow
2020-07-06 11:13:15 -04:00
Beat Küng
2bcc2f4ccc mag params: add missing mag rotations according to rotation.h 2020-07-06 10:16:17 -04:00
Beat Küng
795b9e938e drivers: add ST LPS33HW baro driver
Note: only tested on I2C
2020-07-06 10:13:11 -04:00
Matthias Grob
03735f12a2 FlightTask: correct activate() doxygen comment 2020-07-04 12:29:10 +02:00
Thomas Stauber
3702c8b481 [VTOL] impose minimum transition duration
* VT_F_TR_OL_TM would silently reduce VT_TRANS_MIN_TM when VT_F_TR_OL_TM was smaller
2020-07-03 13:19:02 -04:00
Daniel Agar
d3157f4266 sensors/vehicle_acceleration: apply calibration before filtering 2020-07-02 12:35:17 -04:00
Claudio Micheli
743898d574 Commander: failure detector, automatically disarm on a ESC failure
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-07-01 08:55:54 +02:00
Claudio Micheli
a7f2f2908b Commander: make optional tilt-check after takeoff (failure detector).
- Introduced COM_LKDOWN_TKO parameter
    - Introduced auto disarm for lockdown state
    - Do not trigger flight termiantion if system is in lockdown

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-07-01 08:55:54 +02:00
Claudio Micheli
6358dd400a failure detector: added esc failures detection
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-07-01 08:55:54 +02:00
PX4 BuildBot
19d2de0726 Update submodule matrix to latest Tue Jun 30 14:40:13 UTC 2020
- matrix in PX4/Firmware (a1043f6ce068cc4d039d6808ef98fd8c3f379582): f529358e9a
    - matrix current upstream: 9a30828a0a
    - Changes: f529358e9a...9a30828a0a

    9a30828 2020-06-30 Julian Kent - Add explicit matrix + scalar test
f3cf615 2020-06-30 Julian Kent - Do += -= and scalar *= /= in place
2020-06-30 11:11:45 -04:00
PX4 BuildBot
38588f0c37 Update submodule ecl to latest Tue Jun 30 00:38:47 UTC 2020
- ecl in PX4/Firmware (bd4d3f2b9929271b2616d2e1d6952059a7e8bc72): e4b44f704b
    - ecl current upstream: 5356077a32
    - Changes: e4b44f704b...5356077a32

    5356077 2020-06-21 kamilritz - Make flow_innov/-var a matrix Vector2f
c2801eb 2020-06-21 kamilritz - Add const modifier and increase matrix library usage
d9afc2f 2020-06-21 kamilritz - Remove repeated division by same value
d16b43a 2020-06-21 kamilritz - Get rid of non functional piece of code
c3653e6 2020-06-21 kamilritz - Add const modifier
48f0eb1 2020-06-21 kamilritz - Remove uninformative comments
4a69b41 2020-06-21 kamilritz - Increase matrix library usage even more
630be60 2020-06-21 kamilritz - Increase matrix library usage
22274b1 2020-06-21 kamilritz - Add const modifier
61c139e 2020-06-21 kamilritz - Remove unused variable
afd4f3f 2020-06-21 kamilritz - Fix typo
a3706fd 2020-06-21 kamilritz - Make relative wind computation more compact
b8f9376 2020-06-21 kamilritz - Make mag_innov/-var a Matrix::Vector3f
0ea7cd8 2020-06-25 Kamil Ritz - Attempt to fix CI firmware build test
2927132 2020-06-25 Daniel Agar - clang-format set BreakBeforeBraces to Linux style
b96c62e 2020-06-25 sevenbill - Optionalized build dependency on git
794e6ec 2020-06-25 Bill Morris - Enforce tabs via editorcofig
2020-06-29 21:50:55 -04:00
dominiknatter
d8831c5133 ekf2: Ignore optical flow samples with too large integration time spans. Fixes #14165
Within ekf2, optical flow messages (amongst others) are fused to the state estimates. It might occur that optical flow sensors report unreliable and unrealistic spikes. In that case, the state estimator went crazy so far and just ignored optical flow values from that moment on.

The common thread for all these spikes seems to be a too high integration time span. Therefore, this fix adds a simple logic that ignores unrealistically high integration time spans. As a threshold, 1 second was chosen.

Reported-by: Dominik Natter <dominik.natter@gmail.com>
2020-06-29 12:00:29 -04:00
Beat Küng
0c4fd2bfa0 param: also show unused params for 'param show -c'
I find this generally useful for debugging.
2020-06-29 09:49:56 -04:00
Beat Küng
d22bbde7c5 logger: fix hardfault for invalid SDLOG_PROFILE setting
If some bits are set but no topic was added, _subscriptions was null but
later accessed.

During normal use this only happens when switching between different
firmware versions with different SDLOG_PROFILE definition (with custom
config).
2020-06-29 09:49:56 -04:00
PX4 BuildBot
b463a2f0d5 Update submodule matrix to latest Sun Jun 28 12:38:27 UTC 2020
- matrix in PX4/Firmware (2337b7e2f7b4eecddbb9103ab7672fac2c741fc5): 674bd99f3b
    - matrix current upstream: f529358e9a
    - Changes: 674bd99f3b...f529358e9a

    f529358 2020-06-27 kamilritz - Add missing const modifier
2020-06-28 19:55:06 -04:00
bresch
1761ef3952 FlightTaskAuto: Update prev and next waypoint depending on validity
This fixes the corner case where a NAV_DELAY command changes the
validity of the next WP but not the rest of the triplet. The logic in
FlightTask was ignoring this change because the check was only based on
WP position change.
2020-06-26 09:48:22 -04:00
RomanBapst
120f188ada rtl: do not use cone logic for vehicle flying as fixed wing
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-06-25 09:17:23 -04:00
Daniel Agar
55808ed2f9 simulator: break out standalone battery simulator module
- this is a small step towards unifying SITL & HITL
2020-06-24 10:39:21 -04:00
PX4 BuildBot
6dd0932158 Update submodule ecl to latest Wed Jun 24 00:39:40 UTC 2020
- ecl in PX4/Firmware (fff83fdee69789ec9da259b564bbfe67585a4b5f): a8bb8ea99f
    - ecl current upstream: e4b44f704b
    - Changes: a8bb8ea99f...e4b44f704b

    e4b44f7 2020-06-23 PX4 BuildBot - Update geo_lookup WMM  to latest Tue Jun 23 14:15:04 UTC 2020
4b746a3 2020-06-23 bresch - GPS Yaw: add consts and remove fusion starting message
2bafe9d 2020-06-22 bresch - GPS Yaw: wait to fuse at yaw at least once before declaring it faulty
51cd63d 2020-06-22 bresch - GPS Yaw: fall back to other yaw aiding source in case of bad data
fe2a9d3 2020-06-22 bresch - GPS Yaw: move isfinite checks in control.cpp
3c6790f 2020-06-22 bresch - GPS Yaw: Always reset Yaw when GPS Yaw fusion is starting
ff8b5ec 2020-06-21 kamilritz - Extract general functions into utils
fda30d8 2020-06-15 Daniel Agar - geo_lookup: expand latitude to +-80 degrees
109eca5 2020-06-15 Daniel Agar - geo_lookup: create simple python script to update tables
41b9e4f 2020-06-15 Daniel Agar - geo_lookup: move tables to separate file
2020-06-24 08:29:20 +02:00
Beat Küng
fe9a971f0e logger: use subscription interval also in polling mode
Now that replay uses lockstep scheduling we don't need that work-around
anymore.
2020-06-23 11:53:55 -04:00