mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[examples] Fix memory over-allocation in Apriltag examples (#6517)
Change hamming distance to 1, add comment about memory usage.
This commit is contained in:
@@ -37,8 +37,11 @@ class Robot : public frc::TimedRobot {
|
||||
private:
|
||||
static void VisionThread() {
|
||||
frc::AprilTagDetector detector;
|
||||
// look for tag36h11, correct 3 error bits
|
||||
detector.AddFamily("tag36h11", 3);
|
||||
// look for tag36h11, correct 1 error bit
|
||||
// hamming 1 allocates 781KB, 2 allocates 27.4 MB, 3 allocates 932 MB
|
||||
// max of 1 recommended for RoboRIO 1, while hamming 2 is feasible on the
|
||||
// RoboRIO 2
|
||||
detector.AddFamily("tag36h11", 1);
|
||||
|
||||
// Set up Pose Estimator - parameters are for a Microsoft Lifecam HD-3000
|
||||
// (https://www.chiefdelphi.com/t/wpilib-apriltagdetector-sample-code/421411/21)
|
||||
|
||||
Reference in New Issue
Block a user