13589 Commits

Author SHA1 Message Date
Silvan Fuhrer
aecc0aa0c3 AirspeedSelector: do checks for data stopped in airspeed selector, not validator
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer
061fb9ac07 AirspeedSelector: add const
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer
cd2c366e22 AirspeedSelector: remove unnecessary reboot required and Experimental comments in params
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer
11dbc7e17f AirspeedSelector: improve description of ASPD_FALLBACK_GW
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Silvan Fuhrer
0f1207dd7e AirspeedSelector: improve readability
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-22 14:16:22 +01:00
Daniel Agar
e0b33ba842
mavlink: temporarily disable ACTUATOR_OUTPUT_STATUS stream by default
- the presence of this stream appears to be causing the MAVSDK tests to fail and needs to be investigated
2021-01-21 11:25:42 -05:00
Matthias Grob
7cdb9e9412 MulticopterPositionControl: altitude comment typo 2021-01-21 09:43:12 -05:00
ArthurLamberticus
82d32c7f3f
mavlink: add ACTUATOR_OUTPUT_STATUS stream
Co-authored-by: Lise Prunier <lise.prunier@aerialcoboticus.com>
2021-01-21 09:30:43 -05:00
bresch
d7812f83f1 mag_cal: fix race condition causing invalid mag calibration
In some cases, the fitness of the optimizer does not shrink at each
iteration, causing the "decreasing fitness check" to fail. This stops
the optimization and returns with sub-optimal, or unrealistic results.
2021-01-20 10:50:35 -05:00
Mathieu Bresciani
8d8b58efc3
Add logging of mag calibration data (mag_worker_data)
Co-authored-by: Julian Kent <julian@auterion.com>
2021-01-20 09:44:45 -05:00
CUAVcaijie
bed77c2988 add notes 2021-01-19 20:42:58 +01:00
CUAVcaijie
297a428cc0 Fix the case where the flight controller is connected to the battery (charge 100), QGC shows no battery 2021-01-19 20:42:58 +01:00
Daniel Agar
ac8f4e3c48 mc_pos_control: only update constraints if topic updated
- update failsafe constraints
2021-01-19 14:44:42 +01:00
Daniel Agar
3e5e5ab1d5 control_allocator and angular_velocity_controller throttle parameter_update subscription 2021-01-18 11:25:37 -05:00
Beat Küng
c36340d29a ActuatorEffectivenessMultirotor: set effectiveness to zero when computing the matrix
Just to be on the safe side.
2021-01-18 11:25:37 -05:00
Beat Küng
212ec821b1 control_allocator: set unused actuators to trim instead of min 2021-01-18 11:25:37 -05:00
Beat Küng
3606f86518 control_allocator: ensure unused outputs are initialized to min
Mostly important in cases where the ouputs would change (e.g. param change)
2021-01-18 11:25:37 -05:00
Beat Küng
3dad79d8f5 control_allocator: inline one-line setters & getters 2021-01-18 11:25:37 -05:00
Beat Küng
164511a7b5 control_allocator: avoid vector copies and sqrt() 2021-01-18 11:25:37 -05:00
Beat Küng
0e66b0876b control_allocator: change SequentialDesaturation to existing MC mixer
And limit the operations to the number of configured outputs.

