Skip to content

Commit

Permalink
Add error msgs for timeouts (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh authored Apr 26, 2022
2 parents 196b713 + 0f9e8a4 commit f1f1ca8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ed_sensor_integration/src/kinect/image_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ bool ImageBuffer::waitForRecentImage(rgbd::ImageConstPtr& image, geo::Pose3D& se
if (rgbd_image)
break;
else if (ros::Time::now() > t_end)
{
ROS_ERROR_NAMED("image_buffer", "[IMAGE_BUFFER] timeout waiting for rgbd image");
return false;
}
else
ros::Duration(0.1).sleep();
}
Expand All @@ -76,7 +79,10 @@ bool ImageBuffer::waitForRecentImage(rgbd::ImageConstPtr& image, geo::Pose3D& se
// Wait until we have a tf
if (!tf_buffer_.canTransform(root_frame_, rgbd_image->getFrameId(), ros::Time(rgbd_image->getTimestamp()))) // Get the TF when it is available now
if (!tf_buffer_.canTransform(root_frame_, rgbd_image->getFrameId(), ros::Time(rgbd_image->getTimestamp()), t_end - ros::Time::now()))
{
ROS_ERROR_NAMED("image_buffer", "[IMAGE_BUFFER] timeout waiting for tf");
return false;
}

// - - - - - - - - - - - - - - - - - -
// Calculate tf
Expand Down

0 comments on commit f1f1ca8

Please sign in to comment.