#include </home/jenkins/root/workspace/OSVR-Core-Docs/plugins/unifiedvideoinertialtracker/TrackedBodyTarget.h>
Classes | |
struct | Impl |
Public Member Functions | |
TrackedBodyTarget (TrackedBody &body, BodyTargetInterface const &bodyIface, Eigen::Vector3d const &targetToBody, TargetSetupData const &setupData, TargetId id) | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW std::vector< BeaconData > const & | getBeaconDebugData () const |
UnderlyingBeaconIdType | getNumBeacons () const |
TrackedBody & | getBody () |
TrackedBody const & | getBody () const |
TargetId | getId () const |
Get the target id within this body. | |
BodyTargetId | getQualifiedId () const |
Get a fully-qualified (within a tracking system) id for this target. | |
Eigen::Vector3d | getBeaconAutocalibPosition (ZeroBasedBeaconId i) const |
Eigen::Vector3d | getBeaconAutocalibVariance (ZeroBasedBeaconId i) const |
void | resetBeaconAutocalib () |
Reset beacon autocalibration position and variance. | |
std::size_t | processLedMeasurements (LedMeasurementVec const &undistortedLeds) |
void | disableKalman () |
void | permitKalman () |
bool | updatePoseEstimateFromLeds (CameraParameters const &camParams, osvr::util::time::TimeValue const &tv, BodyState &bodyState, osvr::util::time::TimeValue const &startingTime, bool validStateAndTime) |
bool | uncalibratedRANSACPoseEstimateFromLeds (CameraParameters const &camParams, Eigen::Vector3d &xlate, Eigen::Quaterniond &quat, int skipBrightsCutoff=-1, std::size_t iterations=5) |
bool | hasPoseEstimate () const |
osvr::util::time::TimeValue const & | getLastUpdate () const |
Eigen::Vector3d const & | getBeaconOffset () const |
LedGroup const & | leds () const |
Get all beacons/leds, including unrecognized ones. | |
LedPtrList const & | usableLeds () const |
Get a list of pointers to all recognized, in-range beacons/leds. | |
std::size_t | numTrackingResets () const |
double | getInternalStatusMeasurement (TargetStatusMeasurement measurement) const |
Eigen::Vector3d const & | getTargetToBody () const |
Eigen::Vector3d | getStateCorrection () const |
Get the beacon offset transformed into world space. | |
Eigen::Vector3d | computeTranslationCorrectionToBody (Eigen::Quaterniond const &orientation) const |
Static Public Member Functions | |
static Eigen::Vector3d | computeTranslationCorrection (Eigen::Vector3d const &bodyFrameOffset, Eigen::Quaterniond const &orientation) |
Corresponds to a rigid arrangements of discrete beacons detected by video-based tracking - typically IR LEDs.
Definition at line 77 of file TrackedBodyTarget.h.
osvr::vbtracker::TrackedBodyTarget::TrackedBodyTarget | ( | TrackedBody & | body, |
BodyTargetInterface const & | bodyIface, | ||
Eigen::Vector3d const & | targetToBody, | ||
TargetSetupData const & | setupData, | ||
TargetId | id | ||
) |
Create the beacon state objects and initialize the beacon offset.
Make a copy of those beacons.
Create the beacon debug data
Create the LED identifier
Definition at line 230 of file TrackedBodyTarget.cpp.
Eigen::Vector3d osvr::vbtracker::TrackedBodyTarget::getBeaconAutocalibPosition | ( | ZeroBasedBeaconId | i | ) | const |
Used to extract autocalibration results in a standalone calibration app, and to show information in a debug window.
Definition at line 285 of file TrackedBodyTarget.cpp.
Eigen::Vector3d osvr::vbtracker::TrackedBodyTarget::getBeaconAutocalibVariance | ( | ZeroBasedBeaconId | i | ) | const |
Used to extract autocalibration results in a standalone calibration app
Definition at line 295 of file TrackedBodyTarget.cpp.
std::size_t osvr::vbtracker::TrackedBodyTarget::processLedMeasurements | ( | LedMeasurementVec const & | undistortedLeds | ) |
Called each frame with the results of the blob finding and undistortion (part of the first phase of the tracking system)
Clear the "usableLeds" that will be populated in a later step, if we get that far.
Only bother resetting if anyone is actually going to receive the data.
For some reason, filtering in that measurement caused an LED object to go bad. The above function wiped the LED object, but let's undo the match and usage of the measurement in case it was someone else's.
this is how many elements the match-count early-out saved us
Do the initial filtering of the LED group to just the identified ones before we pass it to an estimator.
Definition at line 311 of file TrackedBodyTarget.cpp.
void osvr::vbtracker::TrackedBodyTarget::disableKalman | ( | ) |
Override configured setting, disabling Kalman (normal) operating mode.
Definition at line 451 of file TrackedBodyTarget.cpp.
void osvr::vbtracker::TrackedBodyTarget::permitKalman | ( | ) |
Override configured setting, permitting Kalman (normal) operating mode.
Definition at line 453 of file TrackedBodyTarget.cpp.
bool osvr::vbtracker::TrackedBodyTarget::updatePoseEstimateFromLeds | ( | CameraParameters const & | camParams, |
osvr::util::time::TimeValue const & | tv, | ||
BodyState & | bodyState, | ||
osvr::util::time::TimeValue const & | startingTime, | ||
bool | validStateAndTime | ||
) |
Update the pose estimate using the updated LEDs - part of the third phase of tracking.
Must pre/post correct the state by our offset :-/
Will we permit Kalman this estimation?
OK, now must decide who we talk to for pose estimation.
Lost tracking somehow and we're in a SCAAT state.
pre-estimation transitions based on overall health
Smooth RANSAC here - we haven't lost all sight.
Pre-estimation transitions per-state
main estimation dispatch
End of main estimation dispatch
post-estimation transitions (based on state)
Update our local target-specific timestamp
Corresponding post-correction.
Definition at line 455 of file TrackedBodyTarget.cpp.
bool osvr::vbtracker::TrackedBodyTarget::uncalibratedRANSACPoseEstimateFromLeds | ( | CameraParameters const & | camParams, |
Eigen::Vector3d & | xlate, | ||
Eigen::Quaterniond & | quat, | ||
int | skipBrightsCutoff = -1 , |
||
std::size_t | iterations = 5 |
||
) |
Perform a simple RANSAC pose estimation from updated LEDs (third phase of tracking) without storing the results internally or changing internal state, or using any internal calibration transforms. Intended for use during initial room calibration (startup).
camParams | Camera parameters for the image source (no distortion) | |
[out] | xlate | Pose estimate: translation in meters. Only modified if return value is true. |
[out] | quat | Pose estimate: rotation. Only modified if return value is true. |
skipBrightsCutoff | If positive, the number of non-bright LEDs seen that will trigger us to skip using bright LEDs in pose estimation. |
Definition at line 644 of file TrackedBodyTarget.cpp.
|
inline |
Did this target yet, or last time it was asked to, compute a pose estimate?
Definition at line 161 of file TrackedBodyTarget.h.
|
inline |
Get the offset that was subtracted from all beacon positions upon initialization.
Definition at line 167 of file TrackedBodyTarget.h.
std::size_t osvr::vbtracker::TrackedBodyTarget::numTrackingResets | ( | ) | const |
Get the number of times tracking has reset - for debugging/optimization.
Definition at line 761 of file TrackedBodyTarget.cpp.
double osvr::vbtracker::TrackedBodyTarget::getInternalStatusMeasurement | ( | TargetStatusMeasurement | measurement | ) | const |
A way for tuning and debugging applications to peer inside the implementation.
Definition at line 771 of file TrackedBodyTarget.cpp.