You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
``get_schema_name()``, ``get_schema_text()``, and ``get_record_channels()``. Return
102
109
``SchemaTracker::get_required_extensions()`` for extensions; return the Record type name
103
110
and binary schema for MCAP; return at least one channel name.
104
-
- **Holds SchemaTrackerConfig** — Same logical fields as the pusher: ``collection_id``,
105
-
``max_flatbuffer_size``, ``tensor_identifier``, ``localized_name``. Must match the plugin.
106
-
- **create_tracker()** — Return an ``ITrackerImpl`` that holds a ``SchemaTracker`` and
107
-
implements ``update(XrTime)`` and ``serialize_all(channel_index, callback)``.
111
+
- **Holds user configuration** — Same logical inputs as the pusher (e.g. ``collection_id``,
112
+
``max_flatbuffer_size``). The live ``ITrackerImpl`` builds the internal tensor settings
113
+
(``SchemaTrackerConfig``) so they match the plugin.
114
+
- **create_tracker_impl(TrackerFactory&)** — Override this to delegate to the provided
115
+
``TrackerFactory``. The implementation uses double dispatch: call the factory method
116
+
specific to your tracker type (e.g.
117
+
``factory.create_generic_3axis_pedal_tracker_impl(this)``) and return the resulting
118
+
``std::unique_ptr<ITrackerImpl>``. The factory constructs an ``ITrackerImpl`` that holds
119
+
a ``SchemaTracker``, builds a ``SchemaTrackerConfig`` from the tracker's stored
120
+
configuration, and implements ``update(XrTime)`` and
121
+
``serialize_all(channel_index, callback)``.
108
122
109
123
In the **Impl**:
110
124
@@ -118,11 +132,19 @@ In the **Impl**:
118
132
device disappeared and there are no samples, you may emit one record with null data and
119
133
the update-tick timestamp so the MCAP stream marks absence.
120
134
121
-
Reference implementation: :code-file:`src/core/deviceio/cpp/generic_3axis_pedal_tracker.cpp`. It
122
-
composes ``SchemaTracker``, implements ``Impl::update()`` and ``Impl::serialize_all()``,
123
-
and exposes ``get_data(session)`` returning ``Generic3AxisPedalOutputTrackedT``. See also
124
-
:code-file:`inc/deviceio/schema_tracker.hpp <src/core/deviceio/cpp/inc/deviceio/schema_tracker.hpp>` for ``SchemaTracker`` and ``SampleResult`` (buffer +
125
-
timestamp).
135
+
Reference implementation — split across facade and live backend:
- :code-file:`HeadTracker <src/core/deviceio/cpp/inc/deviceio/head_tracker.hpp>` -- HMD head pose
15
-
- :code-file:`HandTracker <src/core/deviceio/cpp/inc/deviceio/hand_tracker.hpp>` -- articulated hand joints (left and right)
16
-
- :code-file:`ControllerTracker <src/core/deviceio/cpp/inc/deviceio/controller_tracker.hpp>` -- controller poses and button/axis inputs (left and right)
17
-
- :code-file:`FullBodyTrackerPico <src/core/deviceio/cpp/inc/deviceio/full_body_tracker_pico.hpp>` -- 24-joint full body pose (PICO ``XR_BD_body_tracking``)
14
+
- :code-file:`HeadTracker <src/core/deviceio_trackers/cpp/inc/deviceio/head_tracker.hpp>` -- HMD head pose
15
+
- :code-file:`HandTracker <src/core/deviceio_trackers/cpp/inc/deviceio/hand_tracker.hpp>` -- articulated hand joints (left and right)
16
+
- :code-file:`ControllerTracker <src/core/deviceio_trackers/cpp/inc/deviceio/controller_tracker.hpp>` -- controller poses and button/axis inputs (left and right)
17
+
- :code-file:`FullBodyTrackerPico <src/core/deviceio_trackers/cpp/inc/deviceio/full_body_tracker_pico.hpp>` -- 24-joint full body pose (PICO ``XR_BD_body_tracking``)
18
18
19
19
**SchemaTracker-based trackers** -- create new device type by defining a FlatBuffer schema and
- :code-file:`FrameMetadataTrackerOak <src/core/deviceio/cpp/inc/deviceio/frame_metadata_tracker_oak.hpp>` -- per-stream frame metadata from OAK cameras
- :code-file:`FrameMetadataTrackerOak <src/core/deviceio_trackers/cpp/inc/deviceio/frame_metadata_tracker_oak.hpp>` -- per-stream frame metadata from OAK cameras
0 commit comments