Skip to content

Commit

Permalink
add missing tf timeout at differential mode of IMU, odometry, and pos…
Browse files Browse the repository at this point in the history
…e sensor model (#322)
  • Loading branch information
fabianhirmann authored Jul 10, 2023
1 parent bb25c35 commit ed21f99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fuse_models/src/imu_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void Imu2D::processDifferential(const geometry_msgs::PoseWithCovarianceStamped&
transformed_pose->header.frame_id =
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))
{
ROS_WARN_STREAM_THROTTLE(5.0, "Cannot transform pose message with stamp " << pose.header.stamp
<< " to orientation target frame "
Expand All @@ -242,7 +242,7 @@ void Imu2D::processDifferential(const geometry_msgs::PoseWithCovarianceStamped&
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))
{
ROS_WARN_STREAM_THROTTLE(5.0, "Cannot transform twist message with stamp " << twist.header.stamp
<< " to twist target frame "
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 @@ -165,7 +165,7 @@ void Odometry2D::processDifferential(const geometry_msgs::PoseWithCovarianceStam
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))
{
ROS_WARN_STREAM_THROTTLE(5.0, "Cannot transform pose message with stamp "
<< pose.header.stamp << " to pose target frame " << params_.pose_target_frame);
Expand All @@ -184,7 +184,7 @@ void Odometry2D::processDifferential(const geometry_msgs::PoseWithCovarianceStam
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))
{
ROS_WARN_STREAM_THROTTLE(5.0, "Cannot transform twist message with stamp " << twist.header.stamp
<< " to twist target frame "
Expand Down
2 changes: 1 addition & 1 deletion fuse_models/src/pose_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void Pose2D::processDifferential(const geometry_msgs::PoseWithCovarianceStamped&
auto transformed_pose = std::make_unique<geometry_msgs::PoseWithCovarianceStamped>();
transformed_pose->header.frame_id = params_.target_frame.empty() ? pose.header.frame_id : params_.target_frame;

if (!common::transformMessage(tf_buffer_, pose, *transformed_pose))
if (!common::transformMessage(tf_buffer_, pose, *transformed_pose, params_.tf_timeout))
{
ROS_WARN_STREAM_THROTTLE(5.0, "Cannot transform pose message with stamp "
<< pose.header.stamp << " to target frame " << params_.target_frame);
Expand Down

0 comments on commit ed21f99

Please sign in to comment.