Commit Graph

24394 Commits

Author SHA1 Message Date
Daniel Agar f15eefcc95 ekf2: selector increase status rate before potential instance change 2021-05-07 22:38:47 -04:00
Julian Oes 29730e30fa ekf2: don't timeout in HITL mode
Otherwise ekf2 might not start if HITL isn't started within 30 seconds.
2021-05-07 22:38:03 -04:00
Julian Oes ac97b5520c commander: assume power is fine for HITL
This means that the preflight check indicator in QGC is green for HITL.
2021-05-07 22:38:03 -04:00
Julian Oes 648a21f11d commander: ignore calibration in HITL
The calibration is not found in HITL mode. Therefore, I suggest to
ignore this step and assume the calibration is fine.

This mostly fixes the preflight check indicator in QGC, arming was (for
some reason?) already possible.
2021-05-07 22:38:03 -04:00
Hamish Willee d3fd03a014 airspeed calibration: instruct to blow into front of pitot
... rather than across it
2021-05-07 21:34:53 -04:00
PX4 BuildBot e265ebabc5 Update submodule ecl to latest Thu May 6 12:39:12 UTC 2021
- ecl in PX4/Firmware (a300d32523e24df3f366a0d564b764261e1c1909): https://github.com/PX4/PX4-ECL/commit/a7b8afe420f438554ad90bcba0f1f4872325e75b
    - ecl current upstream: https://github.com/PX4/PX4-ECL/commit/29243ac5cbb5d27ac71744e88afcd786df6f748d
    - Changes: https://github.com/PX4/PX4-ECL/compare/a7b8afe420f438554ad90bcba0f1f4872325e75b...29243ac5cbb5d27ac71744e88afcd786df6f748d

    29243ac 2021-05-05 bresch - yaw_reset: reduce minimum vector length to compute yaw error
aad4840 2021-05-02 Kabir Mohammed - EKF: increase allowed difference between flow and gyro ODRs
2021-05-06 13:53:40 -04:00
Silvan Fuhrer 08dab18a8b vtol_type: in FW, set min PWM to PWM_DEFAULT_MIN instead of PWM_MOTOR_OFF
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-06 10:20:24 +02:00
benjinne 099c2d13f6 dshot: add 3D capability 2021-05-06 08:12:07 +02:00
Daniel Agar 177ee4cbca drivers/optical_flow/paw3902: properly discard samples after mode change
- respect mode 2 shutter requirements from datasheet (should not operate with Shutter < 0x01F4 in Mode 2)
 - sensor reset is handled by mode change
2021-05-05 21:48:01 -04:00
Daniel Agar b1ebd16c61 ekf2: improve selector reset handling
- handle reset count rollover (uint8_t)
 - compute full reset delta if primary estimator instance has changed or if we missed a reset
2021-05-05 21:45:13 -04:00
Alessandro Simovic d1d5eba320 follow-me: log follow_target msg 2021-05-05 16:13:50 -04:00
Alessandro Simovic 48f3bd4078 follow-me: formatting 2021-05-05 16:13:50 -04:00
Alessandro Simovic 5f19eeaaa5 follow_target: copy also velocity fields from uorb 2021-05-05 16:13:50 -04:00
Alessandro Simovic 2d6bc9b6e0 follow_target: use actual velocity measurement 2021-05-05 16:13:50 -04:00
Alessandro Simovic 5d9b3504f7 follow-target: correctly set "updated" flag 2021-05-05 16:13:50 -04:00
Alessandro Simovic f1fca0939f follow-target: name variable correctly 2021-05-05 16:13:50 -04:00
David Sidrane 3702140e24 PWMOut:Arm once all channels are initalized. 2021-05-05 20:48:06 +02:00
David Sidrane 3d166d3279 PWM:Add Channel mask to up_pwm_servo_arm & up_pwm_servo_deinit 2021-05-05 20:48:06 +02:00
David Sidrane dd4ffb3c0c PWMOut:Fix pwm status 2021-05-05 20:48:06 +02:00
David Sidrane 44cdc52ef8 PWMOut:Use rates from single instance & init all instances channels 2021-05-05 20:48:06 +02:00
Jukka Laitinen ac6e7a1c6c FlightTaskManualAltitude: Fix double->float conversion in initialization
This gives an error on some new compilers, e.g. riscv64-unknown-elf 10.2.0

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-05 09:31:07 +02:00
Jukka Laitinen 532f370e7d Fix implicit float to double conversions
The both results of ?: should be of same type, and some compilers give error
on this:
	" implicit conversion from 'float' to 'double' to match other result of conditional"

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-05 09:31:07 +02:00
Daniel Agar 3ec40a5956 collision_prevention: fix CP_GO_NO_DATA parameter type 2021-05-04 16:41:32 -04:00
Matthias Grob ee87257a8d FlightModeManager: move velocity control feedback into FlightTask
This was only handled outside because FlightTaks lived in the
multicopter position controller which produces the data that was
needed but now it doesn't make sense anymore to handle this
subscription separately.

It's better to have it inside the base task to have the data available
on task activation sucht that e.g. Altitude mode can take over smoothly
from Position mode.
2021-05-04 16:47:48 +02:00
Matthias Grob c28533677d MulticopterLandDetector: use setpoint generation to infer decend intent
For any normal use case where a downwards velocity setpoint is set
this works exactly the same as before.
E.g. autonomous landing, landing in Altitude or Position mode

