Commit Graph

14666 Commits

Author SHA1 Message Date
Beat Küng b29d9db7f1 control_allocator: limit status publication rate to 200Hz
Reduces CPU load by ~3.5% on F4 @2khz.
And compute getAllocatedControl as needed (~1.5% CPU reduction)
2021-11-23 12:40:22 -05:00
Beat Küng bcba3dfe52 control_allocator,angular_velocity_controller: run on rate_ctrl wq 2021-11-23 12:40:22 -05:00
Beat Küng a0e43bca96 msg: remove unused vehicle_actuator_setpoint topic 2021-11-23 12:40:22 -05:00
Beat Küng 52a2ef34fd mixer_module: add THR_MDL_FAC for SYS_CTRL_ALLOC=1 2021-11-23 12:40:22 -05:00
Beat Küng 4346ac4a37 control_allocator: add mixer metadata 2021-11-23 12:40:22 -05:00
Beat Küng 282d35bbf0 esc_calibration: handle SYS_CTRL_ALLOC==1 2021-11-23 12:40:22 -05:00
Beat Küng 21699935e8 vehicle_command: add VEHICLE_CMD_ACTUATOR_TEST and VEHICLE_CMD_CONFIGURE_ACTUATOR 2021-11-23 12:40:22 -05:00
Beat Küng f99c2617ad control_allocator: add module.yaml, add CA_MC_R_COUNT param & update defaults 2021-11-23 12:40:22 -05:00
Matthias Grob 0153c870d2 Commander: make sure yaw airmode is not possible while arm gesture is enabled
It's unsafe to arm with the gesture when yaw airmode is enabled
because e.g. in Stabilized mode that results in a high yawrate setpoint
that the drone tries to follow even with zero thrust
because of the airmode.

