Skip to content

Commit

Permalink
chore(image_projection_based_fusion): change to throttle log (autowar…
Browse files Browse the repository at this point in the history
…efoundation#4572)

* fix(image_projection_based_fusion): fix to throttle log

Signed-off-by: Makoto Kurihara <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Makoto Kurihara <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and LeoDriveProject committed Aug 16, 2023
1 parent bc9063e commit d91d905
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions perception/image_projection_based_fusion/src/fusion_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ void FusionNode<Msg, Obj>::subCallback(const typename Msg::ConstSharedPtr input_
// if matching rois exist, fuseOnSingle
for (std::size_t roi_i = 0; roi_i < rois_number_; ++roi_i) {
if (camera_info_map_.find(roi_i) == camera_info_map_.end()) {
RCLCPP_WARN(this->get_logger(), "no camera info. id is %zu", roi_i);
RCLCPP_WARN_THROTTLE(
this->get_logger(), *this->get_clock(), 5000, "no camera info. id is %zu", roi_i);
continue;
}

Expand Down Expand Up @@ -298,7 +299,8 @@ void FusionNode<Msg, Obj>::roiCallback(

if (interval < match_threshold_ms_ * (int64_t)1e6 && is_fused_.at(roi_i) == false) {
if (camera_info_map_.find(roi_i) == camera_info_map_.end()) {
RCLCPP_WARN(this->get_logger(), "no camera info. id is %zu", roi_i);
RCLCPP_WARN_THROTTLE(
this->get_logger(), *this->get_clock(), 5000, "no camera info. id is %zu", roi_i);
(roi_stdmap_.at(roi_i))[timestamp_nsec] = input_roi_msg;
return;
}
Expand Down

0 comments on commit d91d905

Please sign in to comment.