Skip to content

Commit

Permalink
feat(system_error_monitor): add ignore hartbeat timeout in initializi…
Browse files Browse the repository at this point in the history
…ng state (#972)

* add ignore hartbeat timeout in initializing state

Signed-off-by: asa-naki <[email protected]>

* fix typo

* Update comment

* ci(pre-commit): autofix

* fix typo

* ci(pre-commit): autofix

* update comment

* ci(pre-commit): autofix

---------

Signed-off-by: asa-naki <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
asa-naki and pre-commit-ci[bot] committed Aug 14, 2024
1 parent 0b7fae2 commit a629572
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion system/system_error_monitor/src/system_error_monitor_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,16 @@ void AutowareErrorMonitor::onTimer()
}
return;
}

// Heartbeat in AutowareState,diag_array times out during AutowareState INITIALIZING due to high
// processing load,add a disable function to avoid Emergencies in isDataHeartbeatTimeout() in
// AutowareState INITIALIZING.
if (isDataHeartbeatTimeout()) {
if ((autoware_state_->state == autoware_auto_system_msgs::msg::AutowareState::INITIALIZING)) {
RCLCPP_WARN_THROTTLE(
get_logger(), *get_clock(), std::chrono::milliseconds(1000).count(),
"ignore heartbeat timeout in initializing state");
return;
}
updateTimeoutHazardStatus();
publishHazardStatus(hazard_status_);
return;
Expand Down

0 comments on commit a629572

Please sign in to comment.