Moved Robot to camera transform to PhotonCamera#2440
Moved Robot to camera transform to PhotonCamera#2440Bobcat66 wants to merge 66 commits intoPhotonVision:2027from
Conversation
…m to PhotonPipelineResult
Photon serde patch
mcm001
left a comment
There was a problem hiding this comment.
I see where NT changes are plumbed into pipelines and then where the current value is telemetered. Is this value used for multitag yet?
I'm also concerned about latency compensation here, for cases where the camera is moving
| } | ||
|
|
||
| private void onRobotToCameraChange(NetworkTableEvent entryNotification) { | ||
| // HACK: the entryNotification's value can't be cast to Transform3d, so we read directly from |
There was a problem hiding this comment.
It might be worth making an upstream issue against wpilib to support structs here
| private CVPipeline currentUserPipeline = driverModePipeline; | ||
|
|
||
| /** The current robot to camera transform. */ | ||
| private AtomicReference<Transform3d> robotToCamera = new AtomicReference<>(); |
There was a problem hiding this comment.
Does pipeline manager make sense to hold this data? I think it might make sense to leave this class only concerned with switching pipelines.
There was a problem hiding this comment.
I originally structured it the way i did because in my mind the pipelineManager was 'object that handles everything that has to do with the pipeline', and the robotToCamera is conceptually (IMO) part of the pipeline, Looking back at the code, I agree that it might make more sense to move the atomic reference to the VisionModule. I can update the PR.
Description
RobotToCamera transform has been moved to PhotonCamera, and is broadcast over NetworkTables to the coprocessor. All pipeline results are appended with an optional camera transform, and PhotonPoseEstimator no longer has a robot-to-camera transform of its own, instead reading them directly from the results. This originally was made for and tested on the 2026 version, and as far as I can tell it works, but some things might have broken while rebasing to 2027
Closes #2095
Meta
Merge checklist: