Skip to content

Commit

Permalink
fix(traffic_light_classifier): fix traffic light monitor warning (aut…
Browse files Browse the repository at this point in the history
…owarefoundation#8412) (#1455)

fix traffic light monitor warning

Signed-off-by: Sho Iwasawa <[email protected]>
Co-authored-by: Naophis <[email protected]>
  • Loading branch information
zusizusi and Naophis authored Aug 9, 2024
1 parent ec3ad51 commit 49231bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion perception/traffic_light_classifier/src/nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ void TrafficLightClassifierNodelet::imageRoiCallback(
if (classifier_ptr_.use_count() == 0) {
return;
}
tier4_perception_msgs::msg::TrafficLightArray output_msg;
if (input_rois_msg->rois.empty()) {
output_msg.header = input_image_msg->header;
traffic_signal_array_pub_->publish(output_msg);
return;
}

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

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

std::vector<cv::Mat> images;
Expand Down

0 comments on commit 49231bc

Please sign in to comment.