It was handled before by checking the arm switch parameter because that
used to disable the stick arm gesture.
See 24dc316973
2021-11-23 16:03:46 +01:00
Matthias Grob 572890f8c0 ManualControl: add parameter to disable arm/disarm stick gesture 2021-11-23 16:03:46 +01:00
Matthias Grob 468022abba ManualControl: correct arm hysteresis parameter name 2021-11-23 16:03:46 +01:00
Matthias Grob c84b1c6566 ManualControl: ignore unassigned mode slots
They were resulting in a message
"Switching to Unkown is currently not available".
2021-11-23 16:03:46 +01:00
Daniel Agar 7ff72304b4 sensors/vehicle_imu: improve disabled sensor handling
- remove regular callback scheduling when sensor is disabled, register if re-enabled
2021-11-22 21:10:35 -05:00
Daniel Agar 577d926639 commander: improve angular velocity validity and message 2021-11-22 11:27:45 -05:00
PX4 BuildBot 88d9ade4d7 Update submodule mavlink to latest Mon Nov 22 12:39:21 UTC 2021
- mavlink in PX4/Firmware (0e4e8162407a12dc09c8d17635c60d4036b81bc7): https://github.com/mavlink/mavlink/commit/c3a4b52eb1ac6e8053d64a6a8b6ade887d4fa2d2
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/5309ba449a3dc6d7ad84fa7ebeb6deee040e4a04
    - Changes: https://github.com/mavlink/mavlink/compare/c3a4b52eb1ac6e8053d64a6a8b6ade887d4fa2d2...5309ba449a3dc6d7ad84fa7ebeb6deee040e4a04

    5309ba44 2021-11-18 Hamish Willee - Remove backticks - these do not render as a style so not helpful (#1745)
9cac0e5a 2021-11-17 David Jablonski - docs: catch more hyperlinks (#1744)
ea9349b5 2021-11-16 David Jablonski - common: add SET_FOCUS_TYPE_AUTO (#1741)
2021-11-22 09:08:50 -05:00
Daniel Agar 8fc3b05491 mavlink: param_get proper type to silence errors 2021-11-22 09:08:38 -05:00
wangwwno1 7a1a4ea7a6 Format fix & Remove redundant lines 2021-11-20 16:13:46 +01:00
wangwwno1 51ce8306ee Remove redundant code out of hil_lpos 2021-11-20 16:13:46 +01:00
wangwwno1 b2c5919d29 Update src/modules/simulator/simulator_mavlink.cpp
Co-authored-by: JaeyoungLim <jalim@ethz.ch>
2021-11-20 16:13:46 +01:00
wangwwno1 160fec5f25 Update simulator_mavlink.cpp 2021-11-20 16:13:46 +01:00
wangwwno1 6e2060ddb6 Add accel to vehicle_local_position_groundtruth
Related Issue: #18527 
According to [this doc](https://github.com/mavlink/c_library_v2/blob/92b1a43468e8737da2d4cc1e72304e6443dcfdd3/common/mavlink_msg_hil_state_quaternion.h#L102), the *acc value are mili-Gee, so multiply the value with `CONSTANT_ONE_G/1000.0f` would get the acceleration in `m/s`.
2021-11-20 16:13:46 +01:00
Daniel Agar 505f963dd0 mavlink: receiver fix SENS_FLOW_ROT type 2021-11-19 21:08:04 -05:00
Matthias Grob f912ee2c8b Commander: send out parachute MAVLink command when kill switch engaged 2021-11-19 17:15:04 +01:00
Matthias Grob 3193b554ca Add optional preflight check for healthy MAVLink parachute system 2021-11-19 17:15:04 +01:00
Matthias Grob 43c529f294 Add MAVLink parachute system heartbeat detection 2021-11-19 17:15:04 +01:00
Thomas Debrunner fb54324f56 gyro-fft: Disable asm-operand-widths warning on apple silicon. The warning is caused by unused functions only. As with compiling for x86, the functions containing assembly never get used, but since the apple silicon is also an ARM target, they trigger a warning. 2021-11-19 09:14:11 -05:00
Matthias Grob 4c6621f6cf Commander: Allow arming a rover with the throttle stick in the middle 2021-11-19 10:10:32 +01:00
Matthias Grob 35d4986ea7 FlightTasks: remove updateFinalize() concept because it got obsolete 2021-11-18 19:12:44 -05:00
Matthias Grob 9eac0edbc0 FlightTaskAuto: remove generateSetpoints function, replace by implementation 2021-11-18 19:12:44 -05:00
Matthias Grob ece8fdddec FlightTaskAuto: simplify early setpoint preparation based on triplet type 2021-11-18 19:12:44 -05:00
dagar 9646b49b60 [AUTO COMMIT] update change indication 2021-11-18 13:58:53 -05:00
Daniel Agar bffd88ad81 ekf2: don't inhibit accel bias when not in air 2021-11-18 13:58:53 -05:00
Daniel Agar f3472385da sensors/vehicle_imu: fix accel/gyro learned bias calibration updates
- fix confusion between estimated bias and calibration offset when
saving after each flight
 - when the stable bias estiamte is retrieved during flight it's
immediately converted to a sensor offset and saved
 - fixes https://github.com/PX4/PX4-Autopilot/issues/18658
2021-11-18 10:00:26 -05:00
bresch fc155bc57e Ekf2Selector: declare filter unhealthy when high test ratio
Request a switch to another instance when the combined test ratio is too high.
2021-11-18 13:29:01 +01:00
bresch 43fb076828 AngularAcceleration: explicitly disable filter when cutoff <= 0 2021-11-18 09:25:47 +01:00
bresch 4a14a8bc7f AutoLineSV: Always publish a valid yaw setpoint
In MPC_YAW_MODE 3 (along trajectory), the flight task is asked to
produce a yaw setpoint. If the previous yaw value was NAN (e.g.: during
early takeoff), the setpoint should then be reset to the current
estimate.
2021-11-16 18:09:37 -05:00
bresch f751dd2242 FlightTask: set yaw_setpoint to NAN when yaw should not be controlled 2021-11-16 18:09:37 -05:00
bresch 2213343240 ft altitude: use longerThan to save a sqrt operation 2021-11-16 18:09:37 -05:00
bresch 394fa953b8 EKF: get status on yaw alignement in flight
1s after the in air mag reset is performed, the final yaw alignment is
complete and the yaw estimate can be used for yaw control.
2021-11-16 18:09:37 -05:00
Matthias Grob 2a5751233a FlightTasks: remove unused StraightLine library
It was meant as an example for an easy to use interface of a
motion primitive with a minimal implementation. But the implementation
is much worse than the jerk optimized trajectory. We rather
work on making it easier to use. #18390 was a first step towards that.
2021-11-16 18:08:27 -05:00
Daniel Agar e062f4fcf0 mavlink: ORBIT_EXECUTION_STATUS stream limit to 2 instances 2021-11-16 17:10:13 -05:00
Alessandro Simovic 7090e634cc mission_block: always accept yaw in MC takeoff 2021-11-16 12:35:16 -05:00
Beat Küng 0622cb8857 mavlink_ftp: disallow writes outside of /fs/microsd under NuttX
As these files are kept in RAM, it could just fill up the RAM.
2021-11-16 12:34:16 -05:00
Daniel Agar 4e8c234a55 ekf2: only save mag declination if changed 2021-11-16 12:33:48 -05:00
Matthias Grob b36dbf8de4 Remove AutoLineSmoothVel, merged into Auto 2021-11-16 10:08:47 +01:00
Matthias Grob 179b1cdf56 FlightTaskAuto: merge activate(), reActivate() and update() from FlightTaskAutoLineSmoothVel 2021-11-16 10:08:47 +01:00
Matthias Grob 51ebb0f294 FlightTaskAuto: move in helper methods from FlightTaskAutoLineSmoothVel 2021-11-16 10:08:47 +01:00
Matthias Grob aa376c5824 FlightTaskAuto: move in parameters from FlightTaskAutoLineSmoothVel 2021-11-16 10:08:47 +01:00
Matthias Grob 50e13f132f FlightTaskAuto: move in members from FlightTaskAutoLineSmoothVel 2021-11-16 10:08:47 +01:00
Matthias Grob 33e349d71e FlightTask: remove unused _time 2021-11-16 10:08:47 +01:00