File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,13 @@ void FusionTracker::joints_obsrv_callback(
428428 ROS_WARN (" Obsrv buffer max size reached." );
429429 joints_obsrvs_buffer_.pop_front ();
430430 }
431+
432+
433+ if (j_t > entry.timestamp )
434+ {
435+ ROS_ERROR_STREAM (" joint measurements not ordered!!!" );
436+ }
437+
431438 j_t = entry.timestamp ;
432439}
433440
@@ -441,7 +448,24 @@ void FusionTracker::image_obsrv_callback(const sensor_msgs::Image& ros_image)
441448 ros_image_.header .stamp .toSec () - camera_delay_);
442449
443450 std::lock_guard<std::mutex> lock_joint_obsrv (joints_obsrv_buffer_mutex_);
451+
452+ if (i_t > ros_image_.header .stamp .toSec ())
453+ {
454+ ROS_ERROR_STREAM (" image measurements not ordered!!!" );
455+ }
456+
444457 i_t = ros_image_.header .stamp .toSec ();
458+
459+ if (i_t > j_t )
460+ {
461+ ROS_ERROR_STREAM (" latest image newer than latest joint angles!!!"
462+ << std::endl <<
463+ " angle stamp: " << j_t << " imaga stamp : " << i_t
464+ << std::endl <<
465+ " difference: " << i_t - j_t << std::endl);
466+
467+ }
468+
445469}
446470
447471}
You can’t perform that action at this time.
0 commit comments