Skip to content

Commit

Permalink
chore: set unit to empty string
Browse files Browse the repository at this point in the history
Signed-off-by: ktro2828 <[email protected]>
  • Loading branch information
ktro2828 committed Nov 29, 2024
1 parent b5721c3 commit eb479ed
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,30 @@ void PerceptionOnlineEvaluatorNode::toMetricMsg(
// min value
metrics_msg.metric_array.emplace_back(tier4_metric_msgs::build<tier4_metric_msgs::msg::Metric>()
.name(metric + "/min")
.unit("m")
.unit("")
.value(std::to_string(metric_stat.min())));

// max value
metrics_msg.metric_array.emplace_back(tier4_metric_msgs::build<tier4_metric_msgs::msg::Metric>()
.name(metric + "/max")
.unit("m")
.unit("")
.value(std::to_string(metric_stat.max())));

// mean value
metrics_msg.metric_array.emplace_back(tier4_metric_msgs::build<tier4_metric_msgs::msg::Metric>()
.name(metric + "/mean")
.unit("m")
.unit("")
.value(std::to_string(metric_stat.mean())));
}

void PerceptionOnlineEvaluatorNode::toMetricMsg(
const std::string & metric, const double metric_value,
tier4_metric_msgs::msg::MetricArray & metrics_msg) const
{
metrics_msg.metric_array.emplace_back(
tier4_metric_msgs::build<tier4_metric_msgs::msg::Metric>().name(metric).unit("m").value(
std::to_string(metric_value)));
metrics_msg.metric_array.emplace_back(tier4_metric_msgs::build<tier4_metric_msgs::msg::Metric>()
.name(metric + "/metric_value")
.unit("")
.value(std::to_string(metric_value)));
}

void PerceptionOnlineEvaluatorNode::onObjects(const PredictedObjects::ConstSharedPtr objects_msg)
Expand Down

0 comments on commit eb479ed

Please sign in to comment.