24090 Commits

Author SHA1 Message Date
bresch
57fa9c545a PosControl: fix hover update equation
The integrator now absorbs properly the change in hover thrust
2022-01-08 15:42:10 +01:00
Daniel Agar
6c97700eaa move sensor calibration parameters to yaml 2022-01-07 19:00:41 -05:00
Matthias Grob
bbad4a5397 FlightTaskAuto: Respect altitude with offtrack state
To avoid weird cases where the altitude is different enough and
the offtrack state flies to the target altitude instead of the closest
point on the track between the waypoints.
2022-01-07 10:30:39 -05:00
Daniel Agar
c17a9e8003 sensors/vehicle_imu: refactor SensorCalibrationUpdate() to separate accel/gyro cal saving 2022-01-07 09:40:51 -05:00
Daniel Agar
aec97e0020 sensors: minor IMU bias saving updates
- sensors/vehicle_imu: reset learned cal on any calibration change
during parameter update
 - sensors/vehicle_imu: cleanup logic estimated bias -> calibration offset
saving
   - don't invalidate saved calibration (the point is to keep the last valid)
   - remove old debug code, etc
 - sensors/vehicle_imu: notify parameter changes if accel or gyro
calibration has changed
 - lib/sensor_calibration: add calibrated() and calibration_index()
getters, keep Accelerometer/Gyroscope/Magnetometer in sync
2022-01-07 09:40:51 -05:00
Silvan Fuhrer
5d7ddf5734 FW Pos Control: use SlewRate library for airspeed setpoint
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-07 09:39:10 -05:00
Daniel Agar
30ccfdb2ed
sensors/vehicle_magnetomeer: fix copyright year 2022-01-06 20:27:56 -05:00
Julian Oes
952cfe2fd7 ekf2: fix uninitalized memory warning
The imu and sensor_combined data should not be used when it has not been
updated yet, otherwise this triggers a memory sanitizer warning:

Conditional jump or move depends on uninitialised value(s)
   at 0x2DA7AA: __sanitizer_cov_trace_const_cmp1 (in build/px4_sitl_default-clang/bin/px4)
   by 0x3C4E79: EKF2::Run() (src/modules/ekf2/EKF2.cpp:401)
   by 0x6EB881: px4::WorkQueue::Run() (platforms/common/px4_work_queue/WorkQueue.cpp:187)
   by 0x6ECB9D: px4::WorkQueueRunner(void*) (platforms/common/px4_work_queue/WorkQueueManager.cpp:230)
   by 0x4C07258: start_thread (in /usr/lib/libpthread-2.33.so)
   by 0x4D415E2: clone (in /usr/lib/libc-2.33.so)

Conditional jump or move depends on uninitialised value(s)
   at 0x3C4E7C: EKF2::Run() (src/modules/ekf2/EKF2.cpp:401)
   by 0x6EB881: px4::WorkQueue::Run() (platforms/common/px4_work_queue/WorkQueue.cpp:187)
   by 0x6ECB9D: px4::WorkQueueRunner(void*) (platforms/common/px4_work_queue/WorkQueueManager.cpp:230)
   by 0x4C07258: start_thread (in /usr/lib/libpthread-2.33.so)
   by 0x4D415E2: clone (in /usr/lib/libc-2.33.so)
2022-01-05 16:20:06 -05:00
Silvan Fuhrer
0a82025faf FW Position Control: some airspeed setpoint handling adaptions
- introuce slew rate limiting of airspeed setpoint (with slew rate of 1 m/s/s)
- some refactoring and clean up

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-05 17:06:41 +01:00
Silvan Fuhrer
20a1e5f77c FW Position Control: simplify underspeed disabling logic for tecs
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-05 17:06:41 +01:00
Matthias Grob
bbb04ab4b8 Remove relaying of maximum altitude through land detector 2022-01-05 14:54:59 +01:00
Julian Oes
2445fa8b4c commander: prevent uninitialized warning
This prevents a memory sanitizer/valgrind warning:

