diff --git a/system/system_error_monitor/config/system_error_monitor.param.yaml b/system/system_error_monitor/config/system_error_monitor.param.yaml index 282c3b919867b..722eb943bc7d1 100644 --- a/system/system_error_monitor/config/system_error_monitor.param.yaml +++ b/system/system_error_monitor/config/system_error_monitor.param.yaml @@ -41,6 +41,15 @@ /autoware/vehicle/node_alive_monitoring: default + manual_control: + /autoware/control/control_command_gate/node_alive_monitoring: default + /autoware/control/autonomous_emergency_braking/performance_monitoring/emergency_stop: { sf_at: "none", lf_at: "warn", spf_at: "error", auto_recovery: "false"} + + /autoware/system/node_alive_monitoring: default + /autoware/system/emergency_stop_operation: default + + /autoware/vehicle/node_alive_monitoring: default + external_control: /autoware/control/control_command_gate/node_alive_monitoring: default /autoware/control/autonomous_emergency_braking/performance_monitoring/emergency_stop: { sf_at: "none", lf_at: "warn", spf_at: "error", auto_recovery: "false"} diff --git a/system/system_error_monitor/config/system_error_monitor.planning_simulation.param.yaml b/system/system_error_monitor/config/system_error_monitor.planning_simulation.param.yaml index 271555d1d1dc8..db71ffe5c0c90 100644 --- a/system/system_error_monitor/config/system_error_monitor.planning_simulation.param.yaml +++ b/system/system_error_monitor/config/system_error_monitor.planning_simulation.param.yaml @@ -41,6 +41,16 @@ /autoware/vehicle/node_alive_monitoring: default + manual_control: + /autoware/control/control_command_gate/node_alive_monitoring: default + /autoware/control/autonomous_emergency_braking/performance_monitoring/emergency_stop: { sf_at: "none", lf_at: "warn", spf_at: "error", auto_recovery: "false"} + /autoware/control/external_control/external_command_selector/node_alive_monitoring: default + + /autoware/system/node_alive_monitoring: default + /autoware/system/emergency_stop_operation: default + + /autoware/vehicle/node_alive_monitoring: default + external_control: /autoware/control/control_command_gate/node_alive_monitoring: default /autoware/control/autonomous_emergency_braking/performance_monitoring/emergency_stop: { sf_at: "none", lf_at: "warn", spf_at: "error", auto_recovery: "false"} diff --git a/system/system_error_monitor/include/system_error_monitor/system_error_monitor_core.hpp b/system/system_error_monitor/include/system_error_monitor/system_error_monitor_core.hpp index dc54b25d8e54b..a77462f9c8a30 100644 --- a/system/system_error_monitor/include/system_error_monitor/system_error_monitor_core.hpp +++ b/system/system_error_monitor/include/system_error_monitor/system_error_monitor_core.hpp @@ -56,6 +56,7 @@ struct KeyName { static constexpr const char * autonomous_driving = "autonomous_driving"; static constexpr const char * external_control = "external_control"; + static constexpr const char * manual_control = "manual_control"; }; class AutowareErrorMonitor : public rclcpp::Node diff --git a/system/system_error_monitor/src/system_error_monitor_core.cpp b/system/system_error_monitor/src/system_error_monitor_core.cpp index d6cc771e5dbd2..8db37d6d62488 100644 --- a/system/system_error_monitor/src/system_error_monitor_core.cpp +++ b/system/system_error_monitor/src/system_error_monitor_core.cpp @@ -232,6 +232,7 @@ AutowareErrorMonitor::AutowareErrorMonitor() loadRequiredModules(KeyName::autonomous_driving); loadRequiredModules(KeyName::external_control); + loadRequiredModules(KeyName::manual_control); using std::placeholders::_1; using std::placeholders::_2; @@ -460,6 +461,11 @@ void AutowareErrorMonitor::onTimer() current_mode_ = current_gate_mode_->data == tier4_control_msgs::msg::GateMode::AUTO ? KeyName::autonomous_driving : KeyName::external_control; + if ( + current_gate_mode_->data == tier4_control_msgs::msg::GateMode::AUTO && + control_mode_->mode == autoware_auto_vehicle_msgs::msg::ControlModeReport::MANUAL) { + current_mode_ = KeyName::manual_control; + } updateHazardStatus(); publishHazardStatus(hazard_status_);