Skip to content

Commit f1f1ca8

Browse files
Add error msgs for timeouts (#62)
2 parents 196b713 + 0f9e8a4 commit f1f1ca8

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
@@ -65,7 +65,10 @@ bool ImageBuffer::waitForRecentImage(rgbd::ImageConstPtr& image, geo::Pose3D& se
6565
if (rgbd_image)
6666
break;
6767
else if (ros::Time::now() > t_end)
68+
{
69+
ROS_ERROR_NAMED("image_buffer", "[IMAGE_BUFFER] timeout waiting for rgbd image");
6870
return false;
71+
}
6972
else
7073
ros::Duration(0.1).sleep();
7174
}
@@ -76,7 +79,10 @@ bool ImageBuffer::waitForRecentImage(rgbd::ImageConstPtr& image, geo::Pose3D& se
7679
// Wait until we have a tf
7780
if (!tf_buffer_.canTransform(root_frame_, rgbd_image->getFrameId(), ros::Time(rgbd_image->getTimestamp()))) // Get the TF when it is available now
7881
if (!tf_buffer_.canTransform(root_frame_, rgbd_image->getFrameId(), ros::Time(rgbd_image->getTimestamp()), t_end - ros::Time::now()))
82+
{
83+
ROS_ERROR_NAMED("image_buffer", "[IMAGE_BUFFER] timeout waiting for tf");
7984
return false;
85+
}
8086

8187
// - - - - - - - - - - - - - - - - - -
8288
// Calculate tf

0 commit comments

Comments
 (0)