List
Groundplane with external sensors
Posted Date: 2019-03-19 15:43     Edited Date: 2019-03-26 2:30     Writer: inactive

1. SDK Version: 4.1.0
2. Development Environment: Unity Version 2018.3.8f1
3. Tracker/Scanner: Instant tracker / Visual Slam
4. License Type: Free
5. Target Device(Optional): PC Standalone (Windows 10)

Hi,

I am trying to build a custom windows application for a optical see-through device that uses Instant Tracker and Visual Slam. Although both seems to do well, up until this point I haven't made use of internal IMU's like a gyroscope. This because I don't use a Maxst supporting device. Refering to this question: https://developer.maxst.com/BoardQuestions/Details/260, by my understanding without gyro and compass sensors there is no ground plane.

What I do have is a external IMU sensor with an API that i use to extract alle the nessecary data from like rotation and positioning data. I am able to use the IMU sensor in Unity but going through the Maxst API's code and the Maxst Unity examples I can't seem to find a function that I can use to integrate or tell Maxst about the IMU data. It seems that I am stuck at the "NativeAPI" (dll) from where the Maxst Unity examples derrives all there functions from. I would like to know if I missed something or perhaps it's a Pro-licence feature. Currently I am using Unity but if there is a Native solution I would also appreciate it. Thanks in advance!

Posted Date: 2019-03-21 5:40     Edited Date: 2019-03-21 5:40     Writer: inactive

Thank you for your interest in our SDK!  

The unique data obtained from the external IMU sensor is what you use to implement the functions you need.

What does it mean to integrate IMT data with the Maxt-Unity example?

 

Leo

Maxst Support Team

Posted Date: 2019-03-21 10:08     Edited Date: 2019-03-21 15:25     Writer: inactive

Thanks for the quick reaction,

Correct me if i'm wrong. As far as I can tell in Unity, the InstantTracker example scene uses rotation vectors related to internal gyroscope and compass (IMU) sensors of a supported device to determine the groundplane, which then can be used for placing objects in 3d space.

In the example scene, the only functions I came across that influence the position and rotations of objects in 3d space (or CameraBackground) are the following:

File:           

InstantTrackableBehaviour.cs

Functions:  

transform.position = MatrixUtils.PositionFromMatrix(poseMatrix);
transform.rotation = MatrixUtils.QuaternionFromMatrix(poseMatrix);
transform.localScale = MatrixUtils.ScaleFromMatrix(poseMatrix);

To give more context, it looks like the position and rotation data from the "MatrixUtils" functions (see above), which in turn uses Matrix4x4 (poseMatrix) data is provided by "trackable.GetPose()" deeper in the code. My conclusion is that the calculation to create the pose of objects relative to 3d space must be done inside the Maxst NativeAPI.

My point is I am not using a supported device, neither internal IMU sensors of a device, Instead I have a external IMU sensor. So my question is, how can I tell or how can I let Maxst use the IMU sensor (Gyroscope) rotation data it needs and uses (In case of supported devices with internal IMU sensors) to calculate the groundplane, which it (as it seems) automatically does when hooking up a supported Android device with all the needed sensors? With this question I am also reffering to an earlier forum post provided by writer "otaviosoato" (See the link I provided in my previous message) in which Sara for example states:

**********

Our Instant Tracker uses internally Android Rotation Vector related to both gyro and compass sensors.

Moto G5 has no gyro or compass sensor. 

If gyro or compass is not available on some phones, Instant Tracker assumes the front scene as the ground plane. So you could feel something's wrong.

If you want to check whether the current phone supports Android Rotation Vector or not, please refer to the following codes.

**********

Sorry for the amount of text, I tried to keep the explanation as precise and short as possible. Thanks!

 

Posted Date: 2019-03-22 5:19     Edited Date: 2019-03-22 5:19     Writer: inactive

The bottom line is that APIs are not available.

There is a gyro sensor embedded in the Android device, and the plane is calculated by obtaining the rotation vector through it.

This is how our SDK works. Even if the API was provided, it would not be easy to get the data from the internal gyro sensor exactly the same from the external IMU sensor.

 

Leo

Maxst Support Team

Posted Date: 2019-03-25 8:33     Edited Date: 2019-03-25 8:33     Writer: inactive

Okey, I understand, thank you!

Bernardo

Posted Date: 2019-03-26 2:30     Edited Date: 2019-03-26 2:30     Writer: inactive

Good Luck To you!

 

Leo

Maxst Support Team