mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
Un-finalize robotToCamera, add getters and setters (#789)
Allows teams with a mechanism that moves the camera's position (eg, a pan and tilt mechanism) to update the location of their camera for their pose calculations. --------- Co-authored-by: Matthew Morley <matthew.morley.ca@gmail.com>
This commit is contained in:
@@ -123,6 +123,24 @@ class PhotonPoseEstimator {
|
||||
this->referencePose = referencePose;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The current transform from the center of the robot to the camera
|
||||
* mount position.
|
||||
*/
|
||||
inline frc::Transform3d GetRobotToCameraTransform() {
|
||||
return m_robotToCamera;
|
||||
}
|
||||
|
||||
/**
|
||||
* Useful for pan and tilt mechanisms, or cameras on turrets
|
||||
*
|
||||
* @param robotToCamera The current transform from the center of the robot to
|
||||
* the camera mount position.
|
||||
*/
|
||||
inline void SetRobotToCameraTransform(frc::Transform3d robotToCamera) {
|
||||
m_robotToCamera = robotToCamera;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the stored last pose. Useful for setting the initial estimate when
|
||||
* using the CLOSEST_TO_LAST_POSE strategy.
|
||||
|
||||
Reference in New Issue
Block a user