Skip to content

Add diskcamera to test cams#135

Open
nanoticity wants to merge 10 commits intomainfrom
add-diskcamera-to-test-cams
Open

Add diskcamera to test cams#135
nanoticity wants to merge 10 commits intomainfrom
add-diskcamera-to-test-cams

Conversation

@nanoticity
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 01:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR centralizes camera selection for integration/calibration executables by introducing a SelectCamera(...) helper that can choose between live (CVCamera) and replay-from-disk (DiskCamera) sources, and updates several integration tests/tools to use that helper.

Changes:

  • Add camera::SelectCamera(...) overloads that return a ready-to-use CameraSource (live or disk replay).
  • Extend interactive camera selection to accept a disk path input.
  • Migrate multiple integration tests and the intrinsics calibration executable to use SelectCamera(...).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/test/integration_test/localization_test.cc Switch disk replay camera creation to SelectCamera(...).
src/test/integration_test/intrinsics_test.cc Switch camera source creation to SelectCamera(...).
src/test/integration_test/gamepiece_test.cc Switch camera source creation to SelectCamera(...).
src/test/integration_test/apriltag_detect_test.cc Switch camera source creation to SelectCamera(...).
src/camera/select_camera.h Declare new SelectCamera(...) overloads and include DiskCamera.
src/camera/select_camera.cc Implement SelectCamera(...) and add path handling for interactive choice.
src/calibration/intrinsics_calibrate.cc Switch camera source creation to SelectCamera(...).

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +55 to +58
auto config = SelectCameraConfig(std::move(choice), camera_constants);
if (config.name.find('/') != std::string::npos) {
return CameraSource{name, std::make_unique<DiskCamera>(config.name, disk_speed)};
}
Comment on lines 41 to 43
camera::SelectCamera("disk", image_folder, camera::GetCameraConstants(),
absl::GetFlag(FLAGS_speed));

Comment on lines +45 to +47
camera::CameraSource source = camera::SelectCamera(
camera_constant.name, absl::GetFlag(FLAGS_camera_name),
camera::GetCameraConstants());
camera::CameraSource("nvidia_apriltag_test",
std::make_unique<camera::CVCamera>(camera_constant));
camera::CameraSource source = camera::SelectCamera(
"nvidia_apriltag_test", std::nullopt, camera::GetCameraConstants());
Comment on lines +29 to +31
camera::CameraSource source = camera::SelectCamera(
"stress_test_camera", absl::GetFlag(FLAGS_camera_name),
camera::GetCameraConstants());
Signed-off-by: Nano <nanoticity@gmail.com>
Signed-off-by: Nano <nanoticity@gmail.com>
Signed-off-by: Nano <nanoticity@gmail.com>
Signed-off-by: Nano <nanoticity@gmail.com>
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.

2 participants