25 #ifndef INCLUDED_PoseEstimator_SCAATKalman_h_GUID_F1FC2154_E59B_4598_70C2_253F8EA31485 26 #define INCLUDED_PoseEstimator_SCAATKalman_h_GUID_F1FC2154_E59B_4598_70C2_253F8EA31485 45 enum class TriBool { False, True, Unknown };
46 enum class TrackingHealth {
49 SoftResetWhenBeaconsSeen
59 LedPtrList
filterLeds(LedPtrList
const &leds,
const bool skipBright,
60 const bool skipAll, std::size_t &numBad,
63 void resetCounters() {
64 m_framesInProbation = 0;
65 m_framesWithoutIdentifiedBlobs = 0;
66 m_framesWithoutUtilizedMeasurements = 0;
67 m_lastUsableBeaconsSeen = SIGNAL_HAVE_NOT_SEEN_BEACONS_YET;
69 m_ledsConsideredMisidentifiedLastFrame = 0;
70 m_ledsUsedLastFrame = 0;
71 m_misIDConsideredOurFault =
false;
81 TriBool inBoundingBoxRatioRange(
Led const &led);
83 void markAsPossiblyMisidentified(
Led &led);
84 void markAsUsed(
Led &led);
85 void handlePossiblyMisidentifiedLeds();
86 double getVarianceFromBeaconDepth(
double depth);
90 const bool m_shouldSkipBright;
91 const double m_maxResidual;
92 const double m_maxSquaredResidual;
93 const double m_maxZComponent;
94 const double m_highResidualVariancePenalty;
95 const double m_beaconProcessNoise;
96 const double m_noveltyPenaltyBase;
97 const double m_noBeaconLinearVelocityDecayCoefficient;
98 const double m_measurementVarianceScaleFactor;
99 const double m_brightLedVariancePenalty;
100 const double m_distanceMeasVarianceBase;
101 const double m_distanceMeasVarianceIntercept;
102 const bool m_extraVerbose;
103 std::mt19937 m_randEngine;
104 static const int SIGNAL_HAVE_NOT_SEEN_BEACONS_YET = -1;
105 int m_lastUsableBeaconsSeen = SIGNAL_HAVE_NOT_SEEN_BEACONS_YET;
106 std::size_t m_framesInProbation = 0;
107 std::size_t m_framesWithoutIdentifiedBlobs = 0;
108 std::size_t m_framesWithoutUtilizedMeasurements = 0;
109 std::vector<Led *> m_possiblyMisidentified;
110 std::size_t m_ledsUsed = 0;
111 std::size_t m_ledsConsideredMisidentifiedLastFrame = 0;
112 std::size_t m_ledsUsedLastFrame = 0;
113 bool m_misIDConsideredOurFault =
false;
118 #endif // INCLUDED_PoseEstimator_SCAATKalman_h_GUID_F1FC2154_E59B_4598_70C2_253F8EA31485 Helper class to keep track of the state of a blob over time.
Definition: LED.h:47
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
General configuration parameters.
Definition: ConfigParams.h:82
Definition: PoseEstimatorTypes.h:43
bool operator()(EstimatorInOutParams const &p, LedPtrList const &leds, osvr::util::time::TimeValue const &frameTime, double videoDt)
Definition: PoseEstimator_SCAATKalman.cpp:123
Definition: PoseEstimator_SCAATKalman.h:43
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81
LedPtrList filterLeds(LedPtrList const &leds, const bool skipBright, const bool skipAll, std::size_t &numBad, EstimatorInOutParams const &p)
Given a list of LED pointers, filters them out according to configured parameters, updates the debug data, and returns a list of just those LEDs to process.
Definition: PoseEstimator_SCAATKalman.cpp:456
TrackingHealth getTrackingHealth()
Determines whether the Kalman filter is in good working condition, should fall back to RANSAC immedia...
Definition: PoseEstimator_SCAATKalman.cpp:635