@@ -27,8 +27,6 @@ Converter::Converter(const rclcpp::NodeOptions & options) : Node("converter", op
27
27
sub_graph_.register_create_callback (std::bind (&Converter::on_create, this , _1));
28
28
sub_graph_.register_update_callback (std::bind (&Converter::on_update, this , _1));
29
29
sub_graph_.subscribe (*this , 1 );
30
-
31
- report_only_diag_ = declare_parameter<bool >(" report_only_diag" , false );
32
30
}
33
31
34
32
void Converter::on_create (DiagGraph::ConstSharedPtr graph)
@@ -95,7 +93,7 @@ void Converter::on_update(DiagGraph::ConstSharedPtr graph)
95
93
const auto get_hazards_vector = [](HazardStatus & status, HazardLevel level) {
96
94
if (level == HazardStatus::SINGLE_POINT_FAULT) return &status.diag_single_point_fault ;
97
95
if (level == HazardStatus::LATENT_FAULT) return &status.diag_latent_fault ;
98
- if (level == HazardStatus::SAFE_FAULT) return &status.diag_latent_fault ;
96
+ if (level == HazardStatus::SAFE_FAULT) return &status.diag_safe_fault ;
99
97
if (level == HazardStatus::NO_FAULT) return &status.diag_no_fault ;
100
98
return static_cast <std::vector<DiagnosticStatus> *>(nullptr );
101
99
};
@@ -109,7 +107,6 @@ void Converter::on_update(DiagGraph::ConstSharedPtr graph)
109
107
HazardStatusStamped hazard;
110
108
for (const auto & unit : graph->units ()) {
111
109
if (unit->path ().empty ()) continue ;
112
- if (report_only_diag_ && unit->type () != " diag" ) continue ;
113
110
const bool is_auto_tree = auto_mode_tree_.count (unit);
114
111
const auto root_level = is_auto_tree ? auto_mode_root_->level () : DiagnosticStatus::OK;
115
112
const auto unit_level = unit->level ();
0 commit comments