--- pretty_name: Galaxea R1 Lite Camera Calibration Sample license: other tags: - robotics - ros2 - camera-calibration - galaxea --- # Galaxea R1 Lite distortion-corrected camera sample This is a stationary ROS 2 data-collection test made on 2026-07-26. No chassis, torso, arm, gripper, IK, teleoperation, odometry, or pose-control command was run during the test. ## Result | Stream | Resolution | Messages | Effective bag rate | |---|---:|---:|---:| | Head left, rectified | 1920 x 1536 | 318 | 26.1 FPS | | Head right, rectified | 1920 x 1536 | 320 | 26.3 FPS | | Wrist left, unchanged | 1280 x 720 | 364 | 29.9 FPS | | Wrist right, unchanged | 1280 x 720 | 361 | 29.7 FPS | The bag duration is 12.1689 seconds. It contains 21,943 original messages plus one `/dataset/distortion_fix` marker. A byte-for-byte verification found that all 21,943 source messages, timestamps, topic names, and serialized payloads were preserved in the final package. ## Correction method Only the two head-camera streams are changed. Each camera is captured directly from its 1920 x 1536 YUYV V4L2 device, then rectified using an NVIDIA VPI 3.1 CUDA warp generated from the company-provided calibration file: `/opt/galaxea/body/stereo_ros.yaml` Calibration SHA-256: `195ac1482e7d485cdb94a4a76fb42ed6faf706aefad1edb6e5b836b03701f00a` The rectified image is JPEG encoded at quality 90 and published on the same head-camera topic names used by the original recorder. A small C++ ROS 2 publisher avoids Python serialization overhead. Head CameraInfo uses zero distortion coefficients and the official rectified stereo projection matrices. The right projection retains the stereo baseline (`P[3] = -66.4200456`). The wrist-camera streams and all non-camera packets are unchanged. The final packaging step does not decode or re-encode any image. ## Files - `20260726_DISTORTION_FIXED/...mcap`: complete ROS 2 MCAP episode. - `20260726_DISTORTION_FIXED/metadata.yaml`: ROS bag metadata plus correction annotation. - `20260726_DISTORTION_FIXED/distortion_fix.json`: human-readable correction metadata. - `four_camera_20260726_DISTORTION_FIXED.mp4`: 1920 x 1080 four-camera preview at 15 FPS. ## Why the previous method was slow The older Python live pipeline subscribed to already-compressed JPEG ROS messages, decoded both full-resolution images, remapped them, encoded them again, and serialized large ROS messages in Python. The correction math was not the main bottleneck. Direct V4L2 capture, CUDA remap, and a C++ publisher remove the expensive ROS/Python path. ## Operational notes The vendor package files were not modified for this solution. The preferred rollback is to stop the Jimmy rectifier and restart the unchanged vendor head camera. The backup snapshot is stored at: `/home/nvidia/jimmy/camera_distortion_backup_20260726_before_company_calibration`