OSVR-Core
|
Public Types | |
enum | TriBool { False, True, Unknown } |
enum | TrackingHealth { Functioning, NeedsHardResetNow, SoftResetWhenBeaconsSeen } |
Public Member Functions | |
SCAATKalmanPoseEstimator (ConfigParams const ¶ms) | |
bool | operator() (EstimatorInOutParams const &p, LedPtrList const &leds, osvr::util::time::TimeValue const &frameTime, double videoDt) |
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. More... | |
void | resetCounters () |
TrackingHealth | getTrackingHealth () |
Determines whether the Kalman filter is in good working condition, should fall back to RANSAC immediately, or should fall back next time beacons are detected. More... | |
LedPtrList osvr::vbtracker::SCAATKalmanPoseEstimator::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.
This means the LED is pointed away from us - so we shouldn't be able to see it.
LED is too askew of the camera to provide reliable data, so skip it.
SCAATKalmanPoseEstimator::TrackingHealth osvr::vbtracker::SCAATKalmanPoseEstimator::getTrackingHealth | ( | ) |
Determines whether the Kalman filter is in good working condition, should fall back to RANSAC immediately, or should fall back next time beacons are detected.
When the algorithm switches back to Kalman, be sure to call resetCounters()
Additional case: We've been a while without blobs...
Otherwise, we're doing OK!
bool osvr::vbtracker::SCAATKalmanPoseEstimator::operator() | ( | EstimatorInOutParams const & | p, |
LedPtrList const & | leds, | ||
osvr::util::time::TimeValue const & | frameTime, | ||
double | videoDt | ||
) |
Count up types of beacons
Decisions based on the counts.
Predict first if appropriate.
If we have no good LEDs, let's attenuate the linear velocity quickly: avoid coasting/gliding.
Shuffle the order of the good LEDS
Stick a little bit of process model uncertainty in the beacon, if it's meant to have some
subtracting from image size to flip signs of x and y, aka 180 degree rotation about z axis.
Investigate measurement variance here (difference in measurement space from expected measurement based on the model) to decide if
Have to still count it as bad, in case it's our model, not the beacon, that's actually bad.
That was the last place we'd reject an LED, so now we can say for sure we're using this one.
Typically, all of these will be 1 except for the variance from beacon depth. At some distance past 55cm, bright LEDs actually have lower than average variances instead of higher, but the overall mean variance follows an exponential decay trend with distance.
Now, do the correction.
Probation: Dealing with ratios of bad to good residuals
Frames without measurements: dealing with getting in a bad state
We had a measurement, we rejected it. The problem may be the plank in our own eye, not the speck in our beacon's eye.
We're on the wrong side of the camera #fail This is a fix-up after the fact, rather than a prevention: if we get here, we goofed up earlier - but better late than never.