13054 Commits

Author SHA1 Message Date
Daniel Agar
ca33bb1c01
load_mon: slightly longer cpu average (300 -> 500 ms) 2020-07-28 13:41:50 -04:00
Matthias Grob
0b391fdcfc mc_att_control: add gradual3 function to cover hover thrust rescaling 2020-07-24 11:31:15 +02:00
Mirko Denecke
2581badabd Add ifdef to invert heater pin for px4 IO firmware. 2020-07-22 10:50:47 -04:00
Lorenz Meier
3b1be7dcd3 Revert "mavlink: GLOBAL_POSITION_INT send without lat/lon availability"
This reverts commit ad14796b5feb556aa9da8895e12b62b96105a31c.
2020-07-22 10:34:18 -04:00
Daniel Agar
e4f65f81f7
vtol_att_control: limit excessive scheduling
- this is to prevent vtol_att_control running at absurdly high rates (kilohertz) from every single actuator controls publication from both the multicopter and fixed wing controllers
 - I don't really like this solution, but it works for now until there are larger VTOL architectural changes in place
2020-07-21 11:40:04 -04:00
Daniel Agar
b8b19f6166
cdev: posix remove std::map usage
- this is to make things a little easier for platforms like QuRT (voxl snapdragon) where there are libstdc++ complications
2020-07-21 10:17:55 -04:00
Daniel Agar
81f57bccb6 px4io: servorail_status -> px4io_status and log all flags 2020-07-21 09:56:13 -04:00
xdwgood
7ecccf01c2 tailsitter.cpp:ensure input quaternions are exactly normalized 2020-07-21 08:21:41 +02:00
Daniel Agar
2adc23fd97
sensors/vehicle_imu: initially schedule conservatively
- this lowers the load immediately at boot while still allowing each VehicleIMU instance to properly measure the actual accel/gyro data rates
 - for lockstep builds this is ignored and VehicleIMU initially runs with every new sensor_accel/sensor_gyro publication
2020-07-20 10:05:11 -04:00
Matthias Grob
ed7732eaec rc_loss_alarm: remove unimplemented declaration 2020-07-20 09:36:47 -04:00
Daniel Agar
42493b3d59 logger: add full commander and safety logging by default
- increase battery_status rate to be useful
2020-07-17 17:27:15 -04:00
Daniel Agar
bdb4251fa4
fw_pos_control_l1: if using air data (baro) copy every cycle
- vehicle_air_data won't necessary have an update every iteration and these adjusted throttle values aren't stored
 - this only would have worked in the past because the vast majority of systems were using the ms5611 barometer with a publication rate that's faster than the controller
2020-07-17 17:14:45 -04:00
Daniel Agar
ad14796b5f mavlink: GLOBAL_POSITION_INT send without lat/lon availability
- the altitude and velocity portions of this message are still relevant
without GPS lat/lon
2020-07-17 10:46:06 -04:00
Julian Oes
9d97148ce8 commander: fix takeoff and land CI test
This fixes the takeoff and land CI test where we do a takeoff and land
without RC connected.

In my opinion it does not make sense to go into RC lost failsafe if
a datalink is still available.
Of course, this can be dangerous if someone has a companion computer
connected which gets detected as "data link" but actually has no
connection to the ground station.
2020-07-17 10:30:13 -04:00
Daniel Agar
9a1ca00285 fw_pos_control_l1: replace sensor_baro with vehicle_air_data
- controllers shouldn't be accessing raw sensor data directly
2020-07-17 09:42:19 -04:00
Daniel Agar
1394b5d7bc sensor_baro add separate timestamp_sample field
- the timestamp is uORB message publication metadata
2020-07-17 09:42:19 -04:00
Daniel Agar
19059a80bd sensors: throttle vehicle_air_data publication (SENS_BARO_RATE)
- don't bother running baro aggregator if SYS_HAS_BARO disabled
2020-07-17 09:42:19 -04:00
Daniel Agar
8020d6407f load_mon: remove obsolete rate comment in description 2020-07-16 15:11:53 -04:00
Daniel Agar
392eb123fc load_mon: split out header 2020-07-16 15:11:53 -04:00
Daniel Agar
fd66d42906 load_mon updates
- increase rate
 - cpu load calculation grab timestamp atomically
 - only check one task per cycle (but cycle at a higher rate)
 - decrease available FD threshold
 - minor cleanup
2020-07-16 15:11:53 -04:00
Matthias Grob
0d56035a46 FlightTaskAutoMapper: clarify influence of sticks 2020-07-16 19:01:22 +02:00
Oleg
b2af2f32d4 mavlink_ftp: close session without activity
10s inactivity timeout to close session
2020-07-16 14:49:44 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
Beat Küng
a3d1c94aa4 logger: reduce poll timeout to 20ms
Just to ensure even if the topic is not updated, logger will still update
regularly.
2020-06-23 11:53:55 -04:00