-
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
UAVCAN ESCs pre-arm checks #12153
UAVCAN ESCs pre-arm checks #12153
Conversation
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
…shed. Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
9aafbdf
to
0c0acc4
Compare
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Uh apparently the CI is not happy 🤕 |
@@ -1010,6 +1010,13 @@ bool prearm_check(orb_advert_t *mavlink_log_pub, const vehicle_status_flags_s &s | |||
|
|||
} | |||
|
|||
if (!status_flags.condition_escs_valid) { |
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.
@cmic0 This will fail for any vehicle which does not support the esc_status message.
Also check CI, SITL is actually complaining about ESC not being online :-D
src/modules/commander/Commander.cpp
Outdated
// Check if ALL the ESCs are online | ||
if (online_bitmask == esc_status.esc_online_flags) { | ||
if (_last_esc_online_flags != esc_status.esc_online_flags) { | ||
mavlink_log_info(&mavlink_log_pub, "All ESCs are ready"); |
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.
@cmic0 I think we can get rid of this message. No need to tell the user what he does not need to know.
src/lib/mixer/mixer_group.cpp
Outdated
rotor_count = mixer->get_multirotor_count(); | ||
|
||
if (rotor_count > 0) { | ||
mixer = nullptr; |
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.
@cmic0 I think you can use "break"
… report status). - Added circuit breaker for disabling/enabling the logic. Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
Signed-off-by: Claudio Micheli <[email protected]>
…pr-escstatus_checks
Closing this one in favor as the cleaned-up PR #12641. |
This PR introduces a new pre-arm check aimed for vehicles running UAVCAN ESCs.
Each actuator is monitored through a status flag introduced in the
esc_status
message:If an ESC does not provide any data within a timeout threshold then is considered offline.
During pre-arm checks, if one or more motors are offline a warning message is published and arming is denied.
The feature is enabled by setting the
COM_ACT_COUNT
to the number of UAVCAN actuators.Test data / coverage
Tested on a vehicle running Zubax Myxa ESCs. Reporting below the warning message that is triggered. In this case ESC3 and ESC2 were disconnected.
Describe possible alternatives
Actually the solution could be improved by taking the
number of motors
information from the mixer and use a circuit breaker for enabling/disabling the pre-arm check. Adding the parameter was the MVP solution for getting the pre-arm check to work.Update 07/26:
Did some logic refactoring and got rid of
COM_ACT_COUNT
parameter.Now the number of rotors is obtained through the mixer at boot.
Screenshot of bench testing:
Logs:
https://logs.px4.io/plot_app?log=6bfacd4a-9b37-413c-a333-8618dff6f3fc
The PR is now in a good shape. Only thing I am thinking that maybe is worth to add is a circuit breaker for disabling the feature?
@dagar @MaEtUgR FYI