ROS 2 camera geometry: synthetic validation fixture Reviewed 2026-12-03. Standard-library Python only; Python 3.9+ syntax. Download these five files into one directory: camera_geometry_check.py camera_fixture.json correspondences.csv expected_results.json README.txt Run from any working directory: python3 /path/to/camera_geometry_check.py --self-test python3 /path/to/camera_geometry_check.py Ten tests cover known projections, optical/body axes, inverse transforms, known-depth back-projection, a deliberate +5 px principal-point error, wrong transform direction/rotation, invalid configuration and invalid inputs. The normal command checks the supplied known answers and prints deterministic JSON. Compare with expected_results.json. It writes no files and uses no network. Expected: six correspondences, 0 px reprojection RMS, 0 m maximum base error, and 5 px RMS after deliberately adding 5 px to cx in both K and P. A numerical tolerance of 1e-9 is used for the known-answer checks. The CSV's expected coordinates were specified independently from the example's projection/transform functions; expected_results.json records their replay. Scope: - All points, pixel observations, intrinsics and mount geometry are synthetic. - The JSON is a teaching subset of CameraInfo, NOT a ROS message or a YAML file to install in a camera driver. No timestamp, ROI or binning is modeled. - This example assumes plumb_bob D=0, identity rectification, no crop/binning, zero skew, and monocular P=[K|0]. It rejects unsupported matrices/distortion. - Depth means optical-Z distance in metres, not Euclidean range. - p_base = R_base_from_optical * p_optical + t_base. The camera_link axes are parallel to base_link; the two camera origins coincide; its base-frame translation is (0.2, 0, 0.5) m. These are example assumptions, not a robot URDF. - This does not detect checkerboards, estimate K/D, calibrate extrinsics, rectify images, propagate uncertainty, fit noise, or validate ROS timing. - No ROS 2 runtime, camera, robot or hardware was exercised. A zero residual on this ideal fixture is arithmetic consistency, not a real calibration score. Documentation scope: ROS 2 Jazzy. Official source references checked 2026-12-03: https://github.com/ros-perception/image_pipeline/blob/jazzy/camera_calibration/doc/tutorial_mono.rst https://github.com/ros2/common_interfaces/blob/jazzy/sensor_msgs/msg/CameraInfo.msg https://github.com/ros-infrastructure/rep/blob/master/rep-0103.rst https://github.com/ros2/geometry2/blob/jazzy/tf2_ros_py/tf2_ros/buffer_interface.py https://github.com/ros2/geometry2/blob/jazzy/tf2_geometry_msgs/src/tf2_geometry_msgs/tf2_geometry_msgs.py