14108 Commits

Author SHA1 Message Date
TSC21
d6ee15596d microRTPS: client: show diagnostic of average bandwidth usage on the 'status' option 2021-06-21 16:36:44 +02:00
Pieter-Jan Dewitte
155d3c7d36 FW pos control: fix airspeed input constaining 2021-06-21 10:55:21 +02:00
Claudio Micheli
b1829e5766
Predict and use braking distance when Pausing auto modes (for multicopters) (#17269) 2021-06-18 10:45:03 +02:00
Daniel Agar
76a8617529
sensors: fix IMU init race condition
- IMU init requires valid published data (device ids, etc)
 - orb_group_count will include advertised instances before data is published, so this can't be used to throttle IMU init attempts
2021-06-17 10:38:33 -04:00
Beat Küng
14ec7a0d93 mavlink: tcflush() uart before closing it
On NuttX with flow control, if no one was reading from the uart, the
close() call would block indefinitely waiting for data to be sent.
2021-06-17 09:40:57 -04:00
David Sidrane
028ae9561d logger:watchdog Track NuttX file reorg 2021-06-16 17:07:47 +02:00
David Sidrane
026d36dee8 microRTPS:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
8d078eb02e vtol_att_control:Fix type 2021-06-16 17:07:47 +02:00
David Sidrane
bec5d6de9b vmount:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
350e43f02c dataman:fix types 2021-06-16 17:07:47 +02:00
David Sidrane
77082188d8 temperature_calibration:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
d73f842151 sensors:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
274c55a4ae navigator:mission Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
65d026d45c mavlink:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
5faa116681 logger:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
3b725e5525 gyro_fft:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
07fbf8681d gyro_calibration:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
85f4f13e8a flight_mode_manager:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
9a423e222b ekf2:Use inttypes and fix types 2021-06-16 17:07:47 +02:00
David Sidrane
ed474794cc commander:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
a3593d7d07 analog_battery:Use inttytpes 2021-06-16 17:07:47 +02:00
Julian Oes
e828ba4288
commander: send parachute command on termination (#17564)
* commander: send parachute command on termination

This sends the DO_PARACHUTE command to parachute component.

* commander: fix lying comments and printf

* commander: use one flag for termination triggered

This merges the duplicate flags _flight_termination_triggered and
_flight_flight_termination_printed.

* commander: correct variable name

* commander: always send tune with parachute

* commander: fix target_component for parachute cmd

The previous changes were wrong in that all commands were now sent to
the parachute component which doesn't make any sense. Of course only the
parachute command should be sent there.
2021-06-15 11:50:30 +02:00
Jukka Laitinen
b550ad22b9 EKF2: Always publish global position
For historical reasons, there is a check in EKF2 to only publish global
position if it has moved for 1mm.

This is no longer necessary, and also this if doesn't save any cpu cycles
in real conditions where GPS errors are always much bigger that this.

When using simulated or fake GPS, based on some other positioning
system, the GPS coordinate input can be very accurate due to quantization
or true accuracy. In this case this check bites and perfectly valid position
doesn't get published.

Just removed this if.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-15 10:55:39 +02:00
Julian Oes
8415692f2a commander: enable user override when GPS is lost
When user override using the RC sticks is allowed, I would expect this
feature to also work in the case where GPS is lost and the vehicle goes
into a blind land/descent.

Without this commit, the vehicle would switch to Land mode and a pilot
could not take over control unless they switch to Altitude control in
a ground station.

With this commit, user override works as I would expect it and it will
switch to Altitude control allowing a pilot to recover in this
situation.
2021-06-15 10:36:11 +02:00
Beat Küng
615e1f3e29 mavlink: fix module doc for broadcast 2021-06-11 09:01:41 +02:00
Julian Oes
ca86416ce6 mavlink: don't read garbage target sysid/compid
This fixes a tricky bug that we discovered in MAVSDK:
https://github.com/mavlink/MAVSDK/pull/1464

It turns out the target_system and target_component fields can
potentially be:
1. at the end of a message payload,
2. and zero,

and therefore they get trimmed. When you then try to read it you
potentially read some garbage from the CRC fields.
2021-06-09 15:40:46 -04:00
bresch
514845592b en-/disable mc position controller using explicit control mode flag 2021-06-09 18:10:22 +02:00
Daniel Agar
328c5cb1cf mavlink: properly cleanup instance on exit 2021-06-09 10:58:34 -04:00
Daniel Agar
251f1a069b ekf2: update message lost error messages to perf counters
- only allocate these perf counters if data source is present
2021-06-08 20:12:17 -04:00
bresch
841914462d MC pos control: use vz<->z_deriv blending in pure vel mode only
This logic was introduced to avoid large altitude drifts in velocity
mode (altitude not controlled) due to potential velocity estimate bias
in case of IMU problems (see PR #8445). After some refactorings,
the logic started to be used in altitude-controlled modes as well, which is not needed.
2021-06-08 14:58:14 +02:00
Daniel Agar
578c003c13 ekf2: selector handle uninitalized test ratios
- choose the best instance regardless of tilt or yaw alignment
2021-06-07 08:56:37 -04:00
Matthias Grob
ed62ae0e4f mavlink: add actuator_armed header to heartbeat 2021-06-07 08:55:49 -04:00
Julian Oes
446598d003 mc_pos_control: omit initial warning 2021-06-07 08:54:19 -04:00
Daniel Agar
4f850c7cd0 sensors: preserve all valid calibration parameters even if sensor currently missing
- mark calibration slots active for first N sensors found
 - calibration procedure don't bother resetting unused slots
2021-06-07 08:50:32 -04:00
Daniel Agar
2ccd86102b ekf2: add command line option to manually select instance 2021-06-07 08:47:17 -04:00
Daniel Agar
4f8f1a5f7e
mavlink: streams HEARTBEAT fix code style 2021-06-04 20:43:25 -04:00
Matthias Grob
faabe2d431 mavlink: make sure heartbeat reports flight termination 2021-06-04 12:48:22 -04:00
Matthias Grob
70050ae4f5 mc_pos_control_params: correct MPC_POS_MODE docs since 1 is depracated 2021-06-04 09:32:03 -04:00
Daniel Agar
470c3cfa6e mavlink: streams HEARTBEAT fix vehicle_control_mode copy 2021-06-04 15:19:34 +02:00
CUAVmengxiao
98fb373590 mavlink: 14S battery support 2021-06-04 09:15:40 -04:00
RomanBapst
ad9288536b TECS: enable direct height-rate control
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
RomanBapst
f6de99d42e FixedWingPositionControl: control only height rate when using pitch stick
in manual altitude controlled modes

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
Silvan Fuhrer
3d87bfcc0a rename FW_T_CLIMB_R_SP to FW_T_CLMB_R_SP
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-06-04 14:51:27 +02:00
RomanBapst
19449a4e75 FixedWingPositionControl: use target climb/sink rate parameters as maximum
rates in manual altitude controlled modes

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
RomanBapst
a5cc449e69 tecs: propagate altitude setpoint based on target climb/sink rate
- avoids tecs always climbing and sinking and max rates and allows to fine tune these rates
- avoid numerical calculation of feedforward velocity using derivative, this
 was prone to jitter in dt

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
RomanBapst
4b7416c05b FixedWingPosControlL1: added target climb and sink rate parameters
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-06-04 14:51:27 +02:00
Daniel Agar
db1657fa84 sensors/vehicle_magnetometer: apply current compensation regardless of arming state
- simplify update on mag compensation type change
2021-06-03 10:08:19 -04:00
Julian Oes
60235f8474 mavlink: properly initialize vehicle_command queue
This makes sure that the vehicle_command topic is properly
initialized from the beginning.

orb_exists returns -1 or 0 and not a bool as one would expect.
2021-06-03 08:53:39 -04:00
Julian Oes
1b67187770 navigator: protect against 0 acceptance radius
This seems to slip in e.g. as part of the VTOL_LAND command.
2021-06-02 07:28:19 +02:00
Julian Oes
ab23a44b99 navigator: fix acceptance radius for multicopter
This fixes a regression introduced in
https://github.com/PX4/PX4-Autopilot/pull/16646
which meant that the acceptance radius was no longer used at all for
multicopter, and instead only the NAV_ACC_RAD param was used.

With this change we use the acceptance radius of the mission item again
if it is actually set (and not NAN) which we did not do before, and we
only do that for multicopter.
2021-06-02 07:28:19 +02:00