test(nuscenes): update camera intrinsics test for ideal pinhole model#151
Merged
janickm merged 1 commit intoJun 14, 2026
Merged
Conversation
The nuScenes converter was changed to store camera intrinsics as IdealPinholeCameraModelParameters (distortion-free) instead of OpenCVPinholeCameraModelParameters, but test_camera_intrinsics_zero_distortion still asserted the OpenCV type and inspected its radial/tangential distortion coefficients. The test therefore failed on the current converter output. Update the test (renamed to test_camera_intrinsics_ideal_pinhole) to assert the IdealPinholeCameraModelParameters type and validate focal length and principal point; an ideal pinhole is distortion-free by construction so there are no distortion coefficients to check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/data_converter/nuscenes/converter_test.py::test_camera_intrinsics_zero_distortionfails on the current converter output:The nuScenes converter was changed to store camera intrinsics as
IdealPinholeCameraModelParameters(distortion-free) instead ofOpenCVPinholeCameraModelParameters, but the test still asserted the OpenCV type and inspected itsradial_coeffs/tangential_coeffs. The test was not updated alongside that converter change.Fix
Update the test (renamed to
test_camera_intrinsics_ideal_pinhole) to:IdealPinholeCameraModelParameterstype the converter now emits, andfocal_lengthandprincipal_pointinstead of distortion coefficients (an ideal pinhole is distortion-free by construction, so there are none to check).Validation
NUSCENES_DIR=... bazel test //tools/data_converter/nuscenes:pytest_converter_3_11passes (the full converter integration suite, bothitaranddirectorystore types).This is split out from the lidar-model fix (#148) since it is an independent, pre-existing test/converter inconsistency.