14435 Commits

Author SHA1 Message Date
bresch
8873e92c7c ekf: force fallback to baro if GPS is stopped while in GPS height mode
Otherwise, no height aiding source is used
2021-10-26 10:05:28 +02:00
bresch
0a140ec59a ekf2_test: add GPS height to baro fallback 2021-10-26 10:05:28 +02:00
bresch
f4c21cedd9 ekf2_test: use motion_planning for dynamic yaw emergency test 2021-10-25 18:06:38 -04:00
bresch
340a2caa8e ekf2_test: use motion_planning library
The VelocitySmoothing class from the motion_planning library is used to
generate trajectories in order to test the EKF convergence during motion
2021-10-25 18:06:38 -04:00
bresch
6ec9ab11f2 add fw auto-tune module to board configs 2021-10-25 13:41:31 +02:00
bresch
95e2941b17 fw att: inject system identification signal to controller 2021-10-25 13:41:31 +02:00
bresch
6af0856558 add FF to FW rate controllers 2021-10-25 13:41:31 +02:00
bresch
55f0860c31 fw atune: add fixed-wing auto-tuning module 2021-10-25 13:41:31 +02:00
bresch
8dfdb1e3db compute and publish fixed-wing control power 2021-10-25 13:41:31 +02:00
RomanBapst
d84b0296d2 support orbit command in fixed wing mode
Signed-off-by: RomanBapst <bapstroman@gmail.com>

commander: support orbit mode for fixed wings

Signed-off-by: RomanBapst <bapstroman@gmail.com>

FwPositionControl: publish orbit status

Signed-off-by: RomanBapst <bapstroman@gmail.com>

commander:reject orbit mode while doing a vtol transition

Signed-off-by: RomanBapst <bapstroman@gmail.com>

FixedWingPositionControl: explicitly cast waypoint for Orbit status

FixedwingPositionControl: fill missing orbit_status fields

navigator_main: handle reposition/orbit corner cases

- set orbit rotation direction correctly
- send mavlink message when orbit is rejected

FixedWingPositionControl: correctly report rotation direction in orbit_status

navigator: hack to not break orbit while doing altitude changes

Signed-off-by: RomanBapst <bapstroman@gmail.com>

