From af9c7b0ae6797b8f3d38f1f7c721be35399cf0d6 Mon Sep 17 00:00:00 2001 From: Peter van Dooren Date: Tue, 26 Apr 2022 17:02:07 +0200 Subject: [PATCH 1/2] add error msgs for timeouts --- ed_sensor_integration/src/kinect/image_buffer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ed_sensor_integration/src/kinect/image_buffer.cpp b/ed_sensor_integration/src/kinect/image_buffer.cpp index 1b4d27e7..acf42aa2 100644 --- a/ed_sensor_integration/src/kinect/image_buffer.cpp +++ b/ed_sensor_integration/src/kinect/image_buffer.cpp @@ -61,7 +61,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 image"); return false; + } else ros::Duration(0.1).sleep(); } @@ -72,7 +75,10 @@ bool ImageBuffer::waitForRecentImage(rgbd::ImageConstPtr& image, geo::Pose3D& se // Wait until we have a tf if (!tf_listener_->canTransform(root_frame_, rgbd_image->getFrameId(), ros::Time(rgbd_image->getTimestamp()))) // Get the TF when it is available now if (!tf_listener_->waitForTransform(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 From 3ef9f1ae2d2f0a308cb18649c10241daea26df02 Mon Sep 17 00:00:00 2001 From: PetervDooren <19806646+PetervDooren@users.noreply.github.com> Date: Tue, 26 Apr 2022 15:04:47 +0200 Subject: [PATCH 2/2] clarify rgbd --- ed_sensor_integration/src/kinect/image_buffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ed_sensor_integration/src/kinect/image_buffer.cpp b/ed_sensor_integration/src/kinect/image_buffer.cpp index acf42aa2..3549468a 100644 --- a/ed_sensor_integration/src/kinect/image_buffer.cpp +++ b/ed_sensor_integration/src/kinect/image_buffer.cpp @@ -62,7 +62,7 @@ bool ImageBuffer::waitForRecentImage(rgbd::ImageConstPtr& image, geo::Pose3D& se break; else if (ros::Time::now() > t_end) { - ROS_ERROR_NAMED("image_buffer", "[IMAGE_BUFFER] timeout waiting for image"); + ROS_ERROR_NAMED("image_buffer", "[IMAGE_BUFFER] timeout waiting for rgbd image"); return false; } else