Skip to content

Commit

Permalink
feat(tier4_autoware_utils): suppress too many warning of TF transform…
Browse files Browse the repository at this point in the history
… failure

Signed-off-by: Takayuki Murooka <[email protected]>
  • Loading branch information
takayuki5168 committed Jun 8, 2024
1 parent 57786a7 commit 253f999
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ class TransformListener
try {
tf = tf_buffer_->lookupTransform(from, to, tf2::TimePointZero);
} catch (tf2::TransformException & ex) {
RCLCPP_WARN(
logger_, "failed to get transform from %s to %s: %s", from.c_str(), to.c_str(), ex.what());
RCLCPP_WARN_THROTTLE(
logger_, *clock_, 5000, "failed to get transform from %s to %s: %s", from.c_str(),
to.c_str(), ex.what());
return {};
}

Expand All @@ -64,8 +65,9 @@ class TransformListener
try {
tf = tf_buffer_->lookupTransform(from, to, time, duration);
} catch (tf2::TransformException & ex) {
RCLCPP_WARN(
logger_, "failed to get transform from %s to %s: %s", from.c_str(), to.c_str(), ex.what());
RCLCPP_WARN_THROTTLE(
logger_, *clock_, 5000, "failed to get transform from %s to %s: %s", from.c_str(),
to.c_str(), ex.what());
return {};
}

Expand Down

0 comments on commit 253f999

Please sign in to comment.