Skip to content

Fix calibration script#193

Merged
tcappellari-bdai merged 12 commits intomainfrom
tcapp/cal_fix
Mar 6, 2026
Merged

Fix calibration script#193
tcappellari-bdai merged 12 commits intomainfrom
tcapp/cal_fix

Conversation

@tcappellari-bdai
Copy link
Copy Markdown
Collaborator

@tcappellari-bdai tcappellari-bdai commented Mar 5, 2026

Fixes the calibration script (originally created by Gary) after a bug was discovered. Much of the fixes are based off of Lu's work in bdai_calibration. Also updates the readme

Tested on Jasper and Ishmael (their internal gripper camera params are set to the newly calculated ones from testing)

Screenshot from 2026-03-05 13-33-37

Signed-off-by: Tiffany Cappellari <tcappellari@theaiinstitute.com>
Signed-off-by: Tiffany Cappellari <tcappellari@theaiinstitute.com>
Copy link
Copy Markdown
Collaborator

@mhidalgo-rai mhidalgo-rai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This a bit of a large patch and I have limited context. What is this fixing exactly?

rgb_M_wr1 = cal["depth_to_hand"] @ hand_t_planning
# rgb_t_depth is depth_M_rgb (stereo extrinsic: maps RGB points → depth frame).
# depth_M_wr1 = depth_M_rgb @ rgb_M_wr1
depth_M_wr1 = rgb_t_depth @ rgb_M_wr1
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tcappellari-bdai meta: IIUC rgb_t_depth is in fact depth_M_rgb, so this isn't a bug. Still, even if the calibration dictionary uses a different convention, we should make sure ours aligns.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed. its very confusing to use both types of notation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to use claude for help debugging and it seems to prefer the other convention 🥲

Copy link
Copy Markdown
Contributor

@khughes-bdai khughes-bdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't reviewed thoroughly but I know you and Lu have been working on this for a while. If it's working on robot and @lgalup-bdai is good with the underlying math, I'll stamp it

@lgalup-bdai
Copy link
Copy Markdown
Contributor

folks, i cant visually verify if the math is correct. that would be like visually verifying that software has no bugs. is there something we can do to test it?

Copy link
Copy Markdown
Contributor

looks like @tcappellari-bdai has run it on robot -- could you see an improvement with this vs the old method?

@tcappellari-bdai
Copy link
Copy Markdown
Collaborator Author

@khughes-bdai Ya so previously, when i saved the new calibration params to the robot (after fixing the initial frame transform errors), the depth hand camera would just stop working. Like just sending empty messages and a black screen on the tablet. The calibration was also saying the depth and RBG cameras in the hand were like 5 cm apart (way too big). After these changes, the cameras are both fully functional and the frame positions and orientations look correct in rviz.

(also Josh ran a spot check on Jasper after I changed the params and it passed all the checks, for whatever thats worth)

@tcappellari-bdai tcappellari-bdai merged commit a3536b5 into main Mar 6, 2026
4 checks passed
@tcappellari-bdai tcappellari-bdai deleted the tcapp/cal_fix branch March 6, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants