diff --git a/photon-lib/src/main/native/cpp/photonlib/PhotonPoseEstimator.cpp b/photon-lib/src/main/native/cpp/photonlib/PhotonPoseEstimator.cpp index 9282e3bdd5..f25e01eba5 100644 --- a/photon-lib/src/main/native/cpp/photonlib/PhotonPoseEstimator.cpp +++ b/photon-lib/src/main/native/cpp/photonlib/PhotonPoseEstimator.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -337,21 +338,17 @@ frc::Pose3d detail::ToPose3d(const cv::Mat& tvec, const cv::Mat& rvec) { R = R.t(); // rotation of inverse cv::Mat tvecI = -R * tvec; // translation of inverse - Vectord<3> tv; + Eigen::Matrix tv; tv[0] = +tvecI.at(2, 0); tv[1] = -tvecI.at(0, 0); tv[2] = -tvecI.at(1, 0); - Vectord<3> rv; + Eigen::Matrix rv; rv[0] = +rvec.at(2, 0); rv[1] = -rvec.at(0, 0); rv[2] = +rvec.at(1, 0); return Pose3d(Translation3d(meter_t{tv[0]}, meter_t{tv[1]}, meter_t{tv[2]}), - Rotation3d( - // radian_t{rv[0]}, - // radian_t{rv[1]}, - // radian_t{rv[2]} - rv, radian_t{rv.norm()})); + Rotation3d(rv)); } std::optional PhotonPoseEstimator::MultiTagPnpStrategy( diff --git a/shared/common.gradle b/shared/common.gradle index 81f0cf37b3..e8181507e3 100644 --- a/shared/common.gradle +++ b/shared/common.gradle @@ -91,6 +91,3 @@ jacocoTestReport { })) } } - - -