You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In photonlib c++ on Windows, when #including photon/simulation/VisionSystemSim.h and building for the rio, warnings that static std::optional<PnpResult> EstimateCamPosePNP() is unused get printed to the build console.
To Reproduce
Steps to reproduce the behavior:
Create a blank cpp project (I used the Timed Robot Skeleton template)
Install photonlib v2025.0.0-beta-8
Add #include <photon/simulation/VisionSystemSim.h> or photon/estimation/VisionEstimation.h to Robot.h
Run WPILib: Build Robot Code from the vscode command pallet
View warnings in the console:
Warnings in file Robot.cpp ....
In file included from C:\Users\user\.gradle\caches\8.10.2\transforms\b21211e3f0e2860a6b96abf082501de9\transformed\photonlib-cpp-v2025.0.0-beta-8-headers/photon/simulation/PhotonCameraSim.h:31,
from C:\Users\user\.gradle\caches\8.10.2\transforms\b21211e3f0e2860a6b96abf082501de9\transformed\photonlib-cpp-v2025.0.0-beta-8-headers/photon/simulation/VisionSystemSim.h:38,
from C:\src\icrobotics\cpp-photon-test\src\main\include/Robot.h:6,
from C:\src\icrobotics\cpp-photon-test\src\main\cpp\Robot.cpp:1:
C:\Users\user\.gradle\caches\8.10.2\transforms\ba6d2d39cca1288f8b471feb14a98f32\transformed\photontargeting-cpp-v2025.0.0-beta-8-headers/photon/estimation/VisionEstimation.h:51:33: warning: 'std::optional<photon::PnpResult> photon::VisionEstimation::EstimateCamPosePNP(const Eigen::Matrix<double, 3, 3>&, const Eigen::Matrix<double, 8, 1>&, const std::vector<photon::PhotonTrackedTarget>&, const frc::AprilTagFieldLayout&, const photon::TargetModel&)' defined but not used [-Wunused-function]
51 | static std::optional<PnpResult> EstimateCamPosePNP(
| ^~~~~~~~~~~~~~~~~~
Describe the bug
In photonlib c++ on Windows, when #including photon/simulation/VisionSystemSim.h and building for the rio, warnings that
static std::optional<PnpResult> EstimateCamPosePNP()
is unused get printed to the build console.To Reproduce
Steps to reproduce the behavior:
#include <photon/simulation/VisionSystemSim.h>
orphoton/estimation/VisionEstimation.h
to Robot.hFull warning messages: https://github.com/Liam-Stow/cpp-photon-test/blob/simplest-warning-producer/warnings.txt
Example project with this problem: https://github.com/Liam-Stow/cpp-photon-test/blob/simplest-warning-producer/src/main/include/Robot.h
Platform:
WPILib project information:
Additional context
targetPlatform wpi.platforms.roborio
from build.gradle removes this problem.The text was updated successfully, but these errors were encountered: