Inheritance and abstract class fixes for stereo#963
Merged
spomichter merged 5 commits intodevfrom Jan 8, 2026
Merged
Conversation
Contributor
Greptile SummaryRenamed stereo camera classes to depth camera classes and fixed inheritance structure by adding Major Changes:
Issues Found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant RealSenseCamera
participant DepthCameraHardware
participant Module
participant DepthCamera as perception.DepthCamera
Note over RealSenseCamera,DepthCamera: Inheritance Chain
RealSenseCamera->>DepthCameraHardware: inherits abstract methods
RealSenseCamera->>Module: inherits module functionality
RealSenseCamera->>DepthCamera: implements protocol
User->>RealSenseCamera: instantiate with config
Note over RealSenseCamera: RealSenseCameraConfig extends<br/>ModuleConfig + DepthCameraConfig
User->>RealSenseCamera: start()
RealSenseCamera->>RealSenseCamera: initialize pipeline
RealSenseCamera->>RealSenseCamera: build camera info
RealSenseCamera->>RealSenseCamera: start capture thread
loop Capture Loop
RealSenseCamera->>RealSenseCamera: wait_for_frames()
RealSenseCamera->>DepthCamera: publish(color_image)
RealSenseCamera->>DepthCamera: publish(depth_image)
RealSenseCamera->>Module: publish(tf transforms)
end
User->>RealSenseCamera: get_color_camera_info()
RealSenseCamera-->>User: CameraInfo
User->>RealSenseCamera: get_depth_camera_info()
RealSenseCamera-->>User: CameraInfo
User->>RealSenseCamera: get_depth_scale()
RealSenseCamera-->>User: float
|
|
|
||
| class StereoCameraConfig(Protocol): | ||
| """Protocol for stereo camera configuration.""" | ||
| class DepthCameraConfig(CameraConfig): |
Contributor
There was a problem hiding this comment.
syntax: DepthCameraConfig should be marked as a Protocol since it inherits from CameraConfig (which is a Protocol) and only defines structural requirements without implementations
Suggested change
| class DepthCameraConfig(CameraConfig): | |
| class DepthCameraConfig(CameraConfig, Protocol): |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
spomichter
approved these changes
Jan 8, 2026
spomichter
pushed a commit
that referenced
this pull request
Jan 8, 2026
* make inheritance and abstract class fixes * CI code cleanup * renamed stereo to depth camera since most depth cameras are not stereo cameras * bug fix * fix mypy Former-commit-id: 888999f
spomichter
pushed a commit
that referenced
this pull request
Jan 8, 2026
* make inheritance and abstract class fixes * CI code cleanup * renamed stereo to depth camera since most depth cameras are not stereo cameras * bug fix * fix mypy Former-commit-id: 888999f
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.
-Fixed Stash and Ivan's comments about stereo camera inheritance
-renamed "stereo" to "depth" camera since most depth cameras are not stereo