The advantage is that the very common case where a vehicle tries
to hold a constant altitude but fails to do so e.g. during a hard brake
with too much lift the resulting downwards velocity was interpreted
as descend intent and since the vehicle already struggled to hold altitude
with low thrust and was not moving fast anymore because it was braking
this lead to a lot more false positives on certain vehicle types.

The disadvantage is that not setting a downwards velocity setpoint but
just moving the position setpoint into the ground does not result in
land detection anymore. We do not use this method of landing anymore for
quite a while. It's not recommended and I wonder if there's some rare use
case like offboard where this is done.

We could add an additional case for the specific case to land with a
position setpoint only.
2021-05-04 16:43:33 +02:00
Matthias Grob 2e292abfff MulticopterLandDetector: Make land detection time configurable
The tree stages used arbitrary 350, 250 300ms totally 900ms
So this changes it to each stage to a third of the parameter.
Default it is 1 second -> 333ms per stage.
2021-05-04 16:43:33 +02:00
RomanBapst 269ce07cb5 land detector: log more states in order to facilitate debugging ground contact state
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-04 16:43:33 +02:00
Jari Nippula 04b7ee43bc protocol_splitter: Sp2Header defined as union (#17511)
Aligned with agent_protocol_splitter to make byte access easier
for checksum generation

Co-authored-by: Nuno Marques <n.marques21@hotmail.com>
2021-05-04 10:09:24 +02:00
RomanBapst cd4378b8c6 vtol: init boolean consistently
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-03 18:58:26 -04:00
Thomas ab10e68a40 update Quadchute trigger from mavlink PR 1569 2021-05-03 21:44:27 +03:00
Thomas bf9758247b add VEHICLE_VTOL_STATE_QC and remove hardcoding 2021-05-03 21:44:27 +03:00
Thomas d3ddbe8db5 Allow quadchute from external command 2021-05-03 21:44:27 +03:00
Peter van der Perk ecc5154a44 Reflect dynamically allocate block pointers instead of using heap 2021-05-03 14:04:02 -04:00
Silvan Fuhrer 2c6b3eeb02 Navigator: NAV_CMD_DO_VTOL_TRANSITION: accept once in correct vtol state
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-03 08:40:54 +02:00
Silvan Fuhrer 5579a1d789 Navigator: remove WORK_ITEM_TYPE_CMD_BEFORE_MOVE
It was used to make the vehicle needing to accept the waypoint after a VTOL transition in the new VTOL mode

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-03 08:40:54 +02:00
Silvan Fuhrer 3c4b0c1b8c tiltrotor: only allow increasing tilt during first part of transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-02 21:51:09 -04:00
Jukka Laitinen fa9fdce6e6 sensors/vehicle_gps_position: Fix raw_dt and present_dt calculation in gps_blending
If the GPS data is passed from companion computer, there may be inaccuracies
with timesync. This may cause time deltas to overflow.

Make the time delta calculation using floats directly, wich results in negative
numbers in case there are such inaccuracies.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-02 13:59:50 -04:00
Daniel Agar e78a4287f9 parameters: attempt import multiple times 2021-05-02 13:48:16 -04:00
Daniel Agar feebb24106 logger: skip multi-EKF logging if CONSTRAINED_MEMORY 2021-05-02 13:47:28 -04:00
Femtomes 783a780207 drivers/gps: add femtomes gps driver protocol 2021-05-02 13:46:39 -04:00
Julian Oes abee13df1a mavlink: improve rx stats printf 2021-05-02 13:45:39 -04:00
Julian Oes d96ba2d88a mavlink: use 4s for HITL
This is more inline with SITL.
2021-05-02 13:45:39 -04:00
Julian Oes e9a1599355 mavlink: clang-tidy fix 2021-05-02 13:45:39 -04:00
Julian Oes aa0752ad86 mavlink: fix pthread usage 2021-05-02 13:45:39 -04:00
Julian Oes 5784f1d951 mavlink: add detailed stats about rx messages 2021-05-02 13:45:39 -04:00
Julian Oes 370d9ee409 mavlink: use px4::atomic instead of volatile 2021-05-02 13:45:39 -04:00
Julian Oes 4498509426 mavlink: move thread handling into MavlinkReceiver
In my opinion this makes it much cleaner and will allow mavlink main to
directly call the receiver.
2021-05-02 13:45:39 -04:00
Julian Oes 71bd35fcaa mavlink: keep track of seq for any component
Instead of only keeping track of the sequence ID of specific "supported"
components, we now keep track of any sysid/compid of an incoming
message. Before this change, unknown components (such as jMAVSim) would
completely screw up the mavlink message stats and create confusion (at
least in my case).

With this change we currently keep track of up to 8 other components.
Once we reach the limit, we will print a warning.
2021-05-02 13:45:39 -04:00
Julian Oes 6ae23e7b7b mavlink: fix HITL battery status publication
Without these fields the pre-arm check would complain and fail.

Also, the voltage is adjusted to be at around 70% rather than 30% which
would almost start to trigger warnings.
2021-05-02 13:45:39 -04:00
Julian Oes cfcc074e9d mavlink: remove unused methods 2021-05-02 13:45:39 -04:00