Conditional jump or move depends on uninitialised value(s)
   at 0x2DA536: __sanitizer_cov_trace_cmp4 (in build/px4_sitl_default-clang/bin/px4)
   by 0x6590D8: FailureDetector::update(vehicle_status_s const&, vehicle_control_mode_s const&) (src/modules/commander/failure_detector/FailureDetector.cpp:76) by 0x3817DF: Commander::run() (src/modules/commander/Commander.cpp:2605)
   by 0x38B10B: ModuleBase<Commander>::run_trampoline(int, char**) (platforms/common/include/px4_platform_common/module.h:180)
2022-01-05 10:53:51 +01:00
Daniel Agar
170849c8f8 ekf2: expand accel bias stability criteria 2022-01-04 13:57:49 -05:00
PX4 BuildBot
846f807eff Update submodule mavlink to latest Tue Jan 4 12:39:05 UTC 2022
- mavlink in PX4/Firmware (a8c88f1c98212e72a266fec8a9e7c0da2a14f3af): 4bc0de9c38
    - mavlink current upstream: 75204adad2
    - Changes: 4bc0de9c38...75204adad2

    75204ada 2022-01-04 Hamish Willee - Add ability to specify axis to autotune (#1759)
2022-01-04 09:32:43 -05:00
bresch
d094fbbd70 ekf2: fix delta angle coning metric 2022-01-04 09:28:48 -05:00
PX4BuildBot
6fbc0e95d0 [AUTO COMMIT] update change indication 2022-01-04 09:12:45 -05:00
PX4 BuildBot
a89f21d566 Update world_magnetic_model to latest Tue Jan 4 11:14:11 UTC 2022 2022-01-04 09:12:45 -05:00
Daniel Agar
9d1558af25 ekf2: selector use status timestamp for timeout rather than timestamp_sample (delayed time horizon)
- update stale checks for publication to use hrt elapsed time from
timestamp sample
2022-01-03 09:20:44 -05:00
Daniel Agar
333edfe12f ekf2: use delayed IMU timestamp for publication's timestamp_sample 2022-01-03 09:20:44 -05:00
Daniel Agar
35502c249d ekf2: don't use Vectors for height innovations (baro, rng, etc) 2022-01-03 09:20:20 -05:00
Jaeyoung-Lim
bdec85fdd0 Disable local vehicle setpoints while in transition
This commit adds disabling vehicle setpoints while in transition
2022-01-03 11:09:06 +01:00
Jaeyoung-Lim
4127dfa791 Log vehicle local position setpoints
This commit enables the local position setpoints to be logged by publishing vehicle_local_position_setpoint
2022-01-03 11:09:06 +01:00
Jaeyoung Lim
52418f13b0 Use groundspeed for navigate heading 2022-01-03 10:52:34 +01:00
Jaeyoung-Lim
e66e82228f Add support for offboard velocity setpoints for fixedwing vehicles
This commit adds a velocity controller which the setpoint can be passed using offboard setpoints
2022-01-03 10:52:34 +01:00
Daniel Agar
673d4544d1 parameters: verify param backup after export 2022-01-02 10:46:34 -05:00
Daniel Agar
8e26b33009 tinybson: file write error add more detail 2022-01-02 10:46:34 -05:00
Daniel Agar
80ef6e19df tinybson: explicitly append int32 or int64 2022-01-02 10:46:34 -05:00
Daniel Agar
9cbb5c9920 parameters: fix export shutdown locking
- in NuttX bchlib keeps a sector sized buffer that might not be written
out to RAMTRON until the file is closed
2022-01-02 10:46:34 -05:00
Daniel Agar
e9283d90cc systemcmds/netman: fix code style 2022-01-01 18:40:47 -05:00
David Sidrane
db159a43cc test_dataman:Set SEM_PRIO_NONE on all semaphores 2021-12-31 10:27:24 -05:00
Daniel Agar
1b6700592b parameters: require valid BSON document size 2021-12-30 16:36:23 -05:00
PX4 BuildBot
5fc7e551ab Update submodule mavlink to latest Wed Dec 29 12:38:13 UTC 2021
- mavlink in PX4/Firmware (395eeb440a2ca7503591f872d4f733fcd9867218): bfaf605bd6
    - mavlink current upstream: 4bc0de9c38
    - Changes: bfaf605bd6...4bc0de9c38

    4bc0de9c 2021-12-27 olliw42 - Component Information Basics: add camera cap flag (#1752)
8035ad4d 2021-12-27 Hamish Willee - GIMBAL_DEVICE_FLAGS_NEUTRAL - note that this can be any angle (#1758)
2021-12-29 17:16:49 -05:00
Daniel Agar
990d7c159d pwm_out: cleanup and prep for linux compatibility 2021-12-28 11:04:00 -05:00
FengShun
8f8719d33b cmake: use add_definitions instead of add_compile_definitions
Using make tests in docker will fail, because the current basic image used by px4io/px4-dev-simulation-bionic is ubuntu18.04, the default version of cmake is 3.10, and the add_compile_definitions command is only available in cmake 3.12+(ubuntu 20.04).
2021-12-27 12:19:31 -05:00
honglang
17a99bc827 mavlink: add HYGROMETER_SENSOR stream 2021-12-27 12:13:09 -05:00
honglang
983867f9af uavcan: support uavcan hygrometer 2021-12-27 12:13:09 -05:00
Daniel Agar
236794235a parameters: export empty BSON document even if there are no parameters to save
- otherwise a 'param reset_all' won't be saved until a parameter is changed
2021-12-27 09:17:00 -05:00
Daniel Agar
33d7b42040 parameters: import quietly retry if there's no data (as a precuation) 2021-12-27 09:17:00 -05:00
Daniel Agar
20d3e6f4e1 parameters: add simple BSON verification pass after export 2021-12-27 09:17:00 -05:00
Beat Küng
72065c3d71 fix protocol_splitter: remove timeout, drop buffer if too full instead
The existing implementation had a flaw: when the buffer was getting full,
mavlink started to busy-loop, as the uart has data (poll returns immediately)
but no new data was read from the uart due to the buffer being full.
As rtps is running at lower prio, it never got the chance to read again,
making the problem even worse.
After 1s the timeout triggered and the buffer was cleared, so it recovered.

Instead of allowing for CPU spikes, we now immediately clear the buffer
(only as much as we have to), ensuring that new data is read from the uart.
2021-12-24 20:28:43 -05:00
Rui Miguel Carvalho
542ee86bc9
landing_target_estimator: custom irlock frame params (#18884)
Signed-off-by: ruimscarvalho98 <ruimsc98@gmail.com>
2021-12-24 20:20:35 -05:00
Silvan Fuhrer
28e01c3510 FW Position controller: make loiter switching logic robust against pos_sp with loiter_rad=0
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:17:15 -05:00
Beat Küng
d202bf9631 control_allocator: add scope to reduce stack usage by 256B 2021-12-24 20:06:13 -05:00
Silvan Fuhrer
48be55dec8 Tiltrotor: disable tilt/thrust compensation when dynamic allocation is enabled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Silvan Fuhrer
31d7328f4d Tailsitter: invert roll (make it NED-correct) for filling vehicle_torque_setpoint
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Silvan Fuhrer
1ad66e606b ControlAllocation: introduce convention for control surface deflection sign
- horizontal control surfaces: up=positive deflection
- vertical control surfaces (rudder): right=positive deflection
- mixed (V-Tail): up=positive deflection

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Beat Küng
5259877b1b control_allocator: update matrix normalization
- only normalize rpy for MC matrices
- for thrust use the 3D vector, so it works for FW and tilt rotors as well

This keeps MC unchanged.
2021-12-24 20:06:13 -05:00
Silvan Fuhrer
460a0df850 tiltrotor: fill out thrust_setpoint[0] also in hover, based on tilt and hover thrust
In the tiltrotor case, beside an F_z thrust setpoint also a F_x setpoint must be passed
to the allocator as the matrix has non-zero thrust-x effectiveness when tilts are applied.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00
Beat Küng
09200b994d airship_att_control: publish thrust + torque setpoint 2021-12-24 20:06:13 -05:00
Silvan Fuhrer
478724c9fe EffectivenessTiltrotor: fix logic for matrix update
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-24 20:06:13 -05:00