Commit Graph

16111 Commits

Author SHA1 Message Date
Daniel Agar 1ae467e9cd ekf2: estimator aid source status (starting with fake position) 2022-05-23 16:21:49 -04:00
Igor Misic 79a34b5aed px4iofirmware: fix for bug introduced with #19558 2022-05-23 14:59:11 -04:00
bresch c57c575cfe ekf2: use explicit flags instead of bitmask position
This prevents bitmask mismatch when a new flag is inserted
2022-05-23 14:43:02 -04:00
Serhat Aksun bc220ddb82 sensors/vehicle_magnetometer: fix multi_mode check
Signed-off-by: Serhat Aksun <serhat.aksun@maxwell-innovations.com>
2022-05-23 10:09:41 -04:00
Igor Misic 12a81979a8 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-05-23 06:54:37 +02:00
Igor Misic 08dcc72e1f commander/safety: replace safety.msg with Safety class (#19558) 2022-05-23 06:54:37 +02:00
bresch 00e88a02c0 baro bias: improve innovation sequence monitoring
The baro observation noise parameter is often over-estimated in order as
a measure to mitigate temporary offsets in the readings due to wind
gusts or poor pressure compensation tuning. The side effect is that the
innovation sequence monitoring based on normalized innovation struggles
to detect an offset in the state because the innovation isn't
statistically significant.
To counter this issue, a simpler check is added to trigger the process
noise boost when the innovation has the same sign for a long period of
time.
2022-05-21 22:37:04 +02:00
Daniel Agar db4545e442 Update world_magnetic_model to latest Sat May 21 11:14:10 UTC 2022 2022-05-21 14:57:55 -04:00
mcsauder 6b0788ff46 Standardize variable naming and formatting across vehicle attitude controller files. 2022-05-21 12:22:18 -04:00
Daniel Agar c40631c136 commander: handle RC loss timeout if manual_control_setpoint stops publishing (#19680)
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-05-20 19:37:30 -04:00
Julian Oes 33a77c225c commander: lockdown is not termination
We use lockdown to prevent outputs like motors and servos from being
active in HITL simulation. This means that we can't treat the lockdown
flag as a flight_terminated, otherwise we can't arm in HITL at all.
2022-05-20 09:43:32 -04:00
Nicolas MARTIN a0cb7f6258 HITL: undefined time_remaining_s should be NAN 2022-05-20 09:38:43 -04:00
Nico van Duijn 04071b9456 Commander: ignore MAV_CMD_REQUEST_MSG
This commit adds the MAV_CMD_REQUEST_MESSAGE to the list of vehicle
commands which are ignored without generating a warning sound.
2022-05-20 15:36:42 +02:00
Matthias Grob 38e027ee45 ArmStateMachine: remove dependency on armed.armed
To have the internal state as single source of truth
for the arming state within Commander.
2022-05-20 13:51:51 +02:00
Matthias Grob 37c485ce89 ArmStateMachine: move arm state into the class 2022-05-20 13:51:51 +02:00
Matthias Grob 47532ca07b ArmStateMachine: replace state name array with method 2022-05-20 13:51:51 +02:00
Matthias Grob 887fe7dba2 commander_params: shorten low battery action delay
I got multiple times the feedback now that a consistent delay
is helpful and makes sense but the default delay
is too long
for low battery action where you're trying to come back in time
and possibly the emergency reaction kicks in while the critical action
is executing which leads to a longer accumulated delay.
2022-05-19 21:54:09 +02:00
Daniel Agar fd4b62032e commander: publish actuator_armed first on any change 2022-05-19 12:47:50 -04:00
PX4 BuildBot 9518b65f93 Update submodule mavlink to latest Thu May 19 00:38:59 UTC 2022
- mavlink in PX4/Firmware (87c73145b36a835b1635de0498a5613a7af5cafc): https://github.com/mavlink/mavlink/commit/a1cb2c0e71f191f04da3d92d92db8702a7e91ff6
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/99e82cad70494903a23a67de08ff9cbb5918d8f3
    - Changes: https://github.com/mavlink/mavlink/compare/a1cb2c0e71f191f04da3d92d92db8702a7e91ff6...99e82cad70494903a23a67de08ff9cbb5918d8f3

    99e82cad 2022-05-19 Hamish Willee - Deprecated GPS_INJECT_DATA (#1842)
bf3df03d 2022-05-16 Hamish Willee - WIND_COV - accuracy units are m/s (#1844)
a73d4864 2022-05-11 Hamish Willee - development.xml FIGURE_EIGHT_EXECUTION_STATUS - add a note about it being set at lower rate (#1841)
2022-05-18 21:41:08 -04:00
mcsauder e8da98fd14 Add gyro clipping to mirror accel clipping monitoring instances. 2022-05-18 21:16:05 -04:00
mcsauder ea10eacb99 Replace EKF/common.h #defines with enums. 2022-05-18 09:25:19 -04:00
Silvan Fuhrer 8f2c84d36f VTOL paras: add min of 0.1 to transition times
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Silvan Fuhrer c29ca6c959 tailsitter: guard against division by 0
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Silvan Fuhrer 3cf07e1be5 VTOL: rename params _PTCH to _PITCH
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Silvan Fuhrer 7c5f0121a5 VTOL: remove some unsued variables
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Silvan Fuhrer 2b7efeacca vtol_vehicle_status: replace several status bools by single vehicle_vtol_state
Replace vtol_in_rw_mode, vtol_in_trans_mode, in_transition_to_fw by vehicle_vtol_state.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Silvan Fuhrer 635f64a2e5 Commander: remove permanent stabilization option for fixed-wing flight
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Silvan Fuhrer d8444df11c Set tailsitter flag via vehicle status
Removes the necessity of including vtol_type.h in other modules.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Silvan Fuhrer 7292ce483c VTOL: move to cpp params API
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-18 10:01:04 +02:00
Matthias Grob 02e11eddce mavlink_mission: add more specific information to the error message 2022-05-17 07:49:00 +02:00
Junwoo Hwang 146f0cafe0 Add get*Expo() functions to the Sticks library
To return Exponential Values, which is helpful for reducing the
sensitivity of the stick around the centered value (0), since it's
exponential curve.

Useful for user adjustment implementations, where accidentally touching the stick
wouldn't have so much effect when using the Exponential value, compared
to using the raw position value.
2022-05-16 23:55:05 +02:00
Matthias Grob 4bd2d4cf35 rc_update: add unit tests for mode slot
To verify RC mode switch and mode button functionality works as expected.
2022-05-16 14:37:29 +02:00
Matthias Grob b67fbac296 uuv_pos_control: siplify passing on trajectory position setpoint 2022-05-12 17:19:48 +02:00
Matthias Grob 200124f094 mavlink_receiver: check entire Vectors for NAN
Note: Behavioral change Inf also results in the flag being true.
2022-05-12 17:19:48 +02:00
Matthias Grob 8ca28f3796 Separate message for trajectory setpoint 2022-05-12 17:19:48 +02:00
Beat Küng 0f860045f7 failure_detector: add failure injector class for motor telemetry
This allows to test motor failures via 'failure motor off -i 1' on a real
system.
2022-05-12 07:58:56 +02:00
Alessandro Simovic 4640f395d7 simulator_mavlink: Add ESC telemetry 2022-05-12 07:58:56 +02:00
Alessandro Simovic 20ccfbb719 control_allocator: remove failed motor from effectiveness
- limit to handling only 1 motor failure
- Log which motor failures are handled
- Remove motor from effectiveness matrix without
  recomputing the scale / normalization
2022-05-12 07:58:56 +02:00
Alessandro Simovic fb71e7587c failure_detector: add motor/ESC failure detection 2022-05-12 07:58:56 +02:00
Daniel Agar c772e5230f commander: remove compile time dependencies on non-commander parameters
- this allows builds with mavlink fully disabled
 - move commander MAN_ARM_GESTURE, RC_MAP_ARM_SW, MC_AIRMODE checks to manual_control
2022-05-11 10:14:23 -04:00
Beat Küng 8d36ba6727 log_writer_file: fix corner case when mission log is enabled
Normally _should_run for mission is only ever true if _should_run for the
normal log is. There are exceptions though:
- the log buffer fails to allocate
- there was a write failure (e.g. due to SD card removal)
In that situation, the writer would not wait anymore but busy-loop.
2022-05-11 10:06:35 -04:00
Beat Küng ebbe08bc86 log_writer_file: protect access to _should_run, use px4::atomicbool for _exit_thread 2022-05-11 10:06:35 -04:00
Silvan Fuhrer 866f9fa95b Control Allocation: add option to disable yaw by differential thrust
This replaces the propeller_torque_disabled flag to disable yaw by differential thrust
for tiltrotor and tailsitter VTOLs, as propeller_torque_disabled is not enough to set
effectiveness of an acutator in the yaw axis to 0 in case it's tilted.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-11 10:19:37 +02:00
Silvan Fuhrer 46179586fb Control Allocation: Tiltrotor: pass only thrust magnitude instead of 3D thrust to allocator
Special case tiltrotor: instead of passing a 3D thrust vector (that would mostly have a x-component in FW, and z in
MC), pass the vector magnitude as z-component, plus the collective tilt. Passing 3D thrust plus tilt is not feasible as they
can't be allocated independently, and with the current controller it's not possible to have collective tilt calculated
by the allocator directly.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-11 10:19:37 +02:00
PX4 BuildBot 4b7b7dfa8d Update submodule mavlink to latest Tue May 10 12:39:00 UTC 2022
- mavlink in PX4/Firmware (d6dff7daa984514185a8f31f6e653a69a278ded8): https://github.com/mavlink/mavlink/commit/3b52eac09c2e37325e4bc49cd2667ea37bf1d7d2
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/a1cb2c0e71f191f04da3d92d92db8702a7e91ff6
    - Changes: https://github.com/mavlink/mavlink/compare/3b52eac09c2e37325e4bc49cd2667ea37bf1d7d2...a1cb2c0e71f191f04da3d92d92db8702a7e91ff6

    a1cb2c0e 2022-05-05 KonradRudin - Figure eight MAV_CMD (#1831)
0ebdf846 2022-04-28 Hamish Willee - common.xml: Deprecate MAV_CMD_GET_MESSAGE_INTERVAL for MAV_CMD_REQUEST_MESSAGE. (#1835)
f357fc78 2022-04-27 Hamish Willee - Deprecate MAV_CMD_GET_HOME_POSITION for MAV_CMD_REQUEST_MESSAGE (#1834)
2022-05-10 11:37:55 -04:00
Konrad 0e464a91be Remove contradicting geofence parameter description
The flight termination action on geofence violation is described as only trigger, when the corresponding circuit breaker is not disabled. However, the description of the circuit breaker states, that the geofence action is not depedning on this circuit breaker. The implementation follows the description of the circuit breaker. Hence the GF_ACTION description is adapted.
2022-05-10 09:01:12 +02:00
Beat Küng 5cdb6fbd8e control_allocator: add helicopter mixer
Same logic as the existing mixer.
Untested.
2022-05-10 08:57:39 +02:00
Beat Küng 32402f31df control_allocator: increase max num motors to 12 2022-05-10 08:57:39 +02:00
Beat Küng 9f5c5591a2 ActuatorEffectivenessRotors: fix motor count check
Check during init to avoid out-of-bound access.
2022-05-10 08:57:39 +02:00
Silvan Fuhrer 5d6c8c986d Commander: high wind speed handling updates
- add logic for detecting high wind speed in Commander,
and handle it toghether with wind speed warning
- trigger and enforce RTL if COM_WIND_MAX is breached

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-09 19:09:40 +02:00