24614 Commits

Author SHA1 Message Date
Daniel Agar
8166a500ac
Update world_magnetic_model to latest Mon Apr 11 11:14:11 UTC 2022 (#19475) 2022-04-12 10:11:51 -04:00
Daniel Agar
bb2ea574aa ekf2: properly reset IMU biases on calibration change (non-multi-EKF)
- this was working in the multi-EKF case using vehicle_imu, but missing
in sensor_combined
2022-04-11 12:23:55 -04:00
Daniel Agar
04f37222f8 ekf2: fix IMU missed perf count when not using multi-EKF 2022-04-10 11:07:33 -04:00
PX4 BuildBot
f2c5d70d3a Update submodule mavlink to latest Sun Apr 10 12:39:00 UTC 2022
- mavlink in PX4/Firmware (a1530591764f0c694560e4bb6ae41c15d3e35c9b): 0133e5db7f
    - mavlink current upstream: 56a5110d38
    - Changes: 0133e5db7f...56a5110d38

    56a5110d 2022-04-09 Tom Pittenger - Add radius to DO_REPOSITION (#1825)
3b5959bd 2022-04-07 Thomas Debrunner - Option to not reset non-configurable params in preflight storage (#1826)
2022-04-10 10:21:14 -04:00
Silvan Fuhrer
c7023e5879 Increase NAV_LOITER_RAD and RTL_LOITER_RAD to 80m each
For many VTOLs/fixed-wing drones a 50m loiter radius is too tight, and
going to 80m is a better and safer default.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-04-09 14:31:17 -04:00
Nicolas MARTIN
eb1bb4335b
commander: fix enable_failsafe reason (#19391)
- In this case, no action is configured for datalink lost. Action is configured for RC lost.
 - In case of no data link and no rc failsafe is enabled but reporting a "no_datalink" reason but "no_rc_and_no_datalink" seems more explicit.
2022-04-09 14:30:49 -04:00
Daniel Agar
091fca701e
px4io: input_rc only publish new successful decodes
- previously an invalid decode would continue to be transferred to the FMU (at 50 Hz) and published to the rest of the system as successfully decoded new RC data
 - by only publishing new successful decodes we can more effectively discard invalid data in downstream consumers
2022-04-09 14:28:16 -04:00
alexklimaj
017f860f44 Add I2C retries in INA226 to prevent publishing 0's on a single read failure 2022-04-09 14:23:52 -04:00
Jacob Dahl
3bffe3087d use new safety_button topic for uavcannode Button publishing 2022-04-09 14:20:18 -04:00
Matthias Grob
fe26ee244d modeCheck: allow arming in land mode for MAVSDK compatibility
ideally we can remove it again when the workflow is changed to
first changing mode then arming.
2022-04-08 09:56:47 +02:00
Daniel Agar
77a37c26bf rc_update: further tighten timing requirements for valid data
- any real RC data input will be much faster than 3 Hz, so this is an
easy way to minimize bogus decoded data from propagating
2022-04-07 14:42:05 -04:00
Daniel Agar
98623f69a3 update mavlink submodule to latest
- update MAV_TYPE VTOL usage for current mavlink
2022-04-07 20:35:41 +02:00
Julian Oes
a5bd65b923 mavlink: set correct param capability
PX4 supports int32 parameter types by interpreting the 32 bits in
the float field as an int32 field. To signal this behaviour, it should
set the bit which is described as PARAM_ENCODE_BYTEWISE.

PX4 had always handled parameters this way but never actually sent the
capability (which back then was called PARAM_UNION), however, it should
have. This came up recently in the MAVLink devcall when these flags were
discussed. The takeaway was to remove the flags to make it clearer and
to make sure the projects (like PX4) send them out correctly.
2022-04-07 20:35:41 +02:00
Matthias Grob
92adc71424 ArmStateMachine: port over unit tests to functional gtests 2022-04-06 10:02:14 +02:00
Matthias Grob
f968a5947d ArmStateMachine: port arming_state_names into the class 2022-04-06 10:02:14 +02:00
Matthias Grob
074080c816 Commander: separate out arm state machine to class
Pure refactoring and just the first step to avoid conflicts on the way.
2022-04-06 10:02:14 +02:00
Thomas Stastny
e4b11c49c3
mathlib: add second order reference model filter with optional rate feedback (#19246)
mathlib: add second order reference model filter with optional rate feedback (#19246)

Reference models can be used as filters which exhibit a particular, chosen (reference) dynamic behavior. This PR implements a simple second order transfer function which can be used as such a reference model, additionally with rate feedback. The system is parameterized by explicitly set natural frequency and damping ratio. Another nice externality is that the output state and rate are kinematically consistent. Forward-euler and bilinear transform discretizations for the state space integration step are available.
2022-04-05 10:31:41 +02:00
Igor Misic
80aef942cd safety and safety button: refactoring #19413 2022-04-05 07:57:37 +02:00
Jacob Dahl
1f17a1470a uavcan: update safety button
updated uavcannode/Publishers/SafetyButton.hpp
tested successfully
make format
revert cannode publishing
2022-04-05 07:57:37 +02:00
Daniel Agar
8c3ba7adb4 commander: silence GPS no longer validity PX4_WARN 2022-04-04 14:43:11 -04:00
Alessandro Simovic
47b08fd698 precland: save flash space 2022-04-04 17:26:52 +02:00
Hovergames
457130fb69 Support for NXP UWB position sensor
uwb_sr150 driver for the sensor, and some
modifications in precision landing to allow
landing on a platform using the UWB system.
2022-04-04 17:26:52 +02:00
Matthias Grob
dd28c3e019 battery: update average current also when no capacity is configured 2022-04-04 10:02:55 +02:00
Matthias Grob
13c3eae6d0 battery: use mechanism to keep an up to date armed state 2022-04-04 10:02:55 +02:00
Silvan Fuhrer
3f6ab5ea19 battery: improve flight time remaining improvements
- introduce BAT_AVRG_CURRENT param that is used for init of average current estimate
- increase filtering of average current estimation
- only update average current filter when armed

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-04-04 10:02:55 +02:00
Matthias Grob
3aee2497bb commander_params: add precision land option for mode switch 2022-03-30 18:11:44 +02:00
David Sidrane
d6db06faf3 px_update_git_header:Extract latest release tag 2022-03-30 11:19:02 -04:00
Alex Mikhalev
9e57c5d217 tunes: Print warning if there is a tune error 2022-03-30 09:58:33 -04:00
Alex Mikhalev
f6cda64f0d tunes: Fixed unspecified behaviour
This fixes unspecified behaviour due to evaluation order of args.
It's up to the compiler whether next_number() or next_dots() is executed
first which means that the behaviour is not properly specified.
2022-03-30 09:58:33 -04:00
Kabir Mohammed
d3b3de7159 mavlink: Use round instead of ceil on BATTERY_STATUS percentage
Co-authored-by: Alex Mikhalev <alex@corvus-robotics.com>
2022-03-30 09:49:11 -04:00
Matthias Grob
7cd57b4415 FlightTaskOrbit: alert user about exceeded radius (mavlink_log) 2022-03-29 18:46:37 +02:00
Matthias Grob
3e8d2fea94 FlightTaskOrbit: alert user about exceeded radius (events) 2022-03-29 18:46:37 +02:00
Matthias Grob
8ad44ee128 FlightModeManager: remove needless space at the end of invalid task error string 2022-03-29 18:46:37 +02:00
Matthias Grob
9bdde98a68 FlightModeManager: refactor flight task switch result condition for vehicle commands 2022-03-29 18:46:37 +02:00
Matthias Grob
ffaef906c4 FlightModeManager: don't ack with result failed when parameters are invalid
Command denied is defined as "supported but has invalid parameters"
which matches the case.
2022-03-29 18:46:37 +02:00
Matthias Grob
fc0be6c4fc FlightModeManager: switch to failsafe task if orbit is rejected 2022-03-29 18:46:37 +02:00
RomanBapst
18074dec5a simulator: fix conversion from hPa to Pa
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-03-29 17:41:54 +03:00
Daniel Agar
8a552fac78 uavcannode: publish RelPosHeading (from sensor_gnss_relative) 2022-03-29 07:59:41 +02:00
Daniel Agar
84e796c385 drives/gps: add new sensor_gnsss_relative msg
- for ublox this corresponds to NAV_RELPOSNED
2022-03-29 07:59:41 +02:00
Matthias Grob
c7f114a26a FlightTaskOrbit: increase radius limit 2022-03-28 17:57:56 +02:00
Matthias Grob
d0794c1189 FlightTaskOrbit: don't start Orbit if radius is not in range 2022-03-28 17:57:56 +02:00
Daniel Agar
0595efbd9b sensors/vehicle_magnetometer: publish sensors_status_mag and other minor updates to stay in sync with air data 2022-03-26 16:08:41 -04:00
Daniel Agar
0c31f63896 sensors: add baro calibration and cleanup
- sensor_baro.msg use SI (pressure in Pascals)
 - update all barometer drivers to publish directly and remove PX4Barometer helper
 - introduce baro cal (offset) mainly as a mechanism to adjust
relative priority
 - commander: add simple baro cal that sets baro offsets to align with
GPS altitude (if available)
 - create new sensors_status.msg to generalize sensor reporting
2022-03-26 16:08:41 -04:00
Daniel Agar
bc26b73c07 px4io: only publish valid input_rc 2022-03-25 10:56:24 -04:00
Daniel Agar
3d08e031d2 rc_update: improve manual_switches simple protections
- require back to back matching switch decode to match within 1 second
 - clear any previous manual switches if RC is unstable
2022-03-25 10:56:24 -04:00
Daniel Agar
875a2cc423 commander: remove loop counters and update UI LED control to use monotonic time 2022-03-24 22:43:26 -04:00
Daniel Agar
879622547c commander: only process one vehicle_command/action_request per cycle
- things like arming requests can be dependent on current nav state
that might requested by a previous command, but the state machine
transition will only happen after command processing
2022-03-24 22:43:26 -04:00
Daniel Agar
e528eb5dc4
commander: fix status flags usage (condition_global_position_valid->global_position_valid)
- broken due to the merge timing of https://github.com/PX4/PX4-Autopilot/pull/19378 and https://github.com/PX4/PX4-Autopilot/pull/19351
2022-03-24 09:40:15 -04:00
Jaeyoung-Lim
106044be38 Initialize global local projection for rovers
This commit initializes the global and local projection for rovers
2022-03-24 08:57:53 -04:00
Jonas Perolini
e31304d7d5
Quadchute param update (#19351)
New parameter for actions after a quadchute (COM_QC_ACT)

Co-authored-by: Jonas <jonas.perolini@rigi.tech>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-03-24 10:27:32 +01:00