mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Upgrade to wpiformat 2025.48 (#2186)
This commit is contained in:
@@ -68,19 +68,26 @@ ForEachMacros:
|
|||||||
- BOOST_FOREACH
|
- BOOST_FOREACH
|
||||||
IncludeBlocks: Regroup
|
IncludeBlocks: Regroup
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
- Regex: '^<ext/.*\.h>'
|
# C standard library headers
|
||||||
Priority: 2
|
#
|
||||||
SortPriority: 0
|
# https://en.cppreference.com/w/cpp/header:
|
||||||
- Regex: '^<.*\.h>'
|
# * C compatibility headers
|
||||||
|
# * Special C compatibility headers
|
||||||
|
# * Empty C headers
|
||||||
|
# * Meaningless C headers
|
||||||
|
# * Unsupported C headers
|
||||||
|
- Regex: '^<(assert\.h|ctype\.h|errno\.h|fenv\.h|float\.h|inttypes\.h|limits\.h|locale\.h|math\.h|setjmp\.h|signal\.h|stdarg\.h|stddef\.h|stdint\.h|stdio\.h|stdlib\.h|string\.h|time\.h|uchar\.h|wchar\.h|wctype\.h|stdatomic\.h|ccomplex|complex\.h|ctgmath|tgmath\.h|ciso646|cstdalign|cstdbool|iso646\.h|stdalign\.h|stdbool\.h|stdatomic\.h|stdnoreturn\.h|threads\.h)>'
|
||||||
Priority: 1
|
Priority: 1
|
||||||
SortPriority: 0
|
# C++ standard library headers (lowercase and underscores with no .h suffix)
|
||||||
- Regex: '^<.*'
|
- Regex: '^<[a-z_]+>'
|
||||||
Priority: 2
|
Priority: 2
|
||||||
SortPriority: 0
|
# Other library headers (angle brackets)
|
||||||
- Regex: '.*'
|
- Regex: '^<.*'
|
||||||
Priority: 3
|
Priority: 3
|
||||||
SortPriority: 0
|
# Project headers (double quotes)
|
||||||
IncludeIsMainRegex: '([-_](test|unittest))?$'
|
- Regex: '^".*'
|
||||||
|
Priority: 4
|
||||||
|
IncludeIsMainRegex: '(Test|_test)?$'
|
||||||
IncludeIsMainSourceRegex: ''
|
IncludeIsMainSourceRegex: ''
|
||||||
IndentCaseLabels: true
|
IndentCaseLabels: true
|
||||||
IndentGotoLabels: true
|
IndentGotoLabels: true
|
||||||
@@ -136,7 +143,7 @@ RawStringFormats:
|
|||||||
CanonicalDelimiter: ''
|
CanonicalDelimiter: ''
|
||||||
BasedOnStyle: google
|
BasedOnStyle: google
|
||||||
ReflowComments: true
|
ReflowComments: true
|
||||||
SortIncludes: false
|
SortIncludes: true
|
||||||
SortUsingDeclarations: true
|
SortUsingDeclarations: true
|
||||||
SpaceAfterCStyleCast: false
|
SpaceAfterCStyleCast: false
|
||||||
SpaceAfterLogicalNot: false
|
SpaceAfterLogicalNot: false
|
||||||
|
|||||||
2
.github/workflows/lint-format.yml
vendored
2
.github/workflows/lint-format.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.11
|
||||||
- name: Install wpiformat
|
- name: Install wpiformat
|
||||||
run: pip3 install wpiformat==2025.34
|
run: pip3 install wpiformat==2025.48
|
||||||
- name: Run
|
- name: Run
|
||||||
run: wpiformat
|
run: wpiformat
|
||||||
- name: Check output
|
- name: Check output
|
||||||
|
|||||||
32
.styleguide
32
.styleguide
@@ -1,8 +1,5 @@
|
|||||||
cppHeaderFileInclude {
|
cppHeaderFileInclude {
|
||||||
\.h$
|
\.h$
|
||||||
\.hpp$
|
|
||||||
\.inc$
|
|
||||||
\.inl$
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cppSrcFileInclude {
|
cppSrcFileInclude {
|
||||||
@@ -10,32 +7,21 @@ cppSrcFileInclude {
|
|||||||
}
|
}
|
||||||
|
|
||||||
modifiableFileExclude {
|
modifiableFileExclude {
|
||||||
\.jpg$
|
|
||||||
\.jpeg$
|
|
||||||
\.png$
|
|
||||||
\.gif$
|
|
||||||
\.so$
|
|
||||||
\.dll$
|
\.dll$
|
||||||
\.webp$
|
\.gif$
|
||||||
\.ico$
|
\.ico$
|
||||||
\.rknn$
|
\.jpeg$
|
||||||
\.tflite$
|
\.jpg$
|
||||||
\.mp4$
|
\.mp4$
|
||||||
|
\.png$
|
||||||
|
\.rknn$
|
||||||
|
\.so$
|
||||||
|
\.tflite$
|
||||||
\.ttf$
|
\.ttf$
|
||||||
|
\.webp$
|
||||||
\.woff2$
|
\.woff2$
|
||||||
gradlew
|
gradlew
|
||||||
photon-lib/py/photonlibpy/generated/
|
photon-lib/py/photonlibpy/generated/
|
||||||
photon-targeting/src/main/native/cpp/photon/constrained_solvepnp/generate/
|
|
||||||
photon-targeting/src/generated/
|
photon-targeting/src/generated/
|
||||||
}
|
photon-targeting/src/main/native/cpp/photon/constrained_solvepnp/generate/
|
||||||
|
|
||||||
includeProject {
|
|
||||||
^photonLib/
|
|
||||||
}
|
|
||||||
|
|
||||||
includeOtherLibs {
|
|
||||||
^frc/
|
|
||||||
^networktables/
|
|
||||||
^units/
|
|
||||||
^wpi/
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
|
|
||||||
modifiableFileExclude {
|
modifiableFileExclude {
|
||||||
\.jpg$
|
|
||||||
\.jpeg$
|
|
||||||
\.png$
|
|
||||||
\.gif$
|
|
||||||
\.so$
|
|
||||||
\.pdf$
|
|
||||||
\.mp4$
|
|
||||||
\.dll$
|
\.dll$
|
||||||
\.webp$
|
\.gif$
|
||||||
\.ico$
|
\.ico$
|
||||||
|
\.jpeg$
|
||||||
|
\.jpg$
|
||||||
|
\.mp4$
|
||||||
|
\.pdf$
|
||||||
|
\.png$
|
||||||
\.rknn$
|
\.rknn$
|
||||||
\.tflite$
|
\.so$
|
||||||
\.svg$
|
\.svg$
|
||||||
|
\.tflite$
|
||||||
|
\.webp$
|
||||||
\.woff2$
|
\.woff2$
|
||||||
gradlew
|
gradlew
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,6 @@
|
|||||||
|
|
||||||
#include "photon/PhotonCamera.h"
|
#include "photon/PhotonCamera.h"
|
||||||
|
|
||||||
#include <hal/FRCUsageReporting.h>
|
|
||||||
#include <net/TimeSyncServer.h>
|
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
@@ -36,6 +33,8 @@
|
|||||||
#include <frc/Errors.h>
|
#include <frc/Errors.h>
|
||||||
#include <frc/RobotController.h>
|
#include <frc/RobotController.h>
|
||||||
#include <frc/Timer.h>
|
#include <frc/Timer.h>
|
||||||
|
#include <hal/FRCUsageReporting.h>
|
||||||
|
#include <net/TimeSyncServer.h>
|
||||||
#include <opencv2/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
#include <opencv2/core/mat.hpp>
|
#include <opencv2/core/mat.hpp>
|
||||||
#include <wpi/json.h>
|
#include <wpi/json.h>
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include "photon/PhotonPoseEstimator.h"
|
#include "photon/PhotonPoseEstimator.h"
|
||||||
|
|
||||||
#include <hal/FRCUsageReporting.h>
|
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@@ -41,6 +39,7 @@
|
|||||||
#include <frc/geometry/Pose3d.h>
|
#include <frc/geometry/Pose3d.h>
|
||||||
#include <frc/geometry/Rotation3d.h>
|
#include <frc/geometry/Rotation3d.h>
|
||||||
#include <frc/geometry/Transform3d.h>
|
#include <frc/geometry/Transform3d.h>
|
||||||
|
#include <hal/FRCUsageReporting.h>
|
||||||
#include <opencv2/calib3d.hpp>
|
#include <opencv2/calib3d.hpp>
|
||||||
#include <opencv2/core/mat.hpp>
|
#include <opencv2/core/mat.hpp>
|
||||||
#include <opencv2/core/types.hpp>
|
#include <opencv2/core/types.hpp>
|
||||||
|
|||||||
@@ -24,7 +24,16 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <limits>
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <cameraserver/CameraServer.h>
|
#include <cameraserver/CameraServer.h>
|
||||||
|
#include <frc/Timer.h>
|
||||||
|
#include <frc/apriltag/AprilTagFieldLayout.h>
|
||||||
|
#include <frc/apriltag/AprilTagFields.h>
|
||||||
#include <photon/PhotonCamera.h>
|
#include <photon/PhotonCamera.h>
|
||||||
#include <photon/PhotonTargetSortMode.h>
|
#include <photon/PhotonTargetSortMode.h>
|
||||||
#include <photon/estimation/CameraTargetRelation.h>
|
#include <photon/estimation/CameraTargetRelation.h>
|
||||||
@@ -33,16 +42,6 @@
|
|||||||
#include <photon/simulation/SimCameraProperties.h>
|
#include <photon/simulation/SimCameraProperties.h>
|
||||||
#include <photon/simulation/VideoSimUtil.h>
|
#include <photon/simulation/VideoSimUtil.h>
|
||||||
#include <photon/simulation/VisionTargetSim.h>
|
#include <photon/simulation/VisionTargetSim.h>
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <limits>
|
|
||||||
#include <string>
|
|
||||||
#include <utility>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include <frc/Timer.h>
|
|
||||||
#include <frc/apriltag/AprilTagFieldLayout.h>
|
|
||||||
#include <frc/apriltag/AprilTagFields.h>
|
|
||||||
#include <units/math.h>
|
#include <units/math.h>
|
||||||
#include <wpi/timestamp.h>
|
#include <wpi/timestamp.h>
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <photon/estimation/OpenCVHelp.h>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -37,6 +35,7 @@
|
|||||||
#include <frc/MathUtil.h>
|
#include <frc/MathUtil.h>
|
||||||
#include <frc/geometry/Rotation2d.h>
|
#include <frc/geometry/Rotation2d.h>
|
||||||
#include <frc/geometry/Translation3d.h>
|
#include <frc/geometry/Translation3d.h>
|
||||||
|
#include <photon/estimation/OpenCVHelp.h>
|
||||||
#include <units/frequency.h>
|
#include <units/frequency.h>
|
||||||
#include <units/time.h>
|
#include <units/time.h>
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cscore_cv.h>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -33,6 +31,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <cscore_cv.h>
|
||||||
#include <frc/apriltag/AprilTag.h>
|
#include <frc/apriltag/AprilTag.h>
|
||||||
#include <opencv2/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
#include <opencv2/imgcodecs.hpp>
|
#include <opencv2/imgcodecs.hpp>
|
||||||
|
|||||||
@@ -22,20 +22,19 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <fmt/ranges.h>
|
#include <fmt/ranges.h>
|
||||||
|
#include <frc/smartdashboard/SmartDashboard.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <hal/HAL.h>
|
#include <hal/HAL.h>
|
||||||
#include <net/TimeSyncClient.h>
|
#include <net/TimeSyncClient.h>
|
||||||
#include <net/TimeSyncServer.h>
|
#include <net/TimeSyncServer.h>
|
||||||
|
#include <networktables/NetworkTableInstance.h>
|
||||||
#include <photon/PhotonCamera.h>
|
#include <photon/PhotonCamera.h>
|
||||||
#include <photon/simulation/PhotonCameraSim.h>
|
#include <photon/simulation/PhotonCameraSim.h>
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include <frc/smartdashboard/SmartDashboard.h>
|
|
||||||
#include <networktables/NetworkTableInstance.h>
|
|
||||||
|
|
||||||
TEST(TimeSyncProtocolTest, Smoketest) {
|
TEST(TimeSyncProtocolTest, Smoketest) {
|
||||||
using namespace wpi::tsp;
|
using namespace wpi::tsp;
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "photon/PhotonPoseEstimator.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -30,13 +32,12 @@
|
|||||||
#include <frc/geometry/Pose3d.h>
|
#include <frc/geometry/Pose3d.h>
|
||||||
#include <frc/geometry/Rotation3d.h>
|
#include <frc/geometry/Rotation3d.h>
|
||||||
#include <frc/geometry/Transform3d.h>
|
#include <frc/geometry/Transform3d.h>
|
||||||
|
#include <gtest/gtest.h>
|
||||||
#include <units/angle.h>
|
#include <units/angle.h>
|
||||||
#include <units/length.h>
|
#include <units/length.h>
|
||||||
#include <wpi/SmallVector.h>
|
#include <wpi/SmallVector.h>
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
|
||||||
#include "photon/PhotonCamera.h"
|
#include "photon/PhotonCamera.h"
|
||||||
#include "photon/PhotonPoseEstimator.h"
|
|
||||||
#include "photon/dataflow/structures/Packet.h"
|
#include "photon/dataflow/structures/Packet.h"
|
||||||
#include "photon/simulation/PhotonCameraSim.h"
|
#include "photon/simulation/PhotonCameraSim.h"
|
||||||
#include "photon/simulation/SimCameraProperties.h"
|
#include "photon/simulation/SimCameraProperties.h"
|
||||||
|
|||||||
@@ -22,7 +22,8 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
|
||||||
#include "photon/PhotonUtils.h"
|
#include "photon/PhotonUtils.h"
|
||||||
|
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
TEST(PhotonUtilsTest, Include) {}
|
TEST(PhotonUtilsTest, Include) {}
|
||||||
|
|||||||
@@ -24,8 +24,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include "PhotonVersion.h"
|
#include "PhotonVersion.h"
|
||||||
#include "gtest/gtest.h"
|
|
||||||
|
|
||||||
TEST(VersionTest, PrintVersion) {
|
TEST(VersionTest, PrintVersion) {
|
||||||
std::cout << photon::PhotonVersion::versionString << std::endl;
|
std::cout << photon::PhotonVersion::versionString << std::endl;
|
||||||
|
|||||||
@@ -22,16 +22,17 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "photon/simulation/VisionSystemSim.h"
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <gtest/gtest.h>
|
||||||
#include <wpi/deprecated.h>
|
#include <wpi/deprecated.h>
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
|
||||||
#include "photon/PhotonUtils.h"
|
#include "photon/PhotonUtils.h"
|
||||||
#include "photon/simulation/VisionSystemSim.h"
|
|
||||||
|
|
||||||
// Ignore GetLatestResult warnings
|
// Ignore GetLatestResult warnings
|
||||||
WPI_IGNORE_DEPRECATED
|
WPI_IGNORE_DEPRECATED
|
||||||
|
|||||||
@@ -17,9 +17,6 @@
|
|||||||
|
|
||||||
#include "net/TimeSyncClient.h"
|
#include "net/TimeSyncClient.h"
|
||||||
|
|
||||||
#include <wpinet/UDPClient.h>
|
|
||||||
#include <wpinet/uv/util.h>
|
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@@ -33,6 +30,8 @@
|
|||||||
#include <wpi/Logger.h>
|
#include <wpi/Logger.h>
|
||||||
#include <wpi/print.h>
|
#include <wpi/print.h>
|
||||||
#include <wpi/struct/Struct.h>
|
#include <wpi/struct/Struct.h>
|
||||||
|
#include <wpinet/UDPClient.h>
|
||||||
|
#include <wpinet/uv/util.h>
|
||||||
|
|
||||||
#include "ntcore_cpp.h"
|
#include "ntcore_cpp.h"
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,6 @@
|
|||||||
|
|
||||||
#include "net/TimeSyncServer.h"
|
#include "net/TimeSyncServer.h"
|
||||||
|
|
||||||
#include <wpinet/UDPClient.h>
|
|
||||||
#include <wpinet/uv/util.h>
|
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@@ -32,6 +29,8 @@
|
|||||||
#include <wpi/Logger.h>
|
#include <wpi/Logger.h>
|
||||||
#include <wpi/print.h>
|
#include <wpi/print.h>
|
||||||
#include <wpi/struct/Struct.h>
|
#include <wpi/struct/Struct.h>
|
||||||
|
#include <wpinet/UDPClient.h>
|
||||||
|
#include <wpinet/uv/util.h>
|
||||||
|
|
||||||
#include "ntcore_cpp.h"
|
#include "ntcore_cpp.h"
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
#include "photon/constrained_solvepnp/wrap/casadi_wrapper.h"
|
#include "photon/constrained_solvepnp/wrap/casadi_wrapper.h"
|
||||||
|
|
||||||
#include <fmt/core.h>
|
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -28,6 +26,7 @@
|
|||||||
#include <Eigen/Cholesky>
|
#include <Eigen/Cholesky>
|
||||||
#include <Eigen/Core>
|
#include <Eigen/Core>
|
||||||
#include <Eigen/LU>
|
#include <Eigen/LU>
|
||||||
|
#include <fmt/core.h>
|
||||||
#include <frc/fmt/Eigen.h>
|
#include <frc/fmt/Eigen.h>
|
||||||
#include <wpi/timestamp.h>
|
#include <wpi/timestamp.h>
|
||||||
|
|
||||||
|
|||||||
@@ -17,12 +17,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <wpinet/EventLoopRunner.h>
|
|
||||||
#include <wpinet/UDPClient.h>
|
|
||||||
#include <wpinet/uv/Buffer.h>
|
|
||||||
#include <wpinet/uv/Timer.h>
|
|
||||||
#include <wpinet/uv/Udp.h>
|
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@@ -40,6 +34,11 @@
|
|||||||
#include <wpi/print.h>
|
#include <wpi/print.h>
|
||||||
#include <wpi/static_circular_buffer.h>
|
#include <wpi/static_circular_buffer.h>
|
||||||
#include <wpi/struct/Struct.h>
|
#include <wpi/struct/Struct.h>
|
||||||
|
#include <wpinet/EventLoopRunner.h>
|
||||||
|
#include <wpinet/UDPClient.h>
|
||||||
|
#include <wpinet/uv/Buffer.h>
|
||||||
|
#include <wpinet/uv/Timer.h>
|
||||||
|
#include <wpinet/uv/Udp.h>
|
||||||
|
|
||||||
#include "TimeSyncStructs.h"
|
#include "TimeSyncStructs.h"
|
||||||
#include "ntcore_cpp.h"
|
#include "ntcore_cpp.h"
|
||||||
|
|||||||
@@ -17,12 +17,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <wpinet/EventLoopRunner.h>
|
|
||||||
#include <wpinet/UDPClient.h>
|
|
||||||
#include <wpinet/uv/Buffer.h>
|
|
||||||
#include <wpinet/uv/Timer.h>
|
|
||||||
#include <wpinet/uv/Udp.h>
|
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@@ -38,6 +32,11 @@
|
|||||||
#include <wpi/Logger.h>
|
#include <wpi/Logger.h>
|
||||||
#include <wpi/print.h>
|
#include <wpi/print.h>
|
||||||
#include <wpi/struct/Struct.h>
|
#include <wpi/struct/Struct.h>
|
||||||
|
#include <wpinet/EventLoopRunner.h>
|
||||||
|
#include <wpinet/UDPClient.h>
|
||||||
|
#include <wpinet/uv/Buffer.h>
|
||||||
|
#include <wpinet/uv/Timer.h>
|
||||||
|
#include <wpinet/uv/Udp.h>
|
||||||
|
|
||||||
#include "TimeSyncStructs.h"
|
#include "TimeSyncStructs.h"
|
||||||
#include "ntcore_cpp.h"
|
#include "ntcore_cpp.h"
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
|
|
||||||
#define OPENCV_DISABLE_EIGEN_TENSOR_SUPPORT
|
#define OPENCV_DISABLE_EIGEN_TENSOR_SUPPORT
|
||||||
#include <opencv2/core/eigen.hpp>
|
#include <opencv2/core/eigen.hpp>
|
||||||
#include "photon/targeting/PnpResult.h"
|
|
||||||
#include "photon/targeting/MultiTargetPNPResult.h"
|
|
||||||
|
|
||||||
|
#include "photon/targeting/MultiTargetPNPResult.h"
|
||||||
|
#include "photon/targeting/PnpResult.h"
|
||||||
#include "photon/targeting/TargetCorner.h"
|
#include "photon/targeting/TargetCorner.h"
|
||||||
|
|
||||||
namespace photon {
|
namespace photon {
|
||||||
|
|||||||
@@ -15,13 +15,13 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <fmt/core.h>
|
|
||||||
#include <fmt/ranges.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <span>
|
#include <span>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <fmt/core.h>
|
||||||
|
#include <fmt/ranges.h>
|
||||||
|
|
||||||
#include "org_photonvision_jni_ConstrainedSolvepnpJni.h"
|
#include "org_photonvision_jni_ConstrainedSolvepnpJni.h"
|
||||||
#include "photon/constrained_solvepnp/wrap/casadi_wrapper.h"
|
#include "photon/constrained_solvepnp/wrap/casadi_wrapper.h"
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <org_photonvision_jni_TimeSyncClient.h>
|
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <org_photonvision_jni_TimeSyncClient.h>
|
||||||
|
|
||||||
#include "jni_utils.h"
|
#include "jni_utils.h"
|
||||||
#include "net/TimeSyncClient.h"
|
#include "net/TimeSyncClient.h"
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
#include <org_photonvision_jni_TimeSyncClient.h>
|
#include <org_photonvision_jni_TimeSyncClient.h>
|
||||||
#include <org_photonvision_jni_TimeSyncServer.h>
|
#include <org_photonvision_jni_TimeSyncServer.h>
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
|
|
||||||
#include "jni_utils.h"
|
#include "jni_utils.h"
|
||||||
#include "net/TimeSyncServer.h"
|
#include "net/TimeSyncServer.h"
|
||||||
|
|
||||||
|
|||||||
@@ -15,13 +15,12 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <gtest/gtest.h>
|
||||||
#include <wpi/timestamp.h>
|
#include <wpi/timestamp.h>
|
||||||
|
|
||||||
#include "photon/constrained_solvepnp/wrap/casadi_wrapper.h"
|
#include "photon/constrained_solvepnp/wrap/casadi_wrapper.h"
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "photon/dataflow/structures/Packet.h"
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@@ -22,7 +24,6 @@
|
|||||||
#include <wpi/print.h>
|
#include <wpi/print.h>
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "photon/dataflow/structures/Packet.h"
|
|
||||||
#include "photon/targeting/MultiTargetPNPResult.h"
|
#include "photon/targeting/MultiTargetPNPResult.h"
|
||||||
#include "photon/targeting/PhotonPipelineResult.h"
|
#include "photon/targeting/PhotonPipelineResult.h"
|
||||||
#include "photon/targeting/PhotonTrackedTarget.h"
|
#include "photon/targeting/PhotonTrackedTarget.h"
|
||||||
|
|||||||
@@ -24,12 +24,11 @@
|
|||||||
|
|
||||||
#include "Robot.h"
|
#include "Robot.h"
|
||||||
|
|
||||||
#include <photon/PhotonUtils.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <frc/simulation/BatterySim.h>
|
#include <frc/simulation/BatterySim.h>
|
||||||
#include <frc/simulation/RoboRioSim.h>
|
#include <frc/simulation/RoboRioSim.h>
|
||||||
|
#include <photon/PhotonUtils.h>
|
||||||
|
|
||||||
void Robot::RobotInit() {}
|
void Robot::RobotInit() {}
|
||||||
|
|
||||||
|
|||||||
@@ -24,10 +24,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <photon/PhotonCamera.h>
|
|
||||||
|
|
||||||
#include <frc/TimedRobot.h>
|
#include <frc/TimedRobot.h>
|
||||||
#include <frc/XboxController.h>
|
#include <frc/XboxController.h>
|
||||||
|
#include <photon/PhotonCamera.h>
|
||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
#include "VisionSim.h"
|
#include "VisionSim.h"
|
||||||
|
|||||||
@@ -24,6 +24,11 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include <frc/apriltag/AprilTagFieldLayout.h>
|
||||||
|
#include <frc/apriltag/AprilTagFields.h>
|
||||||
#include <photon/PhotonCamera.h>
|
#include <photon/PhotonCamera.h>
|
||||||
#include <photon/PhotonPoseEstimator.h>
|
#include <photon/PhotonPoseEstimator.h>
|
||||||
#include <photon/estimation/VisionEstimation.h>
|
#include <photon/estimation/VisionEstimation.h>
|
||||||
@@ -31,12 +36,6 @@
|
|||||||
#include <photon/simulation/VisionTargetSim.h>
|
#include <photon/simulation/VisionTargetSim.h>
|
||||||
#include <photon/targeting/PhotonPipelineResult.h>
|
#include <photon/targeting/PhotonPipelineResult.h>
|
||||||
|
|
||||||
#include <limits>
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include <frc/apriltag/AprilTagFieldLayout.h>
|
|
||||||
#include <frc/apriltag/AprilTagFields.h>
|
|
||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
|
|
||||||
class VisionSim {
|
class VisionSim {
|
||||||
|
|||||||
@@ -24,10 +24,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <photon/PhotonCamera.h>
|
|
||||||
|
|
||||||
#include <frc/TimedRobot.h>
|
#include <frc/TimedRobot.h>
|
||||||
#include <frc/XboxController.h>
|
#include <frc/XboxController.h>
|
||||||
|
#include <photon/PhotonCamera.h>
|
||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
#include "VisionSim.h"
|
#include "VisionSim.h"
|
||||||
|
|||||||
@@ -24,6 +24,11 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include <frc/apriltag/AprilTagFieldLayout.h>
|
||||||
|
#include <frc/apriltag/AprilTagFields.h>
|
||||||
#include <photon/PhotonCamera.h>
|
#include <photon/PhotonCamera.h>
|
||||||
#include <photon/PhotonPoseEstimator.h>
|
#include <photon/PhotonPoseEstimator.h>
|
||||||
#include <photon/estimation/VisionEstimation.h>
|
#include <photon/estimation/VisionEstimation.h>
|
||||||
@@ -31,12 +36,6 @@
|
|||||||
#include <photon/simulation/VisionTargetSim.h>
|
#include <photon/simulation/VisionTargetSim.h>
|
||||||
#include <photon/targeting/PhotonPipelineResult.h>
|
#include <photon/targeting/PhotonPipelineResult.h>
|
||||||
|
|
||||||
#include <limits>
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include <frc/apriltag/AprilTagFieldLayout.h>
|
|
||||||
#include <frc/apriltag/AprilTagFields.h>
|
|
||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
|
|
||||||
class VisionSim {
|
class VisionSim {
|
||||||
|
|||||||
@@ -24,19 +24,18 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <photon/PhotonCamera.h>
|
|
||||||
#include <photon/PhotonPoseEstimator.h>
|
|
||||||
#include <photon/estimation/VisionEstimation.h>
|
|
||||||
#include <photon/simulation/VisionSystemSim.h>
|
|
||||||
#include <photon/simulation/VisionTargetSim.h>
|
|
||||||
#include <photon/targeting/PhotonPipelineResult.h>
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <frc/apriltag/AprilTagFieldLayout.h>
|
#include <frc/apriltag/AprilTagFieldLayout.h>
|
||||||
#include <frc/apriltag/AprilTagFields.h>
|
#include <frc/apriltag/AprilTagFields.h>
|
||||||
|
#include <photon/PhotonCamera.h>
|
||||||
|
#include <photon/PhotonPoseEstimator.h>
|
||||||
|
#include <photon/estimation/VisionEstimation.h>
|
||||||
|
#include <photon/simulation/VisionSystemSim.h>
|
||||||
|
#include <photon/simulation/VisionTargetSim.h>
|
||||||
|
#include <photon/targeting/PhotonPipelineResult.h>
|
||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user