Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port missing tf timeout from ROS1 to ROS2 #333

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fuse_models/src/imu_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void Imu2D::processDifferential(
params_.orientation_target_frame.empty() ? pose.header.frame_id : params_.
orientation_target_frame;

if (!common::transformMessage(*tf_buffer_, pose, *transformed_pose)) {
if (!common::transformMessage(*tf_buffer_, pose, *transformed_pose, params_.tf_timeout)) {
RCLCPP_WARN_STREAM_THROTTLE(
logger_, *clock_, 5.0 * 1000,
"Cannot transform pose message with stamp " << rclcpp::Time(
Expand All @@ -276,7 +276,7 @@ void Imu2D::processDifferential(
transformed_twist.header.frame_id =
params_.twist_target_frame.empty() ? twist.header.frame_id : params_.twist_target_frame;

if (!common::transformMessage(*tf_buffer_, twist, transformed_twist)) {
if (!common::transformMessage(*tf_buffer_, twist, transformed_twist, params_.tf_timeout)) {
RCLCPP_WARN_STREAM_THROTTLE(
logger_, *clock_, 5.0 * 1000,
"Cannot transform twist message with stamp " << rclcpp::Time(
Expand Down
4 changes: 2 additions & 2 deletions fuse_models/src/odometry_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void Odometry2D::processDifferential(
transformed_pose->header.frame_id =
params_.pose_target_frame.empty() ? pose.header.frame_id : params_.pose_target_frame;

if (!common::transformMessage(*tf_buffer_, pose, *transformed_pose)) {
if (!common::transformMessage(*tf_buffer_, pose, *transformed_pose, params_.tf_timeout)) {
RCLCPP_WARN_STREAM_THROTTLE(
logger_, *clock_, 5.0 * 1000,
"Cannot transform pose message with stamp "
Expand All @@ -218,7 +218,7 @@ void Odometry2D::processDifferential(
transformed_twist.header.frame_id =
params_.twist_target_frame.empty() ? twist.header.frame_id : params_.twist_target_frame;

if (!common::transformMessage(*tf_buffer_, twist, transformed_twist)) {
if (!common::transformMessage(*tf_buffer_, twist, transformed_twist, params_.tf_timeout)) {
RCLCPP_WARN_STREAM_THROTTLE(
logger_, *clock_, 5.0 * 1000,
"Cannot transform twist message with stamp " << rclcpp::Time(
Expand Down