OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::vbtracker::BodyReporting Class Reference

#include </home/jenkins/root/workspace/OSVR-Core-Docs/plugins/unifiedvideoinertialtracker/ThreadsafeBodyReporting.h>

Public Member Functions

mainloop-thread methods
bool getReport (double additionalPrediction, BodyReport &report)
 
processing-thread methods
bool updateState (util::time::TimeValue const &tv, BodyState const &state)
 
void initProcessModel (BodyProcessModel const &process)
 
void setTrackerToRoomTransform (Eigen::Isometry3d const &xform)
 

Static Public Member Functions

static std::unique_ptr
< BodyReporting
make ()
 Factory function.
 

Detailed Description

A per-body class intended to marshall data coming from the tracking/processing thread back to the mainloop thread.

Definition at line 65 of file ThreadsafeBodyReporting.h.

Member Function Documentation

bool osvr::vbtracker::BodyReporting::getReport ( double  additionalPrediction,
BodyReport report 
)

Attempts to receive a report: "consumes" as many as there are available, using the last one produced for further computation. If a process model and non-zero velocity are available, the state is predicted from the reported timestamp to "now" (or now + additionalPrediction if nonzero). If false is returned, no reports were available to consume.

Thaw out the frozen state.

Difference between measurement time and now.

and the additional time into the future we'd like to predict.

Using computeEstimate instead of the normal prediction saves us the unneeded prediction of the error covariance.

Be sure to post-correct.

OK, now set a proper timestamp for our prediction.

Definition at line 87 of file ThreadsafeBodyReporting.cpp.

bool osvr::vbtracker::BodyReporting::updateState ( util::time::TimeValue const &  tv,
BodyState const &  state 
)

"Produces" an updated state.

Returns
false if there was no room in the queue.

Initialize the array inside the queue value

Definition at line 140 of file ThreadsafeBodyReporting.cpp.

void osvr::vbtracker::BodyReporting::initProcessModel ( BodyProcessModel const &  process)

One-time call: sets up the process model, allowing the consumer end of this class to predict to "now".

Definition at line 152 of file ThreadsafeBodyReporting.cpp.

void osvr::vbtracker::BodyReporting::setTrackerToRoomTransform ( Eigen::Isometry3d const &  xform)

This only needs to be called once - it sets a transform that will be applied to each report just before it is used by the receiving thread.

Definition at line 158 of file ThreadsafeBodyReporting.cpp.


The documentation for this class was generated from the following files: