Log in or register to post comments

Vurforia Rotation Bug

July 26, 2018 - 3:03pm #1

Vuforia SDK Version: 7.2.20 -

Description with steps to reproduce: I am encountering a strange problem using Vuforia. It has to do with content instantiating at strange rotational offsets from the target markers.

A detailed explanation of the steps including images can be found here: https://docs.google.com/document/d/1K3hRXR5OW5k-8LT1Tq_MFS6CBw3np3tXI0Zz9YeAWSo/edit?usp=sharing

I started with the default multi-target example found in the core samples. Here is the XML file found under StreamingAssets:



<?xml version="1.0" encoding="UTF-8"?>
<QCARConfig>
    <Tracking>
        <ImageTarget name="MarsBox.Top" size="0.076200 0.038100"/>
        <ImageTarget name="MarsBox.Bottom" size="0.076200 0.038100"/>
        <ImageTarget name="MarsBox.Back" size="0.076200 0.101600"/>
        <ImageTarget name="MarsBox.Front" size="0.076200 0.101600"/>
        <ImageTarget name="MarsBox.Right" size="0.038100 0.101600"/>
        <ImageTarget name="MarsBox.Left" size="0.038100 0.101600"/>
        <MultiTarget name="MarsBox">
            <Part name="MarsBox.Left" translation="-0.038100000470876694 0 0" rotation="AD: 0 1 0 -90"/>
            <Part name="MarsBox.Right" translation="0.038100000470876694 0 0" rotation="AD: 0 1 0 90"/>
            <Part name="MarsBox.Front" translation="0 0 0.019050000235438347" rotation="AD: 1 0 0 0"/>
            <Part name="MarsBox.Back" translation="0 0 -0.019050000235438347" rotation="AD: 0 1 0 180"/>
            <Part name="MarsBox.Top" translation="0 0.05079999938607216 0" rotation="AD: 1 0 0 -90"/>
            <Part name="MarsBox.Bottom" translation="0 -0.05079999938607216 0" rotation="AD: 1 0 0 90"/>
        </MultiTarget>
    </Tracking>
</QCARConfig>

This correctly generates the default multi-target shown below and it works as expected at runtime.

Next, I replaced the left, right, top, and bottom multi-target parts with my own images at a different translation and scale. The rotations are the same as the default example.

<?xml version="1.0" encoding="UTF-8"?>
<QCARConfig>
    <Tracking>
    <ImageTarget size="0.25 0.25" name="satellite" />
    <ImageTarget size="0.25 0.25" name="solarsystem" />
    <ImageTarget size="0.25 0.25" name="dish" />
    <ImageTarget size="0.25 0.25" name="astronaut" />
    <MultiTarget name="Saturn_MultiTarget">
        <Part name="dish" translation="-0.868455 0 0" rotation="AD: 0 1 0 -90"/>
        <Part name="satellite" translation="0.868455 0 0" rotation="AD: 0 1 0 90"/>
        <Part name="astronaut" translation="0 0.868455 0" rotation="AD: 1 0 0 -90"/>
        <Part name="solarsystem" translation="0 -0.868455 0" rotation="AD: 1 0 0 90"/>
    </MultiTarget>
    </Tracking>
<QCARConfig>



This again operates as expected. However, the image targets are rotated at odd angles. For example, the astronaut is upside down and the satellite above is rotated 90 degrees clockwise from the original image. I have tried fixing this in the XML config file by specifying a secondary rotation:

<Part name="dish" translation="-0.868455 0 0" rotation="AD: 0 1 0 -90; 0 0 1 90"/>
<Part name="satellite" translation="0.868455 0 0" rotation="AD: 0 1 0 90; 0 0 1 -90"/>
<Part name="astronaut" translation="0 0.868455 0" rotation="AD: 1 0 0 -90; 0 0 1 180"/>
<Part name="solarsystem" translation="0 -0.868455 0" rotation="AD: 1 0 0 90"/>


Or by combining both rotations into a single AD as shown here:

<Part name="dish" translation="-0.868455 0 0" rotation="AD: -0.5773503 0.5773503 -0.5773503 240" />
<Part name="satellite" translation="0.868455 0 0" rotation="AD: 0.5773503 0.5773503 -0.5773503 120" />
<Part name="astronaut" translation="0 0.868455 0" rotation="AD: 0 0.7071068 -0.7071068 180" />
<Part name="solarsystem" translation="0 -0.868455 0" rotation="AD: -1 0 0 270" />


In both cases the markers appear correct in the editor: However, at run time the AR content is instantiated at an incorrect rotation relative to the marker. (The screenshots in the google doc linked above are helpful.) Am I doing something wrong or is this a bug with Vuforia?


-

Development OS (Mac OS X, Windows, Linux): Windows 10 -

Mobile OS and Version: iOS v 11.4 (problem occurs in the editor) -

Mobile Device Manufacturer and Model name: IPad Pro Model MPDY2LL/A (problem occurs in the editor) -

Do the Vuforia Sample Applications show the same behavior?: Modifying the multi-target sample application does show the same behavior.

Log in or register to post comments