Locating ML2 physical camera in OpenXR

Dear @emaschino and @kbabilinski,

I am also trying to locate the camera and get its position and orientation in an openxr context. I was hoping that the XR_ML_pixel_sensor extension would be supported in the new release of the magic leap's SDKs but, it is still in an experimental state as of version 1.7.0. And, I can not load this extension using the standard openxr loader which I acquire from "GitHub - KhronosGroup/OpenXR-SDK: Generated headers and sources for OpenXR loader.".

So, I have two questions, the first one is, how can I build an openxr-loader such that it supports this extension so that, I can enable this extension in the runtime?

And the second, if I was going to use the MLCVCameraGetFramePose, how should I transform the values I receive from this call, to the correct values understandable and usable for openxr's context.

Thank you both.

@kbabilinski Just updated our new Magic Leap 2 device to ML OS/SDK 1.7.0. While I didn't find any mention in the changelog, it seems to me that the offset issue has been fixed. Thanks for the great support!

@a.nourinia You can build any OpenXR loader from GitHub - KhronosGroup/OpenXR-SDK: Generated headers and sources for OpenXR loader. While experimental ML extensions don't appear in the OpenXR header(s), you can nevertheless make use of them by including the add-on headers in \v1.7.0\samples\openxr_samples\addon_headers and explicitely loading the required function pointers. Have a look at \v1.7.0\samples\openxr_samples\xraf{include|src}\app_framework\Extensions\MLPixelSensor.{h|cpp} it's pretty straightforward. With XR_ML_pixel_sensor extension, you no more have to use the deprecated MLCVCameraGetFramePose API.

1 Like