Skip to content

Commit 7ceb4e4

Browse files
authored
Tmp/revert pr 1725 (#1817)
* Revert "report safe fault as latent fault" This reverts commit bfacb16. * Revert "fix" This reverts commit 76fd57d. * Revert "also report latent fault" This reverts commit ff2b3c3. * Revert "implement safe fault handling for hazard status converter" This reverts commit 08a64be.
1 parent 192c083 commit 7ceb4e4

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

launch/tier4_system_launch/launch/system.launch.xml

+1-6
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
<arg name="launch_rqt_robot_monitor" default="false"/>
4040
<arg name="launch_rqt_runtime_monitor_err" default="false"/>
4141

42-
<!-- Hazard Status Converter -->
43-
<arg name="report_only_diag" default="false"/>
44-
4542
<group>
4643
<push-ros-namespace namespace="/system"/>
4744

@@ -123,9 +120,7 @@
123120

124121
<!-- Hazard Status Converter -->
125122
<group unless="$(var use_emergency_handler)">
126-
<include file="$(find-pkg-share hazard_status_converter)/launch/hazard_status_converter.launch.xml">
127-
<arg name="report_only_diag" value="$(var report_only_diag)"/>
128-
</include>
123+
<include file="$(find-pkg-share hazard_status_converter)/launch/hazard_status_converter.launch.xml"/>
129124
</group>
130125

131126
<!-- MRM Handler -->
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<launch>
2-
<arg name="report_only_diag" default="false"/>
32
<node pkg="hazard_status_converter" exec="converter" name="hazard_status_converter">
43
<remap from="~/diagnostics_graph" to="/diagnostics_graph"/>
54
<remap from="~/hazard_status" to="/system/emergency/hazard_status"/>
6-
<param name="report_only_diag" value="$(var report_only_diag)"/>
75
</node>
86
</launch>

system/hazard_status_converter/src/converter.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Converter::Converter(const rclcpp::NodeOptions & options) : Node("converter", op
2727
sub_graph_.register_create_callback(std::bind(&Converter::on_create, this, _1));
2828
sub_graph_.register_update_callback(std::bind(&Converter::on_update, this, _1));
2929
sub_graph_.subscribe(*this, 1);
30-
31-
report_only_diag_ = declare_parameter<bool>("report_only_diag", false);
3230
}
3331

3432
void Converter::on_create(DiagGraph::ConstSharedPtr graph)
@@ -95,7 +93,7 @@ void Converter::on_update(DiagGraph::ConstSharedPtr graph)
9593
const auto get_hazards_vector = [](HazardStatus & status, HazardLevel level) {
9694
if (level == HazardStatus::SINGLE_POINT_FAULT) return &status.diag_single_point_fault;
9795
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;
9997
if (level == HazardStatus::NO_FAULT) return &status.diag_no_fault;
10098
return static_cast<std::vector<DiagnosticStatus> *>(nullptr);
10199
};
@@ -109,7 +107,6 @@ void Converter::on_update(DiagGraph::ConstSharedPtr graph)
109107
HazardStatusStamped hazard;
110108
for (const auto & unit : graph->units()) {
111109
if (unit->path().empty()) continue;
112-
if (report_only_diag_ && unit->type() != "diag") continue;
113110
const bool is_auto_tree = auto_mode_tree_.count(unit);
114111
const auto root_level = is_auto_tree ? auto_mode_root_->level() : DiagnosticStatus::OK;
115112
const auto unit_level = unit->level();

system/hazard_status_converter/src/converter.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class Converter : public rclcpp::Node
4141

4242
DiagUnit * auto_mode_root_;
4343
std::unordered_set<DiagUnit *> auto_mode_tree_;
44-
bool report_only_diag_;
4544
};
4645

4746
} // namespace hazard_status_converter

0 commit comments

Comments
 (0)