578 Commits

Author SHA1 Message Date
Matthias Grob
7fe78e184e Rename force_failsafe to termination for clarity 2025-07-25 13:01:25 -06:00
Matthias Grob
34dacffc4a Commander: shell command commander termination instead of lockdown on for clarity 2025-07-25 13:01:25 -06:00
Pedro Roque
e14eea5615
feat: BlueROV2 Heavy updated control (attitude and position) and model (#25052)
* rft: clean merge to PX4

* fix: formatting

* fix: extra line

* fix: moved submarine out of "is_ground_vehicle", added proper check for center-throttle

* feat: updated gazebo models to include bluerov update

* fix: use 'is_uuv_vehicle', remove FW_MM/LLC from uuv build

* fix: added saturation to thrust and torque messages via param

* doc: updated parameters documentation for uuv

* fix: formatting

* feat: matching hardware reference

* fix: thrusters kg

* rft: removed commented lines

* fix: update gz reference given hw setup

* fix: hardware references

* fix: recommendations

* fix: updated settings to match hardware

* rft: check only for fixed and rotary wing for high throttle

Co-authored-by: Daniel Agar <daniel@agar.ca>

* fix: commit oupsie

* fix: format

* rft: remove is_uuv

* fix: hw parameters, uuv build target for v6x

* feat: added support for D-pad attitude changes in stabilized position control

* fix: position setpoint update and parametrized trajectory age and att change

* fix: format

* fix: removed duplicated call to check_validity_setpoint

* fix: setpoint update on arming logic

* fix: setpoint initialization for stabilized mode

---------

Co-authored-by: Daniel Agar <daniel@agar.ca>
2025-07-23 10:29:22 -07:00
Matthias Grob
6c5c88f72e Commander: only trigger MAVLink parachute on termination
This can now be tested using the new termination RC switch.
2025-07-23 11:13:11 +02:00
Matthias Grob
52e8a0a0db Add RC termination switch 2025-07-23 11:13:11 +02:00
Julian Oes
2c97a875bf commander/mavlink: use home attitude, not only yaw
According to the mavlink spec we should be publishing the home attitude
as a quaternion rather than just the yaw/heading.

Additionally, this allows setting the landing roll and pitch angle using
DO_SET_HOME (this yet needs to go into the MAVLink spec though).

This time including the message versioning and translation.
2025-07-20 07:51:14 +12:00
Beat Küng
f0ecd9e757 fix commander: set failsafe action state immediately after failsafe update
There was a race condition: for example when an external mode disabled
failsafe deferring, that then triggered a failsafe, while the mode executor
immediately sends a command (to e.g. switch modes).
In that case the failsafe got triggered but the mode switch was still
allowed.
This was because of the processing ordering:
- mode updates (and propagating the failsafe_action_active state)
- failsafe updates
- command handling

This patch makes sure failsafe_action_active is set immediately after
updating the failsafes.
2025-07-15 17:18:54 +02:00
Silvan Fuhrer
35a3f519f2 Revert "commander: publish full home attitude, not only yaw (#19717)"
This reverts commit 6855aa57c4879bb5c67298f3ce1f738118fbafa0.
2025-07-15 09:24:55 +02:00
Silvan Fuhrer
bdf1895145 Commander: on completion of takeoff, force state transition to Loiter
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-07-14 14:29:59 +02:00
Julian Oes
6855aa57c4
commander: publish full home attitude, not only yaw (#19717)
According to the mavlink spec we should be publishing the home attitude
as a quaternion rather than just the yaw/heading.

Additionally, this allows setting the landing roll and pitch angle using
DO_SET_HOME (this yet needs to go into the MAVLink spec though).
2025-07-09 14:43:31 -08:00
Julian Oes
e46e4dc80e commander: prevent race condition after mission
When a mission finishes with an RTL command, there's a race condition
between:
1. RTL command setting user_mode_intention RTL
2. Mission completion logic forcing LOITER

The auto-loiter transition was checking current nav_state (which is
still AUTO_MISSION) instead of any pending user_mode_intention,
causing it to override the RTL request.

Fix: Only auto-transition to loiter if no mode change is already
pending.
2025-06-30 09:20:44 -07:00
Marco Hauswirth
6604c52c98
Commander: Adjust home position altitude after GNSS altitude correction (#25003)
Within the first 2min of a flight, check if the integrated GNSS vertical velocity and the baro
measurements disagree with the reported GNSS altitude, and in that case update the 
set home position altitude to cancel out GNSS altitude drift.

* prevent re-init when reaching negative altitudes

* only allow correction during the first 120 second after takeoff

* add dependency to COM_HOME_EN parameter. reset vel-integral for multiple takeoffs
2025-06-18 13:26:45 +02:00
Pedro Roque
6d15019717
feat: spacecraft tooling for commander and VehicleStatus (#24716)
* feat: spacecraft tooling for commander and VehicleStatus

* fix: format

* fix: remove iostream

* feat: mavlink compliant spacecraft definition

* feat: add orbiter to define

feat: spacecraft tooling for commander and VehicleStatus

fix: format

fix: remove iostream

feat: mavlink compliant spacecraft definition

* feat: add orbiter to define

* feat: update mavlink to latest

* fix: get away without specifying spacecraft vehicle

* fix: removed unnecessary definition

* fix: format
2025-06-12 21:48:48 +02:00
Mahima Yoga
c9658f28e9
commander: use existing class state to track mission progress (#24947)
Replaced the local variable landed_amid_mission with the class member _mission_in_progress for consistency and to reduce redundancy.
No functional change.
2025-06-09 18:17:13 -08:00
Mahima Yoga
2110da73ad
Commander: don't reset Home position if landed during a (uncompleted) mission. (#24902) 2025-06-02 10:50:03 +02:00
Silvan Fuhrer
d857a278ff Commander: use is_ground_vehicle() consistently instead of checking vehicle_type
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-03-04 12:15:01 +00:00
Silvan Fuhrer
7cb6464cfb VehicleStatus.msg: remove VEHICLE_TYPE_UNKNOWN
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-03-04 12:15:01 +00:00
bresch
2d1652f499 Commander: fix parachute trigger
Setting "lockdown" disables the actuators. In this mode,
"force_failsafe" has no effect as the actuators are disabled, so the
parachute is not getting released as it requires the output to change to
its failsafe value.
2025-03-03 15:41:39 +01:00
Sebastian Domoszlai
b5f37c9fa6
Simplify Battery-related Enum Naming (#24265)
* Simplify battery-related enum naming

* Fix mistakenly removed string in enum names

* Fix missing renamings

* Update outdated file

* msg: Increase battery_status version since the enum naming was changed

* Revert message version increase

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2025-02-28 11:42:40 -09:00
Silvan
14941bc270 Commander: handle mode change rejection the same for RC and MAVLink
Previously, when requesting a mode switch to Position without a valid
position estimate through an RC button, the mode change to Position mode
was not rejected if COM_POSCTL_NAVL was set to 1 and instead the system
switched to Altitude mode.
If the mode request instead came in through MAVLink it was rejected.
This commit aligns the two ways of changing a flight mode.

Signed-off-by: Silvan <silvan@auterion.com>
2025-02-28 14:22:36 +01:00
Silvan
1f2dba68d2 remove avoidance library and logic
Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
Hamish Willee
9e5cfa330a Commander: Quick calibration supports mag too 2025-02-04 21:58:03 -05:00
Matthias Grob
5e2848312d Commander: start timer for auto disarm after spoolup 2025-01-14 14:55:34 +01:00
Beat Küng
aca5a70964 standard_modes: add vehicle-type specific standard modes
See https://mavlink.io/en/messages/development.html#MAV_STANDARD_MODE.
The only standard mode that is not set is MAV_STANDARD_MODE_SAFE_RECOVERY,
as PX4 uses RTL for that (with configuration parameters).
2024-12-18 07:12:36 +01:00
Beat Küng
be300b767d commander: ensure health report is always sent out before failsafe notificaation
As the failsafe message can reference the health report, the health report
needs to be sent out first. This is generally the case, except there is a
rate limiter set to 2 seconds. So if the report changes quickly, it is
sent out delayed (potentially after the failsafe report).
2024-11-21 14:16:22 +01:00
Matthias Grob
044d13635d Commander: Change user facing messages to "Remote ID" instead of "OpenDroneID"
Apprently users reference the system like that and OpenDroneID
might already be too technical, less understandable to some.
2024-11-21 11:38:23 +01:00
Matthias Grob
651552c9b8 Commander: avoid automatic type deduction where neither the type is obvious nor it helps with readability 2024-11-12 21:21:40 -05: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
Daniel Agar
332b7bec27 commander: ignore REQUEST_CAMERA_INFORMATION
- add answer command logging
2024-09-27 10:33:37 -07:00
BazookaJoe1900
4d83badba1
fix files tags on the header comments (#23564) 2024-09-19 09:25:18 +03:00
Matthias Grob
e4d25df58a Consistently use "stick gesture" for "rc stick gesture" 2024-09-05 18:06:29 +02:00
Silvan Fuhrer
8eaf93468e Commander: feedback string for arming/disarming: make clear when from gesture
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer
d967cdbb48 Manual control: rename SOURCE_RC_STICK_GESTURE to SOURCE_MANUAL_CONTROL_GESTURE
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer
81cf6a736d
Commander: add VEHICLE_CMD_EXTERNAL_POSITION_ESTIMATE to list of externaly handled commands (#23642)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 11:20:39 +02:00
Silvan Fuhrer
6fa6360aef
Commander: always allow to switch to LAND mode (#23580)
Special handling for LAND mode: always allow to switch into it such that if used
as emergency mode it is always available. When triggering it the user generally wants
the vehicle to descend immediately, and if that means to switch to DESCEND it is fine.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-03 18:10:37 +02:00
Ramon Roche
54f7b58007 Commander: lock down mav sys and comp id
- keeps them as local params at init
- only allow to set at init
2024-08-23 11:19:25 -04:00
Matthias Grob
edcda80cb9
Commander: adhere to parameter naming convention (#23466) 2024-07-30 14:27:27 +02:00
Jukka Laitinen
6435e25929 commander: Use PX4_STACK_ADJUSTED to increase stack for 64-bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-29 08:11:54 +02:00
Igor Mišić
61ca65d863 mavlink: use high_latency_data_link_lost as backup to normal data_link 2024-04-25 08:23:32 +02:00
Igor Mišić
4f8de500af iridiumsbd: update logic for detecting if the modem is not responsive 2024-04-25 08:23:32 +02:00
Igor Mišić
de23c10b68 commander: improve handling high latency link lost/regain 2024-04-25 08:23:32 +02:00
Igor Mišić
df2cc4af05 commander: fix check for availability of high latency link
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-04-25 08:23:32 +02:00
Silvan Fuhrer
6e15dd5328 Commander: trigger warning when arming denied due to check failure
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-03-15 09:34:11 +01:00
Eric Katzfey
ae947513d7
add load_mon support for Qurt platform (#22883)
- Added check in commander to see if CPU load monitoring has been disabled before signalling overload
2024-03-13 21:33:58 -04:00
Beat Küng
c78389a855 commander: send ack for VEHICLE_CMD_DO_SET_ACTUATOR 2024-02-02 09:38:28 -05:00
Peter van der Perk
84093a07a2 reboot: Add reboot to ISP option 2024-01-04 11:17:16 -05:00
Matthias Grob
ef0926d64b Commander: add position slow mode 2023-12-08 21:17:59 +01:00
Konrad
36f0c0f0bf mavlink-mission: Add support for opaque ids and replace update counter with it 2023-11-29 11:10:40 -05:00
Konrad
a92e7a8796 missionResult: remove unnecessary constants and rename instance_count to mission_update_counter 2023-11-24 08:11:41 +01:00
Matthias Grob
ead16d0e6c Commander: add parameter to disallow disarming in manual thrust modes 2023-11-17 09:53:56 +01:00