moveit / moveit_calibration

Hand-eye calibration tools for robot arms.
BSD 3-Clause "New" or "Revised" License
143 stars 79 forks source link

fix missing intrinsics on target type change #91

Closed JStech closed 3 years ago

JStech commented 3 years ago

Fix for a bug I just ran into. If the camera intrinsics were already received, and then you change the target type (ArUco/ChArUco), the new target wouldn't receive the correct intrinsics. The target object is created with default intrinsics (identity camera matrix and all zero distortion), and then the target tab wouldn't send its cached intrinsics to the target object, since they match the incoming CameraInfo message. This PR just sends the intrinsics after the new target object is created.

I also made some more stylistic changes to cameraInfoCallback.

codecov[bot] commented 3 years ago

Codecov Report

Merging #91 (a7fe8c4) into master (f7d2730) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #91   +/-   ##
=======================================
  Coverage   75.05%   75.05%           
=======================================
  Files           9        9           
  Lines         529      529           
=======================================
  Hits          397      397           
  Misses        132      132           
Impacted Files Coverage Δ
...t/handeye_calibration_target/handeye_target_base.h 88.08% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f7d2730...a7fe8c4. Read the comment docs.