Skip to content

Commit be69db7

Browse files
committed
made error messages more informative
1 parent 27dec8c commit be69db7

File tree

1 file changed

+31
-13
lines changed

1 file changed

+31
-13
lines changed

source/dbrt/tracker/fusion_tracker.cpp

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -396,13 +396,21 @@ void FusionTracker::joints_obsrv_callback(
396396

397397
if (joints_obsrvs_buffer_.size() > 1000000)
398398
{
399-
ROS_WARN_STREAM("Obsrv buffer max size (" << 1000000 << ") reached.");
399+
ROS_ERROR_STREAM("Joint angle max buffer size (" << 1000000 << ") "
400+
<< "reached! This means most likely that no image "
401+
<< "has been received in a while. Old joint angles "
402+
<< "can only be discarded once an image with a later "
403+
<< "time stamp is received.");
400404
joints_obsrvs_buffer_.pop_front();
401405
}
402406

403407
if (j_t > entry.timestamp)
404408
{
405-
ROS_ERROR_STREAM("Joint measurements not ordered!");
409+
ROS_ERROR_STREAM("Joint angle measurements not ordered! This means "
410+
<< "that a joint angle measurement was received with "
411+
<< "an older time stamp than a joint angle "
412+
<< "measurement previously received. This case should "
413+
<< "never occurr and is not handled!");
406414
}
407415

408416
j_t = entry.timestamp;
@@ -421,23 +429,33 @@ void FusionTracker::image_obsrv_callback(const sensor_msgs::Image& ros_image)
421429

422430
if (i_t > ros_image_.header.stamp.toSec())
423431
{
424-
ROS_ERROR_STREAM("Image measurements not ordered!");
432+
ROS_ERROR_STREAM("Image measurements not ordered! This means that an "
433+
<< "image was received with an older time stamp than "
434+
<< "an image previously received. This case should "
435+
<< "never occurr and is not handled!");
425436
}
426437

427438
i_t = ros_image_.header.stamp.toSec();
428439

429440
if (i_t > j_t)
430441
{
431-
ROS_ERROR_STREAM("latest image newer than latest joint angles!!!"
432-
<< std::endl
433-
<< "angle stamp: "
434-
<< j_t
435-
<< " imaga stamp : "
436-
<< i_t
437-
<< std::endl
438-
<< "difference: "
439-
<< i_t - j_t
440-
<< std::endl);
442+
ROS_WARN_STREAM("Latest image newer than latest joint angles! "
443+
<< "Will wait until a joint angle measurement is "
444+
<< "received with a time stamp at least as new as "
445+
<< "the latest image."
446+
<< std::endl
447+
<< "This case not expected since images are assumed to "
448+
<< "have less delay than joint angles. There might be "
449+
<< "a time synchronization issue."
450+
<< std::endl
451+
<< "angle stamp: "
452+
<< j_t
453+
<< " image stamp : "
454+
<< i_t
455+
<< std::endl
456+
<< "difference: "
457+
<< i_t - j_t
458+
<< std::endl);
441459
}
442460
}
443461
}

0 commit comments

Comments
 (0)