Skip to content

Conversation

eyeam3
Copy link
Contributor

@eyeam3 eyeam3 commented Jul 14, 2025

Some modes should only be run within the context of a mode executor and the user should not be able to select them in the GCS.

With this change, the external component registration request can be used to set if a mode is selectable or not.

@eyeam3 eyeam3 requested a review from bkueng July 14, 2025 12:23
@bkueng bkueng force-pushed the mission_execution branch 2 times, most recently from 9878780 to 91bc5f5 Compare August 5, 2025 09:06
bkueng added 3 commits August 5, 2025 11:27
- allow to disable the health check watchdog timer (useful when debugging
  unit tests)
- allow to override sendCommandSync (so it can be mocked in unit tests)
- allow to skip message compatibility check in mode executor
- fake registration: set mode name
@bkueng bkueng force-pushed the mission_execution branch from 656cd92 to 11aeacb Compare August 5, 2025 09:27
bkueng and others added 10 commits August 5, 2025 11:55
…ivate actions

This is to make sure that actions using timers or other events cannot use
it anymore.
This is mostly a safeguard as actions get deactivated and can prevent it
on their own.
Allows actions to detect when being resumed to restore the correct state.
This is to ensure that if an action calls on_completed() after an abort
happended or the mission was deactivated (e.g. from a timer), the mission
is not continued.
It is EOL and the build is failing
@bkueng bkueng force-pushed the mission_execution branch from 11aeacb to 968d47b Compare August 5, 2025 09:56
@bkueng bkueng force-pushed the mode-not-user-selectable branch from 9d222ba to ac6367d Compare August 6, 2025 12:53
@eyeam3 eyeam3 changed the title Mode onfiguration to make a mode not user selectable Mode configuration to make a mode not user selectable Aug 6, 2025
bkueng and others added 7 commits August 21, 2025 10:44
… false

Might happen in case a new message got added, and PX4 is older.
when using multiple modes and/or executors, as the check takes a bit of
time.
It can become invalid when DDS messages do not get through to PX4 or are
too much delayed, thus flagged as unresponsive by PX4,
while other modes are still registered.
See code comment for explanation
This is in order to have deterministic behavior.
In particular, if there are multiple modes (with executor), the
(de)activation callback order was not determined with multiple status
subscriptions. This can be surprising and leading to different outcomes
depending on the order.
For example this happens in case there is a mission executor with a custom
mode, and the custom mode is running. When the user switches into another
mode, the deactivation of the mode and the mission are called at the same
time (with the same topic update).
This happens now in the order of how the mission executor and mode are
instantiated on startup.
@bkueng bkueng force-pushed the mode-not-user-selectable branch from ac6367d to 03250b5 Compare September 2, 2025 11:09
@bkueng bkueng force-pushed the mission_execution branch 4 times, most recently from bd33c24 to afd89b0 Compare September 10, 2025 11:50
Base automatically changed from mission_execution to main September 12, 2025 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants