25604 Commits

Author SHA1 Message Date
Matthias Grob
aa575d6af0 Commander: move first preflight check run to constructor 2022-06-16 10:25:32 -04:00
Matthias Grob
0f41a5e385 ArmStateMachine: simplify how preflight checks are called 2022-06-16 10:25:32 -04:00
Igor Mišić
7c1da8d608 driver/px4io: set default failsafe values 2022-06-16 08:09:00 +02:00
Igor Mišić
04c2d0fe97 drivers/pwm_out: set default failsafe values 2022-06-16 08:09:00 +02:00
Daniel Agar
1980b5c5e8
ekf2: setEkfGlobalOrigin() reset baro and hgt sensor offsets if necessary
- handle uninitalized _gps_alt_ref
 - add basic lat/lon/alt sanity checks
2022-06-16 00:59:54 -04:00
Matthias Grob
c59809b14a Commander: remove system_sensors_initialized
and system_hotplug_timeout. They're not in use for over 2 years.
Instead control LED with preflight checks.
2022-06-15 14:02:00 -04:00
Igor Mišić
0922f003f5 uavcan: don't print an error if there is no UAVCAN device on the CAN bus 2022-06-15 03:29:13 -04:00
bresch
680191cc75 WindEstimator: make wind process noise tuning same as EKF2 2022-06-14 18:44:30 +10:00
bresch
b6f1a7aed9 migrate wind process noise parameters 2022-06-14 18:39:10 +10:00
bresch
0d256b8ff6 ekf2 wind: use noise spectral density for process noise tuning
The noise spectral density, NSD, (square root of power spectral density) is a
continuous-time parameter that makes the tuning independent from the EKF
prediction rate.
NSD corresponds to the rate at which the state uncertainty increases
when no measurements are fused into the filter.
Given that the current prediction rate of EKF2 is 100Hz, the
same tuning is obtained by dividing the std_dev legacy parameter by 10:
nsd = sqrt(std_dev^2 / 100Hz)
2022-06-14 18:39:10 +10:00
bresch
e105869986 wind_estimator: use noise spectral density for process noise tuning
The noise spectral density, NSD, (square root of power spectral density) is a
continuous-time parameter that makes the tuning independent from the EKF
prediction rate.
NSD corresponds to the rate at which the state uncertainty increases
when no measurements are fused into the filter.
Given that the current prediction rate of the wind estimator is 1Hz, the
same tuning is obtained with the same values as before.
2022-06-14 18:39:10 +10:00
Junwoo Hwang
377338109c uLog message definition comment improvements
- Added more comments
- Converted to DOxygen comment format for the comments on struct members
2022-06-13 10:31:07 +02:00
Junwoo Hwang
1ddd1573be Improve uLog message struct definitions
1. Rename *_header_s structs to *_s, since the _header postfix is not
helpful
2. Rename the "key" string variables in the message structs to
"key_value_str" as the string actually contains not just the key but the
key and value pair information
3. Add comments on other uLog messages to clarify use (need more
improvement / can be even more simplified)
2022-06-13 10:31:07 +02:00
fury1895
283aad01fd Airspeed params: change default for ASPD_SCALE_APPLY to 2 2022-06-10 14:02:41 +02:00
PX4 BuildBot
e33199c182 Update submodule mavlink to latest Fri Jun 10 00:38:25 UTC 2022
- mavlink in PX4/Firmware (59630bcc7e7e983db2d9138c8254144c77855adc): 0909631552
    - mavlink current upstream: 05864e218e
    - Changes: 0909631552...05864e218e

    05864e21 2022-06-09 Peter Barker - common.xml: add ignition_voltage to EFI_STATUS (#1854)
adc9c3f5 2022-06-01 olliw42 - update storm32.xml (nfc) (#1851)
49dbdb66 2022-06-01 Randy Mackay - ardupilotmega: add nav_attitude_time command (#1852)
2022-06-10 01:01:20 -04:00
Thomas Debrunner
46c9d1e288
SIH in SITL with lockstep (#19028)
* sih: Move sih out of work queue
This reverts commit bb7dd0cf0016ac1998a79814ec52b15079a74c1a.

* sih-sim: Enable sih in sitl, together with lockstep

* sih-sim: new files for sih: quadx and airplane

* sih: Added tailsitter for sih-sitl simulation

* sitl_target: Added seperate target loop for sih

* jmavsim_run: Allow jmavsim to run in UDP mode

* lockstep: Post semaphore on last lockstep component removed

* sih-sim: Added display for effectively achieved speed

* sih: increase stack size

* sih-sim: Improved sleep time computation, fixes bug of running too fast

* sitl_target: place omnicopter in alphabethic order

Co-authored-by: romain-chiap <romain.chiap@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-06-09 09:52:34 +02:00
Thomas Stastny
a7e11464c1 fw pos ctrl: update method documentation 2022-06-09 09:23:02 +02:00
Thomas Stastny
594a6d6e80 fw pos ctrl: some incremental clean up of the class
- documentation of units, params, returns, and descriptions for variables and methods
- rename ambiguous or erroneous state variables
- remove unused or unecessary input arguments to functions
- remove ugly header white space
2022-06-09 09:23:02 +02:00
Silvan Fuhrer
9863c24b40 navigator_main: DO_REPOSITION: only trigger reposition setpoint update if vehicle is armed
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-06-08 21:47:06 +02:00
Thomas Stastny
cbf0fe8803 fw pos ctrl: centralize parameter and state resets 2022-06-08 08:44:30 -05:00
Thomas Stastny
ccfbbb553a fw pos ctrl: only manipulate heading hold yaw in manual position control mode 2022-06-08 08:44:30 -05:00
Thomas Stastny
67d8dd359d fw pos ctrl: calculate control interval once
- Use the same time interval for all position control logic (including TECS)
- Sync naming in control methods
- Remove some unused input arguments
2022-06-08 08:44:30 -05:00
Matthias Grob
f5e7b1e6a8 Commander: switch battery bitflied to dedicated datatype 2022-06-08 11:32:26 +02:00
Matthias Grob
9b2166de72 manual_control_params: configure arm gesture doesn't require reboot
I added wrong documentation here.
2022-06-08 05:12:05 -04:00
Matthias Grob
bd50a52c9c Commander: fix startup sound interrupted by safety button initialization
The safetyButtonHandler() reports that the safety statatus
changed on the first loop iteration when safety is disabled which makes
sense to inform the system that safety is off but the tune for the user
should not be played because it interrupts the startup tune.
2022-06-08 05:12:05 -04:00
Matthias Grob
71103e6114 Safety: keep initialized constant flags when safety disabled 2022-06-08 05:12:05 -04:00
Matthias Grob
44c4b8fa85 Style refactoring related to safety button 2022-06-08 05:12:05 -04:00
Daniel Agar
ce70b6f4ac sensors/vehicle_angular_velocity: add IMU_GYRO_RATEMAX constraints 2022-06-07 15:45:47 -04:00
Daniel Agar
01f0992f49 sensors/vehicle_imu: don't bother checking IMU_GYRO_RATEMAX 2022-06-07 15:45:47 -04:00
Matthias Grob
5df266cedc MulticopterRateControl: use constructor to copy thrust setpoint array 2022-06-07 11:45:59 -04:00
bresch
4f1091792f ekf2 preflight: only check innovation of active height sources 2022-06-07 11:44:56 -04:00
Daniel Agar
cb2738e187
Update submodule GPSDrivers to latest Sat Jun 4 12:38:49 UTC 2022 (#19766)
- GPSDrivers in PX4/Firmware (6e77a084cd43830c8b13018b7fd5470da9bc4ff5): 181fae1a4b
    - GPSDrivers current upstream: 016c37cd1f
    - Changes: 181fae1a4b...016c37cd1f

    016c37c 2022-06-01 Julian Oes - sbf: fix overrun on invalid length
2022-06-04 15:58:56 -04:00
PX4BuildBot
a247b42907 [AUTO COMMIT] update change indication 2022-06-04 15:57:11 -04:00
PX4 BuildBot
e86a74321e Update world_magnetic_model to latest Sat Jun 4 11:14:10 UTC 2022 2022-06-04 15:57:11 -04:00
Beat Küng
d1142008f6 FailureDetector: check if ESCs have current
And increase the timeout to 300ms, as some ESCs only update with 10Hz.
2022-06-04 07:40:29 +02:00
Beat Küng
56faaae959 failure: fix invalid memory access
failure_units[unit].key was incorrect
2022-06-04 07:40:29 +02:00
Beat Küng
0ab61aee2e control_allocator: show motor axis for MC (as advanced) 2022-06-04 07:40:29 +02:00
Beat Küng
99a329f937 mc_rate_control: pass through 3D thrust 2022-06-04 07:40:29 +02:00
Beat Küng
82eb71d70b failure_detector: allow disabling attitude failure (as already documented) 2022-06-04 07:40:29 +02:00
bresch
e2955bdd61 terrain est: clear innovation/var/test ration when aiding stops 2022-06-03 17:31:14 -04:00
Matthias Grob
fad3d46907 Use signNoZero() where possible 2022-06-03 16:08:16 +02:00
BA-ED
b9be783b69
dshot: corrected DShot motor spin direction command
Some ESCs don't store DShot_cmd_spin_direction_reversed persistently
2022-06-02 13:36:40 +02:00
Mark Sauder
c19e74784a
attitude_estimator_q: Run() method refactoring (#19526)
* Refactor attitude_estimator_q_main.cpp Run() method by breaking apart into separate method calls:
    * update_vehicle_local_position()
    * update_motion_capture_odometry()
    * update_visual_odometry()
    * update_magnetometer()
    * update_vehicle_attitude()
    * update_sensors()
 * Rename init_attitude_q()
 * Standardize whitespace formatting
 * Add remaining c++ style initializers.
2022-06-01 13:41:42 -04:00
Daniel Agar
21b1c933dc ekf2: EKFGSF_yaw delete unnecessary internal state 2022-06-01 13:16:06 -04:00
Daniel Agar
3889b79342 ekf2: yaw estimator add yaw_composite_valid boolean 2022-06-01 13:16:06 -04:00
Igor Mišić
a218f4bfaf drivers/px4io: support legacy px4io firmware to enter BL 2022-06-01 13:15:13 -04:00
Igor Mišić
25488da944 px4io: replace safety_off state with safety button event (#19558)
internal PX4IO safety_off state is removed and replaced with a normal safety button event. From this 'commit' commander is taking care of the PX4IO safety.
2022-06-01 13:15:13 -04:00
Matthias Grob
a9cdfff7a3 FlightModeManager: only execute flight task commands when multicopter 2022-06-01 15:14:07 +02:00
Matthias Grob
96b0304049 PreFlightCheck: disallow arming in land mode
after the automatic switch to Hold mode was introduced.
2022-06-01 12:08:32 +12:00
Matthias Grob
83c15fca9f Commander: switch back to Hold mode after autonomous landing 2022-06-01 12:08:32 +12:00