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
for (int i = 0; i < NumMotionDataAvailable; i++) {
451
+
result.push_back(MotionTrackerSerialNumbers[i]);
452
+
}
453
+
return result;
454
+
}
455
+
456
+
int64_tgetMotionTimeStampNs() {
457
+
std::lock_guard<std::mutex> lock(motionMutex);
458
+
return MotionTimeStampNs;
459
+
}
460
+
461
+
368
462
PYBIND11_MODULE(xrobotoolkit_sdk, m) {
369
463
m.def("init", &init, "Initialize the PXREARobot SDK.");
370
464
m.def("close", &deinit, "Deinitialize the PXREARobot SDK.");
@@ -396,6 +490,14 @@ PYBIND11_MODULE(xrobotoolkit_sdk, m) {
396
490
m.def("get_body_joints_acceleration", &getBodyJointsAcceleration, "Get the body joints acceleration data (24 joints, 6 values each: ax,ay,az,wax,way,waz).");
397
491
m.def("get_body_joints_timestamp", &getBodyJointsTimestamp, "Get the body joints IMU timestamp data (24 joints).");
398
492
m.def("get_body_timestamp_ns", &getBodyTimeStampNs, "Get the body data timestamp in nanoseconds.");
493
+
494
+
// Motion tracker functions
495
+
m.def("num_motion_data_available", &numMotionDataAvailable, "Check if motion tracker data is available.");
496
+
m.def("get_motion_tracker_pose", &getMotionTrackerPose, "Get the motion tracker pose data (3 trackers, 7 values each: x,y,z,qx,qy,qz,qw).");
497
+
m.def("get_motion_tracker_velocity", &getMotionTrackerVelocity, "Get the motion tracker velocity data (3 trackers, 6 values each: vx,vy,vz,wx,wy,wz).");
498
+
m.def("get_motion_tracker_acceleration", &getMotionTrackerAcceleration, "Get the motion tracker acceleration data (3 trackers, 6 values each: ax,ay,az,wax,way,waz).");
499
+
m.def("get_motion_tracker_serial_numbers", &getMotionTrackerSerialNumbers, "Get the serial numbers of the motion trackers.");
500
+
m.def("get_motion_timestamp_ns", &getMotionTimeStampNs, "Get the motion data timestamp in nanoseconds.");
399
501
400
502
m.doc() = "Python bindings for PXREARobot SDK using pybind11.";
0 commit comments