27630 Commits

Author SHA1 Message Date
bresch
d579fb540c ekf2-terrain: do not consider negative hagl as valid 2024-10-30 12:14:43 -04:00
Alex Klimaj
4d1c65d722
boards: new ARK FPV FC (#23830)
* add new payload power switch (RC_MAP_PAY_SW)
2024-10-30 11:35:35 -04:00
Julian Oes
6509e70306 gimbal: fix device flags for RC gimbals 2024-10-30 07:30:29 +01:00
Julian Oes
c0c412570d gimbal: Fix deg/rad for angular rates
The command is in degrees, but the rest in radians.

Also, set roll to NAN, rather than 0 when not set.
2024-10-30 07:30:29 +01:00
Julian Oes
55ec6df751 gimbal: Add test command for angle rates
This is handy to test angular rate input, not just angles.
2024-10-30 07:30:29 +01:00
Michael Schaeuble
22950a94ec Override vehicle attitude send to gimbals when HIL mode is enabled
The simulated attitude can disturb the gimbal estimator and lead to strange behavior of the gimbal. So, since the hardware is not moving in HIL/SIH, we fake a static attitude towards the gimbal.
2024-10-30 15:25:05 +13:00
Matthias Grob
219c9d6cb9 gimbal: handle angular_velocity setpoint stream timeout
The gimbal would otherwise continue to spin with whatever velocity was commanded
before the input connection was lost.
2024-10-30 15:12:08 +13:00
Matthias Grob
2bccb20ee6 gimbal: introduce timestamp of last setpoint update
To enable implementing a timeout when there's no new setpoint coming in.
2024-10-30 15:12:08 +13:00
Matthias Grob
d5f3e858e8 gimbal: refactor outputs to take current timestamp at the beginning 2024-10-30 15:12:08 +13:00
chfriedrich98
a3a83c718a
mecanum: add cruise control for position mode (#23834) 2024-10-29 16:43:42 +01:00
Matthias Grob
cac0133901 FlightTaskDescned: fix horizontal acceleration overriding vertical one
Also descend with more acceleration again to avoid the risk of ascending instead of descending because of a wrong hover thrust estimate.
2024-10-25 14:06:00 +02:00
Silvan Fuhrer
5a53190ed5 FW Position Control: handle invalid z or vz measurement in case of nav_state DESCEND
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-10-25 14:06:00 +02:00
Silvan Fuhrer
c342f9baf7 Commander: remove mode_req_local_alt requirement from DESCEND
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-10-25 14:06:00 +02:00
Matthias Grob
37190d4928 navigator: refactor naming of break instead of brake functions 2024-10-25 13:56:20 +02:00
Matthias Grob
b8a602414d navigator land: don't project VTOL braking waypoint without global position 2024-10-25 13:56:20 +02:00
Silvan Fuhrer
b6eb8dbfd9 Navigator: land: set lat/lon fields of triplet to NAN if global position is not valid
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-10-25 13:56:20 +02:00
Silvan Fuhrer
3b0dac6840
RTL: fix RTL time estimation (#23807)
* RTL Direct: fix rlt time prediction in final lanidng phase

It was previously checking if RTL was already running through
active(), which though actually is coming from the mission mode
that rtl_direct inherits from.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL Direct: remove unnecessary active() check

As the method setRtlPosition() is anyway not called when RTL is active,
plus it checks the wrong thing, as it is the active() method from
the Mission mode.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL Direct: remove unnecessary land_detector_sub.update()

It is already getting updated just before the .get()

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL time estiate: do not distinguish land from sink for MC

To avoid rtl time prediction jump when entering LAND phase due
to no correct handling of loiter altitude (LAND phase doesn't
have to start only when lower then RTL_DESCND_ALT).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* Revert "RTL Direct: remove unnecessary active() check"

This reverts commit d5165ba902e65839e792cc13197761c7f77748f9.

* Revert "RTL Direct: fix rlt time prediction in final lanidng phase"

This reverts commit 5af7c928fbf86d560dcd35dd9aea3e38f1e4c735.

* RTL: Make sure to call the initialilze function of the Navigator RTL modes

* RTL: use the navigator_mode run function instead of the on_xxx function directly

* RTL: Make sure that for vtol the right vehicle type is used for each RTL state

* RTL: move to loiter distance estimate should substract the loiter radius for fixed wing

* RTL: time prediction: do not assume VTOL is in FW at start of RTL

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL: time estimation: fix is_in_climbing_submode

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL: time estimation: subtract loiter radius from distance in rtl_direct_mission_land

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL direct: poll important topics also on_inactive such that time estimate is correct

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* navigator rtl: fix setter spacing

* navigator rtl: check pointer before dereferencing

* RTL: only subract loiter radius when in FW

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Konrad <konrad@auterion.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2024-10-24 17:22:19 +02:00
Marco Hauswirth
0c451552c7
EKF2: add validity flags to global pos message (#23787)
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2024-10-23 10:19:04 +02:00
Hamish Willee
808153b049
COM_THROW_SPEED - arm or start motors clarification (#23822) 2024-10-23 13:13:56 +11:00
Daniel Agar
371a99c322
drivers/uavcan: subtree merge last working libuavcan (preserving history) (#23819)
- fully absorb the libuavcan submodule (renamed libdronecan to deconflict) up to our last good working commit and preserve all history (upstream libuavcan was broken and then marked deprecated)
 - fixes https://github.com/PX4/PX4-Autopilot/issues/23727
 - this puts us in a much better position to be able to evolve the library going forward ow that we have full control in tree
2024-10-17 16:20:19 -04:00
Hamish Willee
b390d5876a
AUTOPILOT.capabilities includes gimbal manager protocol bit (#23692)
* AUTOPILOT.capabilities includes gimbal manager protocol bit

Sets MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER bit in AUTOPILOT.capabilities

* mavlink: update submodule

* mavlink: only set gimbal flag if gimbal param set

We should probably only set the flag if the gimbal manager is actually
set up using the MNT_MODE_IN parameter.

* mavlink: make param optional

If the gimbal module is not built in we don't have the MNT_MODE_IN
param, so we need to deal with that.

* gazebo-classic: update submodule

---------

Co-authored-by: Julian Oes <julian@oes.ch>
2024-10-17 08:41:38 +11:00
Daniel Agar
e59cc9afeb drivers/uavcan: subtree merge last working libuavcan (preserving history)
- upstream libuavcan was broken and then marked deprecated, this fully absorbs the submodule (renamed libdronecan to deconflict) up to our last good working commit and all commit history is kept
 - fixes https://github.com/PX4/PX4-Autopilot/issues/23727 (regression introduced in #23113)
 - this puts us in a much better position to evolve the library as needed now that we have full control
2024-10-16 13:31:17 -04:00
RomanBapst
a0e6f9cd70 commander: try to fix arm authorization spamming
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-10-14 14:18:00 +03:00
Igor Mišić
b9942ad7e0 lib/mixer_module: remove unused param MOT_SLEW_MAX 2024-10-14 10:03:30 +02:00
Alexander Lerach
dbba9adb14
lib/rc/ghst: Added differentiation between GHST and CRSF (#23805) 2024-10-11 16:17:54 -04:00
vertiq-luca
8b032d58d8
actuators/vertiq_io: module.yaml switched bit: values to 0-30 instead of starting at 32 2024-10-11 13:41:29 -04:00
Julian Oes
01888a3085
mavlink: fix SET_MESSAGE_INTERVAL parsing (#23796)
This fixes the SITL tests that fail in CI because we catch NAN as non
zero after cast to int. To fix this I've added the check whether they
are finite at all.

The checks for param5 and param6 would be a bit trickier because they
can be int or float, so I have omitted them for now.
2024-10-11 09:03:22 +13:00
Silvan Fuhrer
34f65682ad Commander: remove -local- from failsafe string to make it simpler to understand
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-10-10 10:28:59 +02:00
Silvan Fuhrer
9cb12d8e8e HealthAndArmingChecks: improve messaging for position estimate failure
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-10-10 10:28:59 +02:00
Hamish Willee
da8827883f
Use target camera in image capture start/stop messages (#23115)
* Use target camera in image capture start/stop messages

* Add support for MAV_CMD_SET_CAMERA_SOURCE

* Add target ID for NAV_CMD_SET_CAMERA_MODE

* Run make format
2024-10-09 21:10:08 +13:00
Hamish Willee
66b9e60a49
MAV_CMD_SET_MESSAGE_INTERVAL reject non-zero values for unused params (#23643)
* MAV_CMD_SET_MESSAGE_INTERVAL reject non-zero values for unused params

* Remove data rate

* Replace rounding with addition of 0.5/0.5f
2024-10-09 21:08:49 +13:00
Matthias Grob
4a08ebafbc failsafe: prevent immediate low battery failsafe for existing low battery state
This happens when BAT_CRIT_THR allows arming with a critical battery level. With this change it still fails the checks but only warns instead of doing the failsafe action because that would immediately land the vehicle before it has taken off.
2024-10-08 18:49:23 +02:00
Matthias Grob
7941310afd batteryCheck: allow COM_ARM_BAT_MIN to be set lower than BAT_CRIT_THR
Which still allows to arm the vehicle even if it already has a critical battery level.
2024-10-08 18:49:23 +02:00
Matthias Grob
a5b17f14b0 batteryCheck: refactor to consistent parameter variable naming 2024-10-08 18:49:23 +02:00
Konrad
daf604b361 mavlink_mission: handle concurrent mission count messages 2024-10-08 15:34:51 +02:00
Konrad
7ec4c1419c mavlink_mission: only accept a mission request list on an ongoing transfer, when it is the same partner 2024-10-08 15:34:51 +02:00
Konrad
b51ad07ed0 mavlink_mission: do not send the mission count if a new mission is detected since a receiver can now check this by changing mission ids in the MISSION_CURRENT stream 2024-10-08 15:34:51 +02:00
Konrad
1c62dda057 mavlink_mission: make sure send mission item error ack is send to the right sysid/compid 2024-10-08 15:34:51 +02:00
Konrad
b1d52e20c6 mavlink_mission: guard incoming misison item to be from the current transfer partner 2024-10-08 15:34:51 +02:00
DanielH
ee19691d95 fix mission sysid for mission_ack 2024-10-08 15:34:51 +02:00
Silvan Fuhrer
0d31226b1c AirspeedSelector: enable sensor checks right after catapult launch
Airspeed sensor failures are crucial to catch early during catapult/hand launches,
as otherwise the large airspeed error can lead to the vehicle diving. Thus the
_in_takeoff_situation flag, which tells the validator when to enable the checks,
is already set to false when !landed and launched.
For runway takeoffs the logic in unchanged.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-10-08 13:16:17 +02:00
Alexander Lerach
936eb89edb
logger: fixed watchdog not logging, increased cycle trigger (#23769) 2024-10-08 09:53:55 +02:00
Matthias Grob
fd04ece6d4 geo: remove dependency on drv_hrt time driver 2024-10-07 14:24:18 +02:00
Daniel Agar
f971c0e617 ekf2: reduce bad acc probation time 10s->3s 2024-10-07 10:37:33 +02:00
Daniel Agar
9ddac762e3 ekf2: stricter GNSS vel rejected innovation override
- in the special case of bad vertical acceleration detected
   (bad_acc_vertical) only allow overriding rejected GNSS 3D velocity
   if horizontal innovations are accepted
2024-10-07 10:36:09 +02:00
Daniel Agar
9238656a33 ekf2: configurable velocity state constraint (EKF2_VEL_LIM)
- replace hardcoded 1000 m/s velocity state constraint with new EKF2_VEL_LIM parameter (default 100 m/s)
 - new velocity limit also used for GPS checks and external vision velocity
2024-10-07 10:35:48 +02:00
Alexander Lerach
4215e20120
modules/time_persistor: new time persistor module to save time to persistent storage (#23760) 2024-10-04 15:44:49 -04:00
Marco Hauswirth
7d0e93b779
ekf2: always publish global position when origin has been set 2024-10-04 11:41:20 -04:00
Daniel Agar
ad28c5893b flight_mode_manager: invalidate dist to bottom/ground on terrain reset
- this allows the terrain hold to simply reset on the next valid update
   rather than trying to adjust the setpoints
2024-10-04 11:28:03 -04:00
Daniel Agar
34ee097f02 ekf2: tighten terrain validity requirements
- require valid fusion from a range finder or optical flow before
   considering terrain valid again
2024-10-04 10:31:20 +02:00