Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
0x126 committed May 23, 2024
1 parent 58e4781 commit 0656ecf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class PointCloudConcatenateDataSynchronizerComponent : public rclcpp::Node
void timer_callback();

void checkConcatStatus();
int concat_miss_count_{0};
int consecutive_concatenate_failures{0};

std::string replaceSyncTopicNamePostfix(
const std::string & original_topic_name, const std::string & postfix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,19 +697,19 @@ void PointCloudConcatenateDataSynchronizerComponent::checkConcatStatus()
}

if(not_subscribed_topic_names_.size() > 0) {
concat_miss_count_ += 1;
consecutive_concatenate_failures += 1;
}else{
concat_miss_count_ = 0;
consecutive_concatenate_failures = 0;
}

{
diagnostic_msgs::msg::KeyValue key_value_msg;
key_value_msg.key = "miss_count";
key_value_msg.value = std::to_string(concat_miss_count_);
key_value_msg.key = "consecutiveConcatenateFailures";
key_value_msg.value = std::to_string(consecutive_concatenate_failures_);
diag_status_msg.values.push_back(key_value_msg);
}

if(concat_miss_count_ > 2){
if(consecutive_concatenate_failures > 1){
diag_status_msg.level = diagnostic_msgs::msg::DiagnosticStatus::WARN;
diag_status_msg.message = "Some topics are not concatenated";
}else{
Expand Down

0 comments on commit 0656ecf

Please sign in to comment.