File tree 1 file changed +3
-14
lines changed
sensing/pointcloud_preprocessor/src/outlier_filter
1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -85,28 +85,17 @@ void DualReturnOutlierFilterComponent::onVisibilityChecker(DiagnosticStatusWrapp
85
85
// Add values
86
86
stat.add (" value" , std::to_string (visibility_));
87
87
88
- // Judge level
89
88
auto level = DiagnosticStatus::OK;
89
+ std::string msg = " OK" ;
90
90
if (visibility_ < 0 ) {
91
91
level = DiagnosticStatus::STALE;
92
+ msg = " STALE" ;
92
93
} else if (visibility_ < visibility_error_threshold_) {
93
94
level = DiagnosticStatus::ERROR;
95
+ msg = " ERROR: low visibility in dual outlier filter" ;
94
96
} else if (visibility_ < visibility_warn_threshold_) {
95
97
level = DiagnosticStatus::WARN;
96
- } else {
97
- level = DiagnosticStatus::OK;
98
- }
99
-
100
- // Set message
101
- std::string msg;
102
- if (level == DiagnosticStatus::OK) {
103
- msg = " OK" ;
104
- } else if (level == DiagnosticStatus::WARN) {
105
98
msg = " WARNING: low visibility in dual outlier filter" ;
106
- } else if (level == DiagnosticStatus::ERROR) {
107
- msg = " ERROR: low visibility in dual outlier filter" ;
108
- } else if (level == DiagnosticStatus::STALE) {
109
- msg = " STALE" ;
110
99
}
111
100
stat.summary (level, msg);
112
101
}
You can’t perform that action at this time.
0 commit comments