Skip to content

Commit 49231bc

Browse files
zusizusiNaophis
andauthored
fix(traffic_light_classifier): fix traffic light monitor warning (autowarefoundation#8412) (#1455)
fix traffic light monitor warning Signed-off-by: Sho Iwasawa <sho.iwasawa.2@tier4.jp> Co-authored-by: Naophis <nao1288stusj@gmail.com>
1 parent ec3ad51 commit 49231bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

perception/traffic_light_classifier/src/nodelet.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ void TrafficLightClassifierNodelet::imageRoiCallback(
8484
if (classifier_ptr_.use_count() == 0) {
8585
return;
8686
}
87+
tier4_perception_msgs::msg::TrafficLightArray output_msg;
8788
if (input_rois_msg->rois.empty()) {
89+
output_msg.header = input_image_msg->header;
90+
traffic_signal_array_pub_->publish(output_msg);
8891
return;
8992
}
9093

@@ -97,7 +100,6 @@ void TrafficLightClassifierNodelet::imageRoiCallback(
97100
input_image_msg->encoding.c_str());
98101
}
99102

100-
tier4_perception_msgs::msg::TrafficLightArray output_msg;
101103
output_msg.signals.resize(input_rois_msg->rois.size());
102104

103105
std::vector<cv::Mat> images;

0 commit comments

Comments
 (0)