-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commander datalinks lost failsafe handing #11550
Conversation
I now reviewed #11454, honstely it's a bit overwhelming how many changes are proposed at the same time. Part of it is probably duplicate because it's just what the other pr contains. Changing the base branch of the pr would probably help a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/modules/commander/Commander.cpp
Outdated
} else { | ||
mavlink_log_critical(&mavlink_log_pub, "ACTIVATING AVAILABLE HIGH LATENCY LINK"); | ||
if (_datalink_last_status_avoidance_system == telemetry_status_s::MAV_STATE_CRITICAL) { | ||
mavlink_log_info(&mavlink_log_pub, "AVOIDANCE SYSTEM TIMEOUT"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep this mavlink_log_critical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have had an offline talk with @baumanta about avoidance timeouts..
We came to the conclusion that a time out is less important than an avoidance loss, thus I opted for removing the warning (which I find annoying in QGC in terms of UX), and replaced with an info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the vehicle starts loitering when there is a timeout https://github.com/PX4/avoidance/blob/master/local_planner/src/nodes/local_planner_node_main.cpp#L75-L76
The pilot should be informed on why that's happening clearly. Since critical warning are also audible I would prefer to have it critical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok it leave it as an info. The timeout state is something very temporary and in most cases only perists over a fraction of a second. The point in time when a timeout is triggered is also somewhat random, as it can be tuned through a parameter in the avoidance repo. And if the sensor data is not recovered in a few seconds the planner will send abort anyway and you will see that as a critical message.
Totally agree, I think that this should be the starting point as @baumanta commits are required to tests onboard controller lost/avoidance lost. The vehicle_status_flag message modification can be handled in next PRs and then #11456 can be adapted on top of that. |
Rebased on latest upstream. |
ok, just as a general hint it's easier to have iterations when making big changes. #11454 is already quite big to review and it's clear that you need your adjustments for testing but try to avoid loading more and more changes in the pr you like to get merged since it will take longer to be reviewed, tested, rebased and it all gets slower in the end. |
@MaEtUgR we want to bring this in now. Do you have objections on the changes that claudio added on top of #11454 @cmic0 I see some open review comments from @MaEtUgR in #11454 ? Did you adress @MaEtUgR s reciew comments that he made in #11454 here? Please point that out to him by commenting to his comments with e.g. "fixed in [commit link]" |
@thomasgubler not yet, some of them are related on the general behavior (and not strictly related to the datalink failsafe handling) thus I preferred not to take actions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed, and remarked what I found.
Major changes: - Prevent "HIGH LATENCY DATA LINK LOST" message to appear if iridium telemetry is not used. - Prevent "DATA LINK LOSS" mavlink messages flooding when QGC is open and then closed. - Changed "DATA LINK REGAINED" condition (use _datalink_last_heartbeat_gcs insthead of _datalink_lost) Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Added COM_ONB_LOSS_T and COM_ONB_REG_T parameters to specify thresholds that triggers "onboard link lost" and "onboard link regained". Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
… if not enabled. Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Since commander handles all telemetry_status the same there is no need to subscribe to multiple instances. Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Since Timeout from onboard controller is something that does not require a lot of modifications there is no sense to having it parametrized. Signed-off-by: Claudio Micheli <claudio@auterion.com>
Signed-off-by: Claudio Micheli <claudio@auterion.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and fixed some additional problems.
Thanks for everyone's work.
Merging this now to unblock further work.
This PR takes over the original one #11454.
In order to test the original PR some fixes have been added here.
Tests
The above points have been tested in SITL.
The fixes performed in this PR prevent mavlink messages flooding when you lose ONBOARD Controller:
After the fix:
NEXT STEPS
REMARKS
At the moment NAV_DLL_ACT and NAV_RCL_ACT are brought into
commander_params.c
but still has the old naming convention.@dagar @MaEtUgR @mrivi FYI