From 0f6ce3a3c8930cd5b22589e706d1e723e4067de2 Mon Sep 17 00:00:00 2001 From: Charlie Kemp Date: Wed, 7 Oct 2020 14:56:33 -0400 Subject: [PATCH] add warning if fit error is high --- stretch_calibration/nodes/process_head_calibration_data | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stretch_calibration/nodes/process_head_calibration_data b/stretch_calibration/nodes/process_head_calibration_data index 77fdf72..5793aed 100755 --- a/stretch_calibration/nodes/process_head_calibration_data +++ b/stretch_calibration/nodes/process_head_calibration_data @@ -254,8 +254,12 @@ class HeadCalibrator: def check_fit_error(self, fit_error): fit_error_threshold = 0.05 + fit_warning_threshold = 0.03 if fit_error > fit_error_threshold: - rospy.logerr('The fit error is unusually high: {0} > {1} (fit_error > fit_error_threshold)'.format(fit_error, fit_error_threshold)) + rospy.logerr('The fit error is very high: {0} > {1} (fit_error > fit_error_threshold)'.format(fit_error, fit_error_threshold)) + elif fit_error > fit_warning_threshold: + rospy.logwarn('The fit error is high: {0} > {1} (fit_error > fit_warning_threshold)'.format(fit_error, fit_warning_threshold)) + def get_calibration_options(self): # Return the current calibration options