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++) {
465
+
result.push_back(MotionTrackerSerialNumbers[i]);
466
+
}
467
+
return result;
468
+
}
469
+
470
+
int64_tgetMotionTimeStampNs() {
471
+
std::lock_guard<std::mutex> lock(motionMutex);
472
+
return MotionTimeStampNs;
473
+
}
474
+
475
+
382
476
PYBIND11_MODULE(xrobotoolkit_sdk, m) {
383
477
m.def("init", &init, "Initialize the PXREARobot SDK.");
384
478
m.def("close", &deinit, "Deinitialize the PXREARobot SDK.");
@@ -412,6 +506,14 @@ PYBIND11_MODULE(xrobotoolkit_sdk, m) {
412
506
m.def("get_body_joints_acceleration", &getBodyJointsAcceleration, "Get the body joints acceleration data (24 joints, 6 values each: ax,ay,az,wax,way,waz).");
413
507
m.def("get_body_joints_timestamp", &getBodyJointsTimestamp, "Get the body joints IMU timestamp data (24 joints).");
414
508
m.def("get_body_timestamp_ns", &getBodyTimeStampNs, "Get the body data timestamp in nanoseconds.");
509
+
510
+
// Motion tracker functions
511
+
m.def("num_motion_data_available", &numMotionDataAvailable, "Check if motion tracker data is available.");
512
+
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).");
513
+
m.def("get_motion_tracker_velocity", &getMotionTrackerVelocity, "Get the motion tracker velocity data (3 trackers, 6 values each: vx,vy,vz,wx,wy,wz).");
514
+
m.def("get_motion_tracker_acceleration", &getMotionTrackerAcceleration, "Get the motion tracker acceleration data (3 trackers, 6 values each: ax,ay,az,wax,way,waz).");
515
+
m.def("get_motion_tracker_serial_numbers", &getMotionTrackerSerialNumbers, "Get the serial numbers of the motion trackers.");
516
+
m.def("get_motion_timestamp_ns", &getMotionTimeStampNs, "Get the motion data timestamp in nanoseconds.");
415
517
416
518
m.doc() = "Python bindings for PXREARobot SDK using pybind11.";
0 commit comments