Commit Graph

41388 Commits

Author SHA1 Message Date
Daniel Agar b400b7fcc4
vehicle_angular_velocity: ESC RPM notch filters minimize filter resets (#20449)
- vehicle_angular_velocity: ESC RPM notch filters minimize filter resets
 - only allow one filter init per axis per cycle
 - "park" ESC notch filters at min frequency instead of full disable
 - relax timeout before a notch filter is disabled
 - add new parameter IMU_GYRO_DNF_MIN for configuring the minimum notch filter frequency
2022-10-20 09:05:23 -04:00
bresch 89bc28e836 wind_est: extract utility functions to separate file 2022-10-20 11:41:46 +02:00
bresch 2549054b28 wind_est: remove old derivation
replaced by derivation.py
2022-10-20 11:41:46 +02:00
bresch 7115d5643c wind_est: auto-generate initialization of state and cov matrix 2022-10-20 11:41:46 +02:00
bresch a7124d3738 wind_est: auto-generate beta fusion using Symforce 2022-10-20 11:41:46 +02:00
bresch 487b84e90b wind_est: place codegen details in function 2022-10-20 11:41:46 +02:00
Daniel Agar fe80e7aa46
commander: respect COM_CPU_MAX for overload and adjust default threshold 2022-10-19 20:25:06 -04:00
Daniel Agar 309465858a
commander: elapsed time checks avoid subtracting unsigned integers
- avoid the possibility of unsigned underflow from subtracting two HRT timestamps (uint64_t)
 - most of these aren't problematic, but people tend to replicate the pattern, so it's better to be safe
 - likely wasn't a problem when people were using hrt_absolute_time() in place, but if using an existing timestamp there's the possibility it's older than a more recent topic update
2022-10-19 20:21:36 -04:00
Daniel Agar cea185268e
msg ROS2 compatibility, microdds_client improvements (timesync, reduced code size, added topics, etc), fastrtps purge
- update all msgs to be directly compatible with ROS2
 - microdds_client improvements
   - timesync
   - reduced code size
   - add to most default builds if we can afford it
   - lots of other little changes
 - purge fastrtps (I tried to save this multiple times, but kept hitting roadblocks)
2022-10-19 19:36:47 -04:00
Daniel Agar e211e0ca0e commander: limit some estimator checks to prearm 2022-10-19 19:06:56 -04:00
David Sidrane f60b883041 px4_fmu-v6:Add Revision 1 to manifest to note I2C4 is only internal 2022-10-19 15:48:34 -04:00
Daniel Agar f9509b442c
ekf2: height aid source consistency (#20405)
- working towards keeping all height source (baro/ev/gnss/rng) handling as consistent as possible, possibly refactoring these out into separate classes later
2022-10-19 15:35:07 -04:00
Matthias Grob 870229ef49 FunctionsTest: add isFinite() tests with Vector3f arguments 2022-10-19 19:09:20 +02:00
Matthias Grob 5ca28dd6dc Use isAllFinite() in all places that check finiteness on entire vectors or matrices 2022-10-19 19:09:20 +02:00
Matthias Grob 93de9567a5 Matrix: add isAllFinite() to check if every element is finite 2022-10-19 19:09:20 +02:00
bresch f77d7d9413 [AUTO COMMIT] update change indication 2022-10-19 17:34:31 +02:00
bresch cf9859965a ekf2: remove old yaw fusion auto-code 2022-10-19 17:34:31 +02:00
bresch e33215b61c ekf2_test: compare yaw fusion sympy vs symforce 2022-10-19 17:34:31 +02:00
bresch 42f683fa64 ekf2_test: test using positive definite covariance matrix
A covariance matrix needs to be positive definite
2022-10-19 17:34:31 +02:00
bresch 10f9ac148f ekf2: migrate mag yaw fusion to SymForce 2022-10-19 17:34:31 +02:00
bresch a41b6f416e ekf2_test: verify heading innov variance in all orientations 2022-10-19 17:34:31 +02:00
bresch f11908a266 ekf2: generate yaw fusion jacobians using symforce 2022-10-19 17:34:31 +02:00
Peter van der Perk ccd90ede7a
Added io_bypass_control daemon to control IO directly from uORB useful RTPS full offboard (#20422) 2022-10-19 09:15:12 -04:00
Silvan Fuhrer aade01776a airspeed selector: only do sideslip fusion (for airspeed less wind estimate) if not landed
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-19 10:35:28 +02:00
Silvan Fuhrer ebc883f157 airspeed selector: remove redundant armed check (it already checks for in_air)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-19 10:35:28 +02:00
Silvan Fuhrer 0c4b2cd0c5 airspeed_selector: update wind estimator (w/o airspeed fusion) always if in FW mode
This fixes a bug where by accident the vtol_status was considered instead of the
vehicle_status, preventing it from running on planes.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-19 10:35:28 +02:00
Jaeyoung Lim 7e49147bcf Fix feedforward acceleration setpoints for fixedwing offboard position
This commit fixes feedforward acceleration setpoints for fixedwing offboard position control.

Previously when acceleration feedforward inputs were sent, negative curvature accelerations were not being computed properly
2022-10-19 09:15:13 +02:00
Daniel Agar b71fc63162 ekf2: fix sideslip timeout (typo) 2022-10-18 18:38:25 -04:00
Daniel Agar 0d2ff6e224 ekf2: test ekf_logger further reduce std::precision to minimize false positives 2022-10-18 14:19:16 -04:00
Daniel Agar 535415a537 ekf2: add OF estimator aid src status 2022-10-18 14:19:16 -04:00
Matthias Grob 75c63aee2a Fix confusion between trajectory_setpoint and vehicle_local_postion_setpoint 2022-10-17 16:18:00 -04:00
Daniel Agar 7c237fca74 boards: px4_sitl use Mavlink development dialect 2022-10-17 16:16:36 -04:00
Daniel Agar 743200df22 mavlink: move mavlink dialect selection to kconfig 2022-10-17 16:16:36 -04:00
Daniel Agar d792a3ff5b simulator_mavlink: use existing development/common mavlink generation if available 2022-10-17 16:16:36 -04:00
Hamish Willee 2a9801f191 Default mavlink dialect should be common.xml 2022-10-17 16:16:36 -04:00
bresch 8b9ac2d7f3 ekf2: remove old mag 3D fusion auto-code 2022-10-17 16:14:56 -04:00
bresch 77a36219c6 ekf2_test: compare 3D mag fusion sympy vs symforce 2022-10-17 16:14:56 -04:00
bresch b92cbe12a0 ekf2: migrate mag 3D fusion to symforce
ekf2: merge mag 3d innov var, Hx and Kx computation to reduce flash

Slightly less code produced, almost no performance change

ekf2_mag3D: do not pre-compute Kalman gains

The vector of Kalaman gains is not too expensive to compute using
matrix-vector multiplication. Pre-generating it using CSE takes a lot of
flash space for little benefit.
2022-10-17 16:14:56 -04:00
Silvan Fuhrer 5ea8c6e507 FlightTaskAuto: remove unused _getTargetVelocityXY()
Inclusive velocity_valid field in position_setpoint message that's then
no longer needed.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 16:12:15 -04:00
Silvan Fuhrer 42c613a0c7 position_setpoint.msg: remove unused alt_valid
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 16:12:15 -04:00
Silvan Fuhrer 42dd9b5063 position_setpoint.msg: remove unused velocity_frame field
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 16:12:15 -04:00
Daniel Agar 0d6766d14d limit vehicle_command subscription updates per cycle
- this is a precaution to eliminate the possibility of getting stuck in
a loop trying to keep up with a high rate publication that could be
coming from a higher priority task
2022-10-17 16:10:51 -04:00
Daniel Agar 677f3e9294
sensors/vehicle_optical_flow: limit gyro updates and generation lost error per cycle
- in the worst case scenario printing the error message can take longer than the next gyro publication, so combined with an infinite loop you could get stuck here
2022-10-17 13:45:04 -04:00
Alex Klimaj 8545164869
sensors/vehicle_optical_flow: only get gyro if optical flow delta angle not available (#20416) 2022-10-17 10:23:36 -04:00
Daniel Agar 116bb6049f
ekf2: fusion helper consistency
- yaw fusion use measurementUpdate()
 - fuseVelPosHeight() respect _accel_bias_inhibit (like measurementUpdate())
2022-10-17 10:17:31 -04:00
Silvan Fuhrer 7bc90c7f00 FW rate controller gains: put default for all IMAX gains to 0.4
The previous default for yaw and roll was 0.2, which is very low, and for wheel was
1, which is very high. A value of 0.4 makes sense to me for all axes.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 10:27:09 +02:00
Silvan Fuhrer 4bbe8f3c0d FW rate controller gains: open up some limitis for the rate controller gains
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 10:27:09 +02:00
Silvan Fuhrer e2d1e79614 FW rate controller gains: reduce max FW_YR_I from 50 to 1
I guess this was a left over from times where the controller had a completely different structure,
a value of 50 is well outside of reasonable range (50x the default).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 10:27:09 +02:00
Silvan Fuhrer ea44c89366 FW rate controller gains: reduce max FF gains to 1
The previous max of 10 for the FF gains seems a bit very high for me, well outside
of reasonable reange.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-17 10:27:09 +02:00
bresch 458e5a6b0e ekf2: update change indicator 2022-10-14 11:42:23 -04:00