Open
Conversation
Signed-off-by: Nano <nanoticity@gmail.com>
Signed-off-by: Nano <nanoticity@gmail.com>
Contributor
There was a problem hiding this comment.
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-useCameraSource(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.
src/camera/select_camera.cc
Outdated
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>
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.
No description provided.