24183 Commits

Author SHA1 Message Date
Daniel Agar
61778511ea
lib/matrix: inline common Vector3f operators 2022-01-21 12:53:26 -05:00
Daniel Agar
56de0e27d8
PX4 ROS2 msg conformity and explicit topics
- .msg files are PascalCase
 - topics are still either per msg or explicitly listed in TOPICS
 - compatible structs are still generated (eg struct msg_s), but ROS2 style px4::msg::Msg is also available
2022-01-21 09:32:30 -05:00
Daniel Agar
7cb8ed3a1f sensors/vehicle_gps_position: don't work with 64 time with 32 bit floats 2022-01-21 09:18:49 -05:00
JaeyoungLim
0607982b23
Publish orbit status also when the waypoint is a loiter waypoint (#19048)
* Publish orbit status also when the waypoint is a loiter waypoint

* Remove redundant orbit status publishing
2022-01-21 09:13:03 +01:00
bresch
a2260e53da ekf2: replace yaw failure detection criteria
The existing logic using the angle between velocity vectors failed to
determine a yaw failure in practice because the state velocity is often
too small compared to its uncertainty to be used. In all the failures
reported, the yaw emergency estimator converged properly and yaw reset
would have fixed the issue.
A much simpler check using the yaw difference between the main EKF
and the emergency estimator is now used to tell if the vel/pos update
failure is most likely caused by a wrong heading.
2022-01-20 11:54:24 +01:00
Jaeyoung Lim
0dea56f88b Use current_sp for publishing orbit status 2022-01-19 12:00:03 -05:00
Jaeyoung-Lim
dec5e7e9c8 Publish orbit status whenever the vehicle is in loiter
This commit moves the publish orbit status to be published whenever the vehicle is considering a loiter setpoint
2022-01-19 12:00:03 -05:00
Thomas Stastny
19c98b8841 npfg: fix typo in Vector2f indexing 2022-01-19 11:17:44 -05:00
bresch
e89e3c1b0c ekf2: extract logic to test yaw emergency estimate quality 2022-01-19 09:05:41 -05:00
bresch
ea80c5027e ekf2: split yaw estimator state getter into several functions 2022-01-19 09:05:41 -05:00
dagar
476c1e5c09 [AUTO COMMIT] update change indication 2022-01-19 09:04:53 -05:00
bresch
ffebd8e771 ekf2: initialize cos tilt variable assuming no tilt 2022-01-19 09:04:53 -05:00
Daniel Agar
92a5bbe97f ekf2: improve ring buffer sizing and dynamically allocate 2022-01-19 09:04:53 -05:00
Daniel Agar
36605bfff6 sensors: lower SENS_MAG_RATE default
- reduce estimator 3D mag fusion cpu load (-3% on Pixhawk4)
2022-01-19 08:51:57 -05:00
Matthias Grob
c9f7c20d46 MulticoperPositionController: time failsafe messages together
The following output instead of printing the
action "stop and wait" just once:

WARN  [mc_pos_control] invalid setpoints
WARN  [mc_pos_control] invalid setpoints
WARN  [mc_pos_control] Failsafe: stop and wait
WARN  [mc_pos_control] invalid setpoints
WARN  [mc_pos_control] Failsafe: stop and wait
WARN  [mc_pos_control] invalid setpoints
WARN  [mc_pos_control] Failsafe: stop and wait
2022-01-19 14:31:19 +01:00
Matthias Grob
d4e356a1ac PosititionControl: fix integrator windup with invalid setpoint 2022-01-19 14:31:19 +01:00
Matthias Grob
8811482f1d PositionControlTest: add integrator windup with invalid setpoint combination unit test
This bug was by chance found during simulation testing and debugging.
The unit test is to easily reproduce and cover this case.
2022-01-19 14:31:19 +01:00
Silvan Fuhrer
632dfa55e6 FW Pos C: add option to disable airspeed setpoint via stick input
-rename FW_POSCTL_INV_ST to FW_POS_STK_CONF and make bitmask out of it:
  - bit 0: alternative mapping (height rate on throttle stick, airspeed on pitch)
  - bit 1: enable/disable airspeed setpoints via stick

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-19 10:13:07 +01:00
Silvan Fuhrer
cbb8c90245 ControlAllocation: fix calculation of roll/pitch normalization scale
Take into account the actual number of roll and pitch acutators,
instead of assuming that all actuators have a roll/pitch component.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-19 08:22:12 +01:00
Silvan Fuhrer
0950bb81ab ControlAllocation: update normalization scale only if matrix updated is forced
The forced flag is used to distinguish between updates due to a configuration
(parameter) change (only enabled when disarmed), and matrix updates due to motor
tilt change. Only update the normalization scale if the forced flag is true, and
use a tilt angle of vertical position for it to have the scales tilt-invariant.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-19 08:22:12 +01:00
CUAVmengxiao
258a563dd5 barometer: Add ICP10100 and ICP1011 2022-01-18 19:14:40 -05:00
Daniel Agar
dd6b7fa98f sensors: switch status PX4_INFO -> PX4_INFO_RAW 2022-01-18 15:00:18 -05:00
Daniel Agar
b1d2a0cc4e sensors: simplify timestamp data validator handling 2022-01-18 14:57:18 -05:00
bresch
953c90d3a6 failure detector: change imbalanced propeller metric
Use standard deviations instead of variances to get a linear metric
2022-01-18 12:24:35 -05:00
bresch
408cf011b2 failure detector: fix dt computation 2022-01-18 12:24:35 -05:00
Daniel Agar
548b7d5ece sensors/vehicle_imu: on calibration change don't resume in flight calibration learning immediately 2022-01-18 11:22:41 -05:00
Daniel Agar
ece09064c4 parameters: perform verification pass twice
- on NuttX with MTD storage this is to ensure we are verifying what's
actually stored on ramtron or eeprom, not just what's cached by bchlib
2022-01-18 09:47:28 -05:00
alexklimaj
cdb6a437a0 Fix UAVCAN beep not started 2022-01-17 21:49:53 -05:00
PX4 BuildBot
0bb9cce1ce Update submodule mavlink to latest Tue Jan 18 00:39:07 UTC 2022
- mavlink in PX4/Firmware (37e04f56da3916dcb518eeba66b0888db1cd8c32): 75204adad2
    - mavlink current upstream: 3d8092006e
    - Changes: 75204adad2...3d8092006e

    3d809200 2022-01-14 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_INFORMATION - mark as reserved capability (#1775)
68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
2022-01-17 21:36:02 -05:00
Daniel Agar
2fb82789fe lib/wind_estimator: pass q_att as const reference 2022-01-17 16:59:28 -05:00
Silvan Fuhrer
0ce44cebb7 WindEstimator: use vehicle heading instead of ground course for initialisation
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-14 17:42:01 -05:00
Silvan Fuhrer
1a4b2b37bb AirspeedValidator: remove unused variable _tas_gate
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-14 17:42:01 -05:00
Thomas Stastny
13c36155ce fw_pos_ctrl: allow npfg to operate without wind estimate, dont switch controllers 2022-01-14 22:05:53 +01:00
Thomas Stastny
082e320191 integrate optional NPFG library for wind-aware fixed-wing guidance 2022-01-14 22:05:53 +01:00
Beat Küng
66cbbf9f2e control_allocator: use 'bidirectional' to clarify reversible motors 2022-01-14 12:18:29 -05:00
Beat Küng
9ca58f5e97 actuator outputs: always add reverse range param
and remove the possibility to set min > max to reverse.

Initially the idea was to add the checkbox on the UI side, to avoid adding
another param, but I don't think I'll go through the extra effort on the
QGC side.
2022-01-14 12:18:29 -05:00
Daniel Agar
98a9748bb8 drivers/dshot: use uORB::PublicationMulti for ORB_ID(esc_status)
- there can be multiple different outupt modules publishing esc_status (eg dshot & uavcan)
2022-01-14 12:17:49 -05:00
Daniel Agar
81ecd130fc uavcan: ESC publish esc_status in callback instead of timer
- this ensures every ESC status gets published with minimal latency
 - also prevents publishing ORB_ID(esc_status) when there's no actual
data (bug)
2022-01-14 12:17:49 -05:00
Roman Bapst
dc6067ed12 Update src/modules/fw_att_control/fw_att_control_params.c
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-14 16:34:44 +03:00
RomanBapst
34bb671a73 improve parameter descriptions for fw maximum/minimum roll/pitch angles
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-01-14 16:34:44 +03:00
RomanBapst
555ee371e8 FixedWingPositionControl: consistently use the same roll and pitch angle
limits for autonomous and semi-autonomous modes (altitude & position control)

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-01-14 16:34:44 +03:00
Thomas Stastny
f8c2ee73db handle line segment termination in navigator
- if following line segment (fixed-wing position control) switch waypoint when in acceptance radius OR passed the second waypoint. this handles the case of being beyond the second waypoint but not within the acceptance radius without the need to fly back to the waypoint (e.g. after a loiter up to waypoint alt)
- sync navigator and fw pos ctrl waypoint acceptance altitude
2022-01-13 13:43:02 +01:00
Claudio Micheli
8a01135a93 Commander: more changes to use events with escs and battery failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Claudio Micheli
d122513197 extend support for Battery status message
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Daniel Agar
bb1177d504 sensor_calibration: refactor and centralize calibration slot logic
- centralize logic for selecting a preferred calibration slot
   - automatically use existing calibration slot if it exists, otherwise
find first available slot, with a preference for a requested index
 - existing commander calibration methods rewrite all calibration slots
to match current sensor ordering
2022-01-12 16:16:26 -05:00
alexklimaj
d1304e1ceb Add CANNODE_GPS_RTCM 2022-01-12 15:30:38 -05:00
Silvan Fuhrer
3cd1e0ce19 MCLandDetector: clean up logic for ground effect
Before: in_ground_effect was always true with the default settings (LNDMC_ALT_GND =-1)
 and when a distance sensor was present with valid data.
Now: default of LNDMC_ALT_GND is set to 2m by default, and if set to a negative value
then in_ground_effect is never set to true

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-12 18:41:16 +01:00
Matthias Grob
443406ea2b FlightTaskAuto: use longerThan() when possible in vector calculations 2022-01-12 15:12:24 +01:00
bresch
4fc7348582 mpc: leave room for altitude error control during descent and descent
Since the same parameter is used to generate the trajectory and to
saturate the controller, there is no additional space for the output of
the position controller once it is filled with the feedforward, letting
the altitude grow uncontrolled.
2022-01-12 13:33:48 +01:00
bresch
ea7d2334c9 mpc: add parameter for ascent/descent speed in auto modes 2022-01-12 13:33:48 +01:00