Actually detect apriltags
This does the line fits for the borders, finds the best up to 10
candidate corners, and picks the best one. It then does the final
filtering to pick which quads to evaluate, evaluates them, and then uses
aprilrobotics to refine and report out the solution.
There's a small (1e-3) discrepency on some of the tags to track down,
but overall it works pretty well. Takes 4ms to process the imx296
images.
Change-Id: I6cff5654252897f46def422c021b1dce74036476
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/orin/cuda.cc b/frc971/orin/cuda.cc
index 1173f73..89b1529 100644
--- a/frc971/orin/cuda.cc
+++ b/frc971/orin/cuda.cc
@@ -10,14 +10,20 @@
namespace frc971 {
namespace apriltag {
-void CheckAndSynchronize() {
- CHECK_CUDA(cudaDeviceSynchronize());
- CHECK_CUDA(cudaGetLastError());
+size_t overall_memory = 0;
+
+void CheckAndSynchronize(std::string_view message) {
+ CHECK_CUDA(cudaDeviceSynchronize()) << message;
+ CHECK_CUDA(cudaGetLastError()) << message;
}
void MaybeCheckAndSynchronize() {
if (FLAGS_sync) CheckAndSynchronize();
}
+void MaybeCheckAndSynchronize(std::string_view message) {
+ if (FLAGS_sync) CheckAndSynchronize(message);
+}
+
} // namespace apriltag
} // namespace frc971