Training#182
Open
nanoticity wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a training exercise under src/camera/training/ intended to guide developers through implementing a TrainingCamera that conforms to the existing camera::ICamera interface and validating it via the AprilTag pipeline on Orin hardware.
Changes:
- Introduces a training README describing the end-to-end implementation + validation steps.
- Adds a
camera.h“local copy” of thecamera::ICamerainterface for the training directory.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/camera/training/README.md | Adds step-by-step training task instructions and acceptance criteria. |
| src/camera/training/camera.h | Adds a training-local header that duplicates the camera interface types. |
Comment on lines
+2
to
+37
| #include "src/camera/camera_constants.h" | ||
| #include "src/utils/pch.h" | ||
| namespace camera { | ||
|
|
||
| using timestamped_frame_t = struct TimestampedFrame { | ||
| cv::Mat frame; | ||
| double timestamp; | ||
| bool invalid = false; | ||
|
|
||
| friend auto operator<<(std::ostream& os, const TimestampedFrame& f) | ||
| -> std::ostream& { | ||
| os << "TimestampedFrame{" | ||
| << "timestamp=" << f.timestamp << ", invalid=" << std::boolalpha | ||
| << f.invalid; | ||
|
|
||
| if (!f.frame.empty()) { | ||
| os << ", frame=(" << f.frame.cols << "x" << f.frame.rows | ||
| << ", channels=" << f.frame.channels() << ")"; | ||
| } else { | ||
| os << ", frame=<empty>"; | ||
| } | ||
|
|
||
| os << "}"; | ||
| return os; | ||
| } | ||
| }; | ||
|
|
||
| class ICamera { | ||
| public: | ||
| virtual auto GetFrame() -> timestamped_frame_t = 0; | ||
| virtual auto Restart() -> void = 0; | ||
| [[nodiscard]] virtual auto GetCameraConstant() const -> camera_constant_t = 0; | ||
| virtual auto IsDone() -> bool { return false; } | ||
| virtual ~ICamera() = default; | ||
| }; | ||
| } // namespace camera |
|
|
||
| using timestamped_frame_t = struct TimestampedFrame { | ||
| cv::Mat frame; | ||
| double timestamp; |
Signed-off-by: Ari <nanoticity@gmail.com>
Signed-off-by: Ari <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.