25604 Commits

Author SHA1 Message Date
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
Daniel Agar
ff16131874 icm42670p run at full speed 2022-05-17 08:14:22 -07:00
Daniel Agar
83daf648ef drivers/imu/invensense/icm42670p: cleanup and small fixes 2022-05-17 08:14:22 -07: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
Beat Küng
32df76ca8a dshot: handle DSHOT_MIN for reversible outputs
Also ensures there's no deadband if dead_l == dead_h (the default).
2022-05-13 14:04:01 -04: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
9166b6953d output drivers: init SmartLock after exit_and_cleanup
This fixes an invalid memory access when exiting the module:
exit_and_cleanup destroys the object, but lock_guard is destructed after
and accesses the lock.
2022-05-12 08:16:35 -04: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
Beat Küng
dfd934fbdb esc_report: add actuator_function 2022-05-12 07:58:56 +02:00
Hamish Willee
aab2feb8f5
pwm.cpp: remove the test example (#19587) 2022-05-12 07:56:13 +02:00
alexklimaj
0f69f8ced8 Fix uavcan battery causing immediate RTL time remaining low 2022-05-11 21:48:12 -04:00
Daniel Agar
fba7c972d1
drivers/rc_input: ensure RC inversion is disabled initially and latch RC_INPUT_PROTO conservatively
- this allows jumping straight to a non-SBUS RC protocol
 - increased the scan time per protocol 300->500 ms, which the newer DSM parser seems to need in some cases.
 - only set RC_INPUT_PROTO if we've had a successful RC lock for > 3 seconds
2022-05-11 14:30:41 -04: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
Peter van der Perk
0053aeec97 Cyphal restore O1Heap statistics 2022-05-11 09:49:18 -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
Daniel Agar
45e3fad3e0
Update submodule GPSDrivers to latest Tue May 10 12:38:49 UTC 2022
- GPSDrivers in PX4/Firmware (3ac8fdbe2901dcd812c8e1944f72765ddff4c022): 6534b050ee
    - GPSDrivers current upstream: 58968922b7
    - Changes: 6534b050ee...58968922b7

    5896892 2022-04-26 Seppe Geuens - sbf: add heading support (#100)

Co-authored-by: PX4 BuildBot <bot@px4.io>
2022-05-10 11:38:52 -04:00
PX4 BuildBot
4b7b7dfa8d Update submodule mavlink to latest Tue May 10 12:39:00 UTC 2022
- mavlink in PX4/Firmware (d6dff7daa984514185a8f31f6e653a69a278ded8): 3b52eac09c
    - mavlink current upstream: a1cb2c0e71
    - Changes: 3b52eac09c...a1cb2c0e71

    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
Peter van der Perk
b1ad4e8864 Upgrade libcanard to 3.0 and rename uavcan_v1 to cyphal
Did some prep work for redundant interfaces by introducing CanardHandle class to decouple physical interfaces from cyphal.cpp
2022-05-10 09:46:18 -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
Silvan Fuhrer
1aad82f87d Commander: add max flight time RTL
Adds COM_FLT_TIME_MAX param and logic in Commander to enforce RTL when
flight time is above this value. User can only override to LAND mode,
but not proceed flight beyond that.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-09 19:09:40 +02:00
Igor Mišić
ce4e9f6690
uavcan: use timer 6 by default on stm32f7 2022-05-06 19:45:53 -04:00
Thomas Stastny
90789be68f fw pos ctrl: turn back to takeoff point with npfg 2022-05-06 16:36:03 +02:00
Thomas Stastny
3ef5f433b5 fw pos ctrl: add missing guidance control interval setting to control_manual_position() 2022-05-06 16:36:03 +02:00
Thomas Stastny
1ab9fb22ee fw pos ctrl: fix state switching logic for takeoff and landing 2022-05-06 16:36:03 +02:00
Matthias Grob
b3776134b8 Commander: ensure diconnected battery is cleared from bit field 2022-05-06 10:32:27 -04:00
Beat Küng
113982e3e7 commander: fix incorrect return in set_link_loss_nav_state()
If both local position and altitude were not valid, then both RC loss and
datalink loss would not trigger any failsafe at all, independently from
the configured action.
2022-05-06 10:14:13 -04:00
Matthias Grob
843c814fb8 MulticopterPositionControl: allow offboard takeoff also when not landed 2022-05-06 04:12:18 -07:00
Matthias Grob
fbc109436f MultiCopterRateControl: refactor setpoint naming 2022-05-06 04:12:18 -07:00
Matthias Grob
1211a457d7 MulticopterPositionControl: Overwrite vertical acceleration during takeoff rampup only 2022-05-06 04:12:18 -07:00
Matthias Grob
d9a2fe5226 Revert "MCPosControl: fix invalid setpoint race condition"
This reverts commit e7a2c1d88e1bad6c07805aa52c7500d18dbe84d8.
2022-05-06 04:12:18 -07:00
mcsauder
2a66be4899 Colocate struct stateSample with other instances of *Sample structs. 2022-05-05 18:41:50 -04:00
mcsauder
a0d9687409 Add c++ style initializers where missing in EKF/common.cpp, standardize tab/space indentation, align comments and format whitespace. 2022-05-05 18:41:50 -04:00