Only using the number of configured actuators reduces CPU load by ~2% on
F7 @1khz.
2021-01-18 11:25:37 -05:00
Beat Küng
308f614735 refactor control_allocator: directly get the effectiveness matrix when updated
Reduces stack + RAM usage
2021-01-18 11:25:37 -05:00
Beat Küng
38782029ad fix control_allocator: set _last_run at the correct place 2021-01-18 11:25:37 -05:00
Beat Küng
0e86ab47f6 fix control_allocator: use 'delete' instead of 'free', guard against out-of-memory 2021-01-18 11:25:37 -05:00
Beat Küng
066464c4e8 control_allocator: remove unused _task_start 2021-01-18 11:25:37 -05:00
Beat Küng
25f3fe8456 fix control_allocator_status: torque_setpoint_achieved and thrust_setpoint_achieved are bool 2021-01-18 11:25:37 -05:00
Julien Lecoeur
343cf5603e initial control allocation support
- control allocation module with multirotor, VTOL standard, and tiltrotor support
 - angular_velocity_controller
 - See https://github.com/PX4/PX4-Autopilot/pull/13351 for details

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Roman Bapst <bapstroman@gmail.com>
2021-01-18 11:25:37 -05:00
Julian Kent
fc6b61dad1 Try 'min' for units 2021-01-18 16:26:53 +01:00
Julian Kent
d99d52960e Fix default _rtl_xxx values 2021-01-18 16:26:53 +01:00
Julian Kent
5a9fe312b5 Fix test failure on rebase: set lpos valid 2021-01-18 16:26:53 +01:00
Julian Kent
af8d178ae5 Fix spurious RTL triggers
Two sources:
1. global to local conversion was sometimes giving issues, so do everything in global
2. on startup the RTL didn't check if the home position was valid before processing it
2021-01-18 16:26:53 +01:00
Julian Kent
b5f0a7ea03 Fix RangeRTL test 2021-01-18 16:26:53 +01:00
Julian Kent
5500a84b6a Add timestamp to RTL message 2021-01-18 16:26:53 +01:00
Julian Kent
f169247bc2 Add RTL topics to ulog default profile 2021-01-18 16:26:53 +01:00
Julian Kent
67082ccb2b Test the vehicle type parameter usage 2021-01-18 16:26:53 +01:00
Julian Kent
100c64c790 Test the navigator side, and fix another trig edge case 2021-01-18 16:26:53 +01:00
Julian Kent
a736ba2435 Minor tweak in wind handling 2021-01-18 16:26:53 +01:00
Julian Kent
e847ef1a4d Add trig tests for wind calculations, and fix bugs / edge cases 2021-01-18 16:26:53 +01:00
Julian Kent
7482413005 Add Range-based RTL 2021-01-18 16:26:53 +01:00
Ricardo Marques
e817fb83f5 pwm_extra: Add PWM_EXTRA parameters.
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
2021-01-18 15:43:28 +01:00
Ricardo Marques
78c05275d2 tailsitter: Fix differential thrust in FW mode.
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
2021-01-18 09:04:27 +01:00
David Jablonski
2ed48f041c
mavlink: Templated SCALED_IMU mavlink stream 2021-01-17 12:32:51 -05:00
Matthias Grob
031bbb7f3e FlightModeManager: handle commands all the time
Moving the command handling to a separate function that gets called
whenever a vehicle command is available to always react on commands
and not just when already a task is running.

This solves e.g. commanding an Orbit when in Staibilized.
2021-01-17 15:46:30 +01:00
Matthias Grob
df54f938ef FlightModeManager: correct setpoint struct initialization
It is important that setpoints get initialized with NAN and not overwritten
if specifically set by a successful flight task execution. It's then
clear if any setpoints were intentionally and successfully set.
Crucial for the position controller's emergency failsafe and the
seamless setpoint handover to the next flight task.
2021-01-17 15:46:30 +01:00
Matthias Grob
63db61a700 FlightModeManager: correct acceleration setpoint feedback naming
The variable was never renamed correctly in this in between layer when
we switched from normalized thrust to acceleration setpoints.
2021-01-17 15:46:30 +01:00
Daniel Agar
4d7b875ee2 flight_mode_manager: merge with flight_tasks 2021-01-17 15:46:30 +01:00
bresch
eaa2ae9dc9 ekf2: add param to enable synthetic mag Z fusion mode 2021-01-17 12:06:59 +01:00
bresch
983234e29d ekf2: add param to set rng check hysteresis 2021-01-17 12:06:59 +01:00
Silvan Fuhrer
195a900ecf change default of RTL_LAND_DELAY to 0
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-17 12:05:30 +01:00
Silvan Fuhrer
cee4016665 Preflight checks: Airspeed checks update
-check for valid airspeed_validated (declared valid plus updated less than 1s ago)
-added param (COM_ARM_ARSP_EN) to enable/disable check for max airspeed for arming set max
airspeed limit to half of stall airspeed

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-16 10:26:55 -05:00
Matej Frančeškin
ba6a8080ea mavlink: don't respond to MAV_CMD_REQUEST_MESSAGE if component doesn't match
PX4 is responding with NACK to MAV_CMD_REQUEST_MESSAGE from a GCS to
payload-manager which confuses a GCS.
PX4 shouldn't respond to commands that are not broadcasted or specificaly
addressed to it.
2021-01-15 10:57:20 -05:00