navigator: set cruise throttle for orbit command

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-25 09:48:27 +02:00
Silvan Fuhrer
f9cfcc5cfa AirspeedSelector: add bitmask to enable checks seperately in ASPD_DO_CHECKS
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer
73fe300c00 WindEstimator: remove option to disable scale estimation
The situation where this would be desired is unclear, plus it's basically
the same as setting ASPD_SC_P_NOISE to a very small value.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer
c0754cf324 AirspeedValidator: pass vI as reference
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer
f9682b86d1 AirspeedSelector: some clean up
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer
7537fa36c8 AirspeedValidator: fix airspeed scale validation (feed raw TAS)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer
a2faac148f AirspeedValidator: check_airspeed_innovation() check absolute innovations
Do no longer use tas_innovation from wind estimator and test ratio, but calculate
the innovation  based on wind estimate, TAS measurement (including currently applied scale)
and ground velocity. Use innovations directly to trigger failure.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer
f6d37ecacf AirspeedSelector: make sure we don't try to access a negative array index
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer
ccab93e68b AirspeedSelector: use Vector3f
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer
cad7851774 AirspeedSelector: add _CAS_scale_validated to airspeed_wind for logging
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer
625f556b0e AirspeedSelector: airspeed scale estimation improvements and robustification
- run airspeed scale estimation always, not in dedicated mode
- add option to apply scale automatically, with extra feasibility check
- add airspeed scale for all 3 possible airspeed instances
- clean up parameters
- add check for data stuck (non-changing airspeed data)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
RomanBapst
8e8c6efd66 Mission block: do not care for altitdue acceptance when approaching backtransition point
Not accepting the waypoint causes the vehicle to perform a sharp turn after passing
the land waypoint and this causes worse unexected behavior.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-22 15:37:10 +02:00
mcsauder
9301288d1f Add parameter and logic to set RTL heading mode. 2021-10-22 09:28:30 +02:00
Silvan Fuhrer
fd96bbf9b9 Mavlink: bump MAX_REMOTE_COMPONENTS to 16
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-21 07:48:50 +02:00
Beat Küng
8a2b310b83 topic_listener: avoid code generation, use existing metadata at runtime
This reduces flash size for v5 by ~110KB, the topic listener now only adds
about 1.2KB.
2021-10-20 08:10:05 +02:00
Beat Küng
a0e72b35a4 replay: ignore ULogMessageType::PARAMETER_DEFAULT messages 2021-10-20 08:10:05 +02:00
Beat Küng
4c73ac3805 uorb: use single byte for internal types in o_fields metadata
Reduces flash usage by ~9KB.
2021-10-20 08:10:05 +02:00
mcsauder
21163d859e Whitespace cleanup. 2021-10-19 13:29:26 -04:00
Daniel Agar
4cf8eb8226 ekf2: EKF vehicle_at_rest always require some rotation in addition to vibration metrics 2021-10-18 21:39:40 -04:00
bazooka joe
b35dd86d04 mc_pos_control: remove unused var 2021-10-18 20:37:18 -04:00
bazooka joe
c8d6f8f5e5 remove proto for unused function limit_thrust_during_landing() 2021-10-18 20:37:18 -04:00
Daniel Agar
9d7c4596f7 navigator: increase stack 1800 -> 1864 bytes 2021-10-18 20:31:35 -04:00
Beat Küng
da1df5352c fix pwm: only update oneshot timers owned by the current pwm_out instance
This fixes the case where oneshot was enabled with multi-instance pwm_out,
triggering oneshot updates too close to each other and as a result could
lead to spinning motors while disarmed.
2021-10-18 18:45:19 -04:00
Beat Küng
f1686b1abf px4io: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng
183ab8bbe7 control_allocator: avoid default argument for virtual method getEffectivenessMatrix
clang tidy error:
/__w/PX4-Autopilot/PX4-Autopilot/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp:50:34: error: default arguments on virtual or override methods are prohibited [google-default-arguments,-warnings-as-errors]
ActuatorEffectivenessMultirotor::getEffectivenessMatrix(matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS> &matrix,
2021-10-18 18:45:19 -04:00
Beat Küng
ab3fe77f46 mavlink_receiver: publish MAV_CMD_DO_SET_ACTUATOR command 2021-10-18 18:45:19 -04:00
Beat Küng
38fa65a47e control_allocator: remove direct mixer, add actuator_{motors,servos} instead 2021-10-18 18:45:19 -04:00
Beat Küng
a51c465b54 control allocation: introduce parameter SYS_CTRL_ALLOC & unify build targets 2021-10-18 18:45:19 -04:00
Beat Küng
ad1bcfd77c commander: correct lockdown CLI description 2021-10-18 18:45:19 -04:00
Silvan Fuhrer
a66b0829b0 Standard VTOL: add airspeed to back transition logic and refactor it a bit
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer
358c67226e Tiltrotor: backtransition logic improvements
-use groundspeed in body x for exit condition
-use airspeed for speed exit condition if no valid groundspeed

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer
cba80a6338 Tiltrotor: front transition: fade out yaw equally to roll
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer
641383cbfb VTOL backtransition improvements
* vtol_type: only allow positive pitch setpoints during backtransition

* vtol params: set default of VT_B_DEC_FF to 0, as for most frames a FF is not necessary

* Tiltrotor: fix throttle during first part of back transition

* Tiltrotor: only enable all motors in second phase of backtransition (tilting phase)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
RomanBapst
af291e2040 FlightTaskTransition: Transition improvements
- use fw pitch setpoint offset during transition
- take over previous vertical velocity and smooth out over transition

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer
d39c32619e Tiltrotor: add minimum throttle of 0.25 during front transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
RomanBapst
f61853d428 vtol: implement throttle blending out and into transition
- blend into TECS throttle after front transition
- blend out of TECS throttle during backtransition

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-15 09:58:48 +02:00
RomanBapst
8dd76050e0 vtol: take fixed wing attitude setpoint during transition if altitude is
not controlled

- required as there is no flightask running if altitude is not controlled

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-15 09:58:48 +02:00
Daniel Agar
56823b5ac9 ekf2: EKF control don't allow invalid flow gyro to propagate 2021-10-14 16:31:22 -04:00
Daniel Agar
d35cf78e4a commander: PX4_ERR if attitude or angular velocity become invalid 2021-10-14 09:17:50 -04:00
Daniel Agar
ef4d4c3093 sensors/vehicle_imu: fix timestamp_sample increasing check 2021-10-14 09:12:45 -04:00
Jaeyoung-Lim
4535b18a80 Set setpoint type as const 2021-10-14 11:18:02 +02:00