Monado OpenXR Runtime
xrt::auxiliary::tracking::psvr Namespace Reference

Namespace for PSVR tracking implementation. More...

Data Structures

struct  blob_point
 
struct  View
 
struct  model_vertex
 
struct  match_data
 
struct  match_model
 
class  TrackerPSVR
 Main PSVR tracking class. More...
 
struct  close_pair
 
struct  proximity_data
 
struct  Helper
 
struct  blob_data
 

Typedefs

typedef enum xrt::auxiliary::tracking::psvr::blob_type blob_type_t
 
typedef struct xrt::auxiliary::tracking::psvr::blob_point blob_point_t
 
typedef enum xrt::auxiliary::tracking::psvr::led_tag led_tag_t
 
typedef struct xrt::auxiliary::tracking::psvr::model_vertex model_vertex_t
 
typedef struct xrt::auxiliary::tracking::psvr::match_data match_data_t
 
typedef struct xrt::auxiliary::tracking::psvr::match_model match_model_t
 
typedef struct xrt::auxiliary::tracking::psvr::proximity_data proximity_data_t
 
typedef struct xrt::auxiliary::tracking::psvr::blob_data blob_data_t
 

Enumerations

enum  blob_type { BLOB_TYPE_UNKNOWN , BLOB_TYPE_SIDE , BLOB_TYPE_FRONT , BLOB_TYPE_REAR }
 
enum  led_tag {
  TAG_TL , TAG_TR , TAG_C , TAG_BL ,
  TAG_BR , TAG_SL , TAG_SR
}
 

Functions

static float dist_3d (Eigen::Vector4f a, Eigen::Vector4f b)
 
static float dist_3d_cv (const cv::Point3f &a, const cv::Point3f &b)
 
static void init_filter (cv::KalmanFilter &kf, float process_cov, float meas_cov, float dt)
 
static void filter_predict (std::vector< match_data_t > *pose, cv::KalmanFilter *filters, float dt)
 
static void filter_update (std::vector< match_data_t > *pose, cv::KalmanFilter *filters, float dt)
 
static void pose_filter_predict (Eigen::Vector4f *pose, cv::KalmanFilter *filter, float dt)
 
static void pose_filter_update (Eigen::Vector4f *position, cv::KalmanFilter *filter, float dt)
 
static bool match_possible (match_model_t *match)
 
static void verts_to_measurement (std::vector< blob_point_t > *meas_data, std::vector< match_data_t > *match_vertices)
 
static float last_diff (TrackerPSVR &t, std::vector< match_data_t > *meas_pose, std::vector< match_data_t > *last_pose)
 
static void remove_outliers (std::vector< blob_point_t > *orig_points, std::vector< blob_point_t > *pruned_points, float outlier_thresh)
 
static void merge_close_points (std::vector< blob_point_t > *orig_points, std::vector< blob_point_t > *merged_points, float merge_thresh)
 
static void match_triangles (Eigen::Matrix4f *t1_mat, Eigen::Matrix4f *t1_to_t2_mat, const Eigen::Vector4f &t1_a, const Eigen::Vector4f &t1_b, const Eigen::Vector4f &t1_c, const Eigen::Vector4f &t2_a, const Eigen::Vector4f &t2_b, const Eigen::Vector4f &t2_c)
 
static Eigen::Matrix4f solve_for_measurement (TrackerPSVR *t, std::vector< match_data_t > *measurement, std::vector< match_data_t > *solved)
 
static Eigen::Matrix4f solve_with_imu (TrackerPSVR &t, std::vector< match_data_t > *measurements, std::vector< match_data_t > *match_measurements, std::vector< match_data_t > *solved, float search_radius)
 
static Eigen::Matrix4f disambiguate (TrackerPSVR &t, std::vector< match_data_t > *measured_points, std::vector< match_data_t > *last_measurement, std::vector< match_data_t > *solved, uint32_t frame_no)
 
static void create_model (TrackerPSVR &t)
 
static void create_match_list (TrackerPSVR &t)
 
static void do_view (TrackerPSVR &t, View &view, cv::Mat &grey, cv::Mat &rgb)
 
static void sample_line (cv::Mat &src, const cv::Point2i &start, const cv::Point2i &end, int *inside_length)
 
static void blob_intersections (cv::Mat &src, cv::KeyPoint *kp, struct blob_data *bd)
 
static void tag_points (TrackerPSVR &t, std::vector< blob_data_t > *blob_datas)
 
static void process (TrackerPSVR &t, struct xrt_frame *xf)
 
static void run (TrackerPSVR &t)
 
static void get_pose (TrackerPSVR &t, timepoint_ns when_ns, struct xrt_space_relation *out_relation)
 
static void imu_data (TrackerPSVR &t, timepoint_ns timestamp_ns, struct xrt_tracking_sample *sample)
 
static void frame (TrackerPSVR &t, struct xrt_frame *xf)
 
static void break_apart (TrackerPSVR &t)
 

Detailed Description

Namespace for PSVR tracking implementation.

Function Documentation

◆ get_pose()

static void xrt::auxiliary::tracking::psvr::get_pose ( TrackerPSVR t,
timepoint_ns  when_ns,
struct xrt_space_relation out_relation 
)
static
Todo:
assuming that orientation is actually currently tracked.

References xrt::auxiliary::tracking::psvr::TrackerPSVR::oth.

◆ sample_line()

static void xrt::auxiliary::tracking::psvr::sample_line ( cv::Mat &  src,
const cv::Point2i &  start,
const cv::Point2i &  end,
int *  inside_length 
)
static
Todo:
: we are counting pixels rather than measuring length - bresenhams may introduce some inaccuracy here.