Calibration Process fails to calibrate

I am trying to calibrate stretch robot using the directions given in: stretch_ros/README.md at master · hello-robot/stretch_ros · GitHub

However in every attempt I get total_error printed on the command line more than 0.05.

[ERROR] [1627661228.083019]: The fit error is very high: 0.234518493649 > 0.05 (fit_error > fit_error_threshold)

How can I calibrate the robot with a success?

Hello @burakaksoy, we’ve recently pushed some changes to the code you are using to calibrate the robot. Can you verify you have the latest software:

roscd stretch_core
git checkout master # use dev/noetic for Noetic release
git pull

If you are using our beta Noetic release, please use git checkout dev/noetic instead. If your software was out of date, then try the calibration again and your fit error should be under the 0.05 threshold.

Hi @bshah, we did updated to the latest software but we still have the same amount of error as in the question (0.23). We have another stretch robot in our lab, the calibration process works just fine for that one. Is it possible that the problem is not in the software but in the hardware?

Hi @burakaksoy, a hardware issue could explain the significant error, but I’d like to first confirm that there isn’t a simpler issue.

First, can you confirm that the robot isn’t capturing observations from the second robot’s Aruco markers during its own calibration procedure. Interference from the other robot’s markers could explain the unusually high error.

Second, please send the individual error terms of the latest calibration. You can find them in a YAML file called head_calibration_result_<timestamp>.yaml under ~/stretch_user/stretch-re1-xxxx/calibration_ros/. Within the newest results file, the best_parameters_error key tells us the overall fit error, and the best_parameters_error_terms dict tells us the individual fit errors. If one term had a particularly high error, it would help narrow down our search.

Hi @bshah , here’re the error terms:

best_parameters_error: 0.22184219383635864
best_parameters_error_terms:
  base_left_orient: 0.010426514087333257
  base_left_pos: 0.008064839499700036
  base_right_orient: 0.02790180226183317
  base_right_pos: 0.12477431340792663
  parameter_error_total: 0.0
  shoulder_orient: 0.029788174514225052
  shoulder_pos: 0.2860700096796736
  wrist_inside_orient: 0.006593446154745804
  wrist_inside_pos: 0.0016179832258021696
  wrist_top_orient: 0.013155696009563773
  wrist_top_pos: 0.005388890557305772

Seems like shoulder_pos is the one causing trouble, and upon visualization, we did see major discrepancy in z-direction.