Skip to content

Commit af9c7b0

Browse files
committed
add error msgs for timeouts
1 parent 5b2d347 commit af9c7b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ed_sensor_integration/src/kinect/image_buffer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ bool ImageBuffer::waitForRecentImage(rgbd::ImageConstPtr& image, geo::Pose3D& se
6161
if (rgbd_image)
6262
break;
6363
else if (ros::Time::now() > t_end)
64+
{
65+
ROS_ERROR_NAMED("image_buffer", "[IMAGE_BUFFER] timeout waiting for image");
6466
return false;
67+
}
6568
else
6669
ros::Duration(0.1).sleep();
6770
}
@@ -72,7 +75,10 @@ bool ImageBuffer::waitForRecentImage(rgbd::ImageConstPtr& image, geo::Pose3D& se
7275
// Wait until we have a tf
7376
if (!tf_listener_->canTransform(root_frame_, rgbd_image->getFrameId(), ros::Time(rgbd_image->getTimestamp()))) // Get the TF when it is available now
7477
if (!tf_listener_->waitForTransform(root_frame_, rgbd_image->getFrameId(), ros::Time(rgbd_image->getTimestamp()), t_end - ros::Time::now()))
78+
{
79+
ROS_ERROR_NAMED("image_buffer", "[IMAGE_BUFFER] timeout waiting for tf");
7580
return false;
81+
}
7682

7783
// - - - - - - - - - - - - - - - - - -
7884
// Calculate tf

0 commit comments

Comments
 (0)