File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
ada_feeding_perception/ada_feeding_perception Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -583,15 +583,16 @@ def get_mouth_depth(
583
583
"No depth image message received." , throttle_duration_sec = 1
584
584
)
585
585
return False , 0
586
- if (
587
- np . abs ( closest_depth_msg .header .stamp .sec - rgb_msg .header .stamp .sec )
588
- >= 1.0
589
- ) :
586
+ elapsed_time = np . abs (
587
+ closest_depth_msg .header .stamp .sec - rgb_msg .header .stamp .sec
588
+ )
589
+ if elapsed_time >= 1.0 :
590
590
self .get_logger ().warn (
591
- "Incosistent messages. Depth image message received at "
591
+ "Inconsistent messages. Depth image message received at "
592
592
f"{ closest_depth_msg .header .stamp } . RGB image message received "
593
593
f"at { rgb_msg .header .stamp } . Time difference: { min_time_diff } secs."
594
594
)
595
+ return False , 0
595
596
image_depth = ros_msg_to_cv2_image (closest_depth_msg , self .bridge )
596
597
597
598
# Compute the depth of the mouth. Use the first method that works.
You can’t perform that action at this time.
0